Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 9052

Re: At Selection-screen query

$
0
0

Hi Gita,

 

You can store the value of SY-SUBRC in a FLAG variable and then display the message at the END-OF-SELECTION event as the SY-SUBRC stores the state of last executed statement and the END-OF-SELECTION statement would always trigger it to 0.


for e.g.

AT SELECTION-SCREEN.
SELECT COUNT(*) FROM  dd02l INTO v_cnt WHERE TABNAME = p_tabnam.
FLAG = SY-SUBRC.

END-OF-SELECTION.
   IF FLAG EQ 0.
     MESSAGE 'Valid Table Name ' TYPE 'S'.
   ELSE.
     MESSAGE 'Invalid Table Name' TYPE 'S' DISPLAY LIKE 'E'.
   ENDIF.


Viewing all articles
Browse latest Browse all 9052

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>