2025 Mar 04 9:24 PM - edited 2025 May 20 12:42 PM
I've got an ABAP program which sends a message with MESSAGE 'some text' TYPE 'E'.
Bug 1: when clicking the message to display a popup with the detailed information of the message, its content is wrong, there should be no message number and text should be "Character String as Message".
Bug 2: the button used to navigate to the ABAP source code position where the message is sent, goes to the wrong place (in fact it goes to the wrong message number/long text shown in the popup).
Any idea what the problem is and how to fix?
Thanks.
Sandra
Below are the program and function module to reproduce the bug.
Program:
REPORT.
PARAMETERS bug RADIOBUTTON GROUP rb1 DEFAULT 'X'.
PARAMETERS no_bug RADIOBUTTON GROUP rb1.
AT SELECTION-SCREEN OUTPUT.
AT SELECTION-SCREEN.
CASE 'X'.
WHEN no_bug.
MESSAGE 'Message shown and correct detail popup shows "Character String as Message" and ABAP source code shown is this line' TYPE 'E'.
WHEN bug.
DATA(return) = VALUE string( ).
CALL FUNCTION 'Z_ZSRO_MESSAGE_RAISING'
IMPORTING return = return
EXCEPTIONS error = 1.
MESSAGE return TYPE 'E'.
ENDCASE.Function module:
FUNCTION Z_ZSRO_MESSAGE_RAISING
EXPORTING
RETURN TYPE STRING
EXCEPTIONS
ERROR.
MESSAGE e398(00) WITH 'Message shown but buggy detail popup shows' 'TD600 and ABAP source code shown is' 'MESSAGE e600(td)' INTO return.
MESSAGE e600(td) WITH '*' '*' '*' RAISING error.
ENDFUNCTION.Systems:
Request clarification before answering.
A bug for sure.
Here's one workaround which consists in sending a dummy message right before "MESSAGE 'text' TYPE ..." statement:
REPORT.
PARAMETERS bug RADIOBUTTON GROUP rb1 DEFAULT 'X'.
PARAMETERS no_bug RADIOBUTTON GROUP rb1.
AT SELECTION-SCREEN OUTPUT.
AT SELECTION-SCREEN.
CASE 'X'.
WHEN no_bug.
MESSAGE 'Message shown and correct detail popup shows "Character String as Message" and ABAP source code shown is this line' TYPE 'E'.
WHEN bug.
DATA(return) = VALUE string( ).
CALL FUNCTION 'Z_ZSRO_MESSAGE_RAISING'
IMPORTING return = return
EXCEPTIONS error = 1.
zcl_zzsro=>dummy_message_to_fix_bug( ). "<=========== Add this
MESSAGE return TYPE 'E'.
ENDCASE.Class/Method code:
CLASS zcl_zzsro DEFINITION
PUBLIC FINAL
CREATE PRIVATE.
PUBLIC SECTION.
CLASS-METHODS dummy_message_to_fix_bug.
ENDCLASS.
CLASS zcl_zzsro IMPLEMENTATION.
METHOD dummy_message_to_fix_bug.
" This is to fix the bug described in this post:
" https://community.sap.com/t5/technology-q-a/abap-bug-message-shows-wrong-id-class-number-and-navigate-to-wrong-source/qaq-p/14033754
MESSAGE s001(00) INTO DATA(dummy) ##NEEDED.
ENDMETHOD.
ENDCLASS.After the fix above, the popup shows the right information, and the right ABAP source code position is shown:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 8 | |
| 6 | |
| 6 | |
| 3 | |
| 3 | |
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.