0
votes

I have to display error message on the selection screen if data was not found, and I have to display this message directly on the selection screen. My problem is that it's displayed on blank screen. This is my code:

FORM 1main .
  CLEAR: gt_tbalv.
  PERFORM check_screen.
  PERFORM get_data.
  IF gt_tbalv IS NOT INITIAL.
    CALL SCREEN 100.
  ELSE.
*   Message Data not found
    MESSAGE e010 DISPLAY LIKE 'S'.
  ENDIF.
ENDFORM.                    " 1MAIN

Where is my mistake?

PS: I call this form from START OF SELECTION event of selection screen

************************************************************************
***                       START-OF-SELECTION                         ***
************************************************************************
START-OF-SELECTION.
  PERFORM 1main.
2
Please provide a complete example - no use guessing where you are calling that FORM from... - vwegert

2 Answers

3
votes

I assume you call this form in START-OF-SELECTION. You should use AT SELECTION-SCREEN instead.

See this answer for an example.

0
votes

You can you a message type 'S' and display like 'E'. After the message use the LEAVE TO LIST-PROCESSING, so your program will be interrupted.