Functionality Informs the runtime system that a user-defined GUI status is to be seton the selection screen in an externally defined function group. You can call this function module at any time during (or even before)the processing of the selection screen (for example, in the routineINIT or PBO of the database program SAPDBxyz, or under INITIALIZATIONor AT SELECTION-SCREEN OUTPUT in the report itself). At runtime, the parameter P_FB contains the name of a function module.Whenever, the GUI status is 'normally' set for the selection screen,the specified function module is called instead. In this functionmodule, you can use SET PF-STATUS .... to set the desired status. Youcan also use SET TITLEBAR ... to set your own title for the selectionscreen. The function module must (!!) have the following interface: IMPORT parameter P_SUBMIT_MODE: Depending on the current program execution, this should receive the following values: Blank: Normaler SUBMIT 'V': SUBMIT for variant maintenance 'J': SUBMIT VIA JOB: Background job scheduling. You can use this information to set the correct status for a given situation (for example, no Execute> in variant maintenance). It is also possible to set no status at all in variant maintenance and background job scheduling by triggering the exception NO_ACTION. In this case, the standard status is set. Table parameter P_EXCLUDE with structure RSEXFCODE. This table is passed to the function module. It contains the function code that must be excluded in this situation. This means that the function module is obliged (!!) to append the addition EXCLUDING P_EXCLUDE to the SET PF-STATUS ... . Exception NO_ACTION: Means that you have not set your own status (see above).Caution: If you use function keys (including function keys from the standardstatus), that have a dynamic text, the texts are taken from thecorresponding ABAP Dicationary fields of the function group in whichthe GUI status is defined. An example of this is the dynamic selectionspushbutton, whose text is filled at runtime from the fieldSSCRTEXTS-DYNSEL. If you want to use this pushbutton in a status thatyou set externally, you must include the statement TABLES SSCRTEXTS. inthe function group, and the field SSCRTEXTS-DYNSEL must contain thetext ('Dynamic selections'). Example for calling RS_EXTERNAL_SELSCREEN_STATUS: PROGRAM SAPDBxyz DEFINING DATABASE xyz. ... FORM INIT. CALL FUNCTION 'RS_EXTERNAL_SELSCREEN_STATUS' EXPORTING P_FB = 'TEST_EXTERNAL_STATUS'. ENDFORM. ... Example for function module that sets the status: FUNCTION TEST_EXTERNAL_STATUS. *"------------------------------------------------------ *"*"Local interface: *" IMPORTING *" P_SUBMIT_MODE *" TABLES *" P_EXCLUDE STRUCTURE RSEXFCODE *" EXCEPTIONS *" NO_ACTION *"------------------------------------------------------------- IF P_SUBMIT_MODE NE SPACE. RAISE NO_ACTION. ENDIF. SET PF-STATUS 'TEST' EXCLUDING P_EXCLUDE. SET TITLEBAR 'TST'. ENDFUNCTION. Description Passes the name of the function module that sets its own GUI statuswhen the system processes the selection screen. |