cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

abap bug MESSAGE shows wrong ID/class/number and navigate to wrong source position

Sandra_Rossi
Active Contributor
0 Kudos
401

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".

Sandra_Rossi_0-1741122733593.png

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).

Sandra_Rossi_1-1741123029788.png

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:

  • ABAP 7.40 SP 23. Kernel 753 SP 1300. SAP GUI 8.00.
  • ABAP 7.58 SP 1. Kernel 796 SP 51. SAP GUI 8.00.

Accepted Solutions (1)

Accepted Solutions (1)

Sandra_Rossi
Active Contributor

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:

Sandra_Rossi_0-1741123747689.png

Sandra_Rossi_1-1741123835998.png

Answers (0)