abapsap-selection-screens

After message type e, program doesn't return to selection-screen ABAP


I'm trying to use a message type E in my report. The thing is that when the message is triggered, the program doesn't return to the selection-screen. Can anyone help me? Here's the code I use to achieve this:

IF rb_tri IS NOT INITIAL AND p_trim-low IS INITIAL.

  MESSAGE e038.

ENDIF.

Thanks :)


Solution

  • When I combine your question with your answer I offer another solution:

    Don't make your test after starting the process (START-OF-SELECTION) but on the selection screen:

    PARAMETER: p_test.
    
    AT SELECTION-SCREEN.
      IF p_test IS INITIAL.
        MESSAGE e038(00).
      ENDIF.
    

    The E-message blocks the selection screen until the problem is solved.