SYNTAX_ERROR dumps after SAP SP upgrade

After an SAP support package upgrade, you may sometimes face SYNTAX_ERROR dumps for certain objects. This happens because some changes from the previous Support Package are not de-implemented. And then this leads to syntax errors as methods are not actually present.

In the below example, we were getting SYNTAX_ERROR dumps while downloading or resetting SAP notes in SPAU.
Syntax error in program “CL_SCWN_NOTE_SAR_FILE_N=======CP “.

Method “TEXT_001” is not declared or inherited in class “CL_SCWN_NOTE_SAR_FILE_N”.

Syntax_error in program "CL_SCWN_NOTE_SAR_FILE_N=======CP

If you try to check the class in SE24, you won’t see the missing method as it doesn’t actually exist.

SE24

Solution

We can resolve such issues by doing a clean-up of the class to delete the old implementations. Follow the below steps:

1) Execute SE24 (Class builder) and enter the name of the class..

2) Click the “Change” icon. For the first time, it will ask to provide the developer access key. If you already have the key, then go to Utilities –> Clean Up –> Method includes

Utilities --> Clean up --> Method includes

3) Click on Yes.

4) Save the changes in a workbench transport and click on the “Activate” icon to activate the class.
5) Do a syntax check and it should not throw any syntax error.

No SYNTAX_ERROR found

Possible issues for SYNTAX_ERROR dumps

While trying to modify the class using “Change” or “Edit” mode in SE24, you may get the below error

Message No. EU526 “Carry out modification comparison for XXXX XXXXXX first. No changes possible”

Message No. EU526

Root cause: This is because the object or related SAP notes are locked in SPAU.

Solution: Check and take action as per the below SAP note. We need to adjust the relevant SAP object as well as its related SAP note.
2415916 – EU526 “Carry out modification comparison first” occurs when changing SAP Standard objects (1)

But in our case, we could not download and reset those related Obsolete SAP notes because of the dump. So we were in a kind of deadlock situation.

1) Not able to enter into edit mode to run the cleanup of the standard class in SE24 because the class and its related notes were locked in SPAU
2) We were not able to reset or adjust the object and those notes in SPAU because the class had syntax errors and every time it was ending in an SYNTAX_ERROR dump.

Workaround to resolve SYNTAX_ERROR dumps

To resolve these types of deadlock situations, we thought of bypassing the message EU526. Follow the below steps to run SE24 in debug mode.

1) Execute SE24 with the class name in “Display” mode.
2) Type /h in the command window and press Enter to switch on debugging mode.

3) Now click on the “Edit” button and the debugger will open in a new window.
4) Click on “Breakpoints” –> Breakpoint at –> Breakpoint at Message

5) Enter ID as EU and Number as 526. This is from message no. EU526.

6) Now go back and press F8. The debugger will stop at the below screen.

active_upgrade

7) Click on statement line number 341 “IF NOT active_upgrade IS INITIAL.” and goto “Debugger” –> Goto Statement.

8) Double click on “active_upgrade” and edit the value from X to blank. Then press F7 or F8.

9) Whenever the debugger stops again, change the value from X to blank. After a few F8/F7, SE24 should now be in edit mode. Now, you can follow the above steps mentioned in the blog to clean up the old methods.

Once done, perform the SPAU adjustments to avoid such issues again.

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top