Skip to Content
0
Former Member
Nov 29, 2006 at 11:11 PM

Question reg. message on selection screen

29 Views

Hi,

On selection screen, I want to display a status message if the data is not found from the values the user entered. I wrote the following coding. I am able to get the message but it is coming out in the output rather than on the selction screen itself. Can you tell me what correction I can make to get the desired result?

IF p_vbeln IS not INITIAL.

SELECT vbeln erdat FROM vbak

INTO CORRESPONDING FIELDS OF TABLE itab_vbeln

WHERE vbeln = p_vbeln.

endif.

IF sy-subrc <> 0.

MESSAGE s004(zer) WITH 'No data found'.

ENDIF.

Thank you very much,

Krishen