SAP Function RS_SET_SELSCREEN_STATUS - Sets own GUI status on selection screens

Parameter Reference Type Length Default Optional Text
P_PROGRAM SYST-REPID C 40 SPACE X Program to which the status belongs
P_STATUS SYST-PFKEY C 20 Status To Be Set

Parameter Reference Length Optional Text
P_EXCLUDE 0 Table of OK codes to be excluded


This function module allows you to set your own status on a selectionscreen and exclude function codes from your own or from a standardstatus.
For example, you can remove the Print function from the standardstatus by passing the SY-PFKEY field to the parameter P_STATUS, whilethe table P_EXCLUDE contains a line with the entry 'PRIN' (= functioncode for printing).
The function module should be called only when processing selectionscreens, i.e. only under INITIALIZATION or AT SELECTION-SCREEN OUTPUT.
Abap_hint,,before calling this function module, you should call thefunction module RS_SUBMIT_INFO to find out the current mode of theselection screen processing (normal execution, variant maintenance orbackground job scheduling) and then set the correct status.
Abap_hint,,the gui status passed to p_status must be defined in theprogram itself (if you do not supply a value for P_PROGRAM). You canset an externally defined status with the function moduleRS_EXTERNAL_SELSCREEN_STATUS.

Description
Program from which GUI status P_STATUS is to be taken. The parameter isoptional. If it is not filled, the system searches the status in theprogram to which the selection screen belongs.

Description
GUI status to be set on the selection screen. If you do not specify avalue for P_PROGRAM, the system looks for the status in the program towhich the selection screen belongs. Otherwise, it looks in P_PROGRAM.

Description
The table should have the structure RSEXFCODE (one twenty-characterfield). It contains all of the function codes that are deactivated whenthe selection screen is processed.