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

Re: How to throw an error when we click on F8 in the Report program?

$
0
0

You could simply exclude the execute button, like this:

 

at selection-screen output.   perform disable_online_execution.
form disable_online_execution.   DATA lt_excl TYPE TABLE OF sy-ucomm.   APPEND :     'ONLI' TO lt_excl,     'PRIN' to lt_excl.   CALL FUNCTION 'RS_SET_SELSCREEN_STATUS'        EXPORTING             p_status  = sy-pfkey        TABLES             p_exclude = lt_excl.
endform.

With this code, the button "Execute" is switched off,  the menu paths "Execute" / "Execute and print" will be inactive, and the function key shortcuts to these fcodes are surpressed as well.

 

Better than offering a button and then shooting at the user with an error "HAHA, NOT ALLOWED!" when he presses it, is not to offer the button from the beginning.


Viewing all articles
Browse latest Browse all 9610

Trending Articles



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