SAP SELECTION SCREEN EVENTS Get Example source ABAP code based on a different SAP table
SAP Help
ABAP_SELSCR - Processing Selection screen processing encapsulates the
dynpro flow logic> together with the sending of the selection screen> . No dialog modules of the program are called. Instead, a series of selection screen events> are raised for which event blocks can be programmed. PBO > processing raises the event AT SELECTION-SCREEN>> OUTPUT>> PAI> processing raises a number of different events, depending on the user action. AT SELECTION-SCREEN>> ...>> Selection screen processing of a displayed selection screen is ended only by selection of the following functions of the GUI status>: Execute> or Execute + Print> Triggers the selection screen events of PAI processing. After this, the event START-OF-SELECTION>> is raised for standard selection screens called using SUBMIT >>. For selection screens called using dialog transactions>, the program is ended. A call in the program resumes the program after the statement CALL SELECTION-SCREEN>>. Back>, Exit>, or Cancel> Triggers the event AT SELECTION-SCREEN ON EXIT-COMMAND> only. After this, the program is ended for standard selection screens called using SUBMIT> and dialog transactions. Otherwise, sy-subrc> is set to 4 and the program resumes after the statement CALL SELECTION-SCREEN>. For all other user actions, the selection screen is called again automatically after selection screen processing is ended. Latest notes: The selection screen processing also encapsulates the processing of the function codes> assigned to the control elements of the selection screen. The function code that raises PAI processing is placed in the component ucomm> of an interface work area> sscrfields> with the type of the structure SSCRFIELDS>>. If an interface work area of this type is declared in a program using the statement TABLES>>, the function code can be accessed. It is not advisable to access the system field sy-ucomm>, however, since it is not possible to guarantee that it has the same value as sscrfields-ucomm> in all situations. Whether a program resumes depends on the function code that is contained in the UCOMM> component of the interface work area> SSCRFIELDS> at the end of PAI processing. If this is declared using TABLES> and if this component is set to the value ONLI > (for example, during processing of the standard selection screen of a program called using SUBMIT>) and this value is assigned to the function Execute>, the event START-OF-SELECTION> is raised after selection screen processing. Overwrites of the system field sy-ucomm>, however, are ignored. To avoid ending the program following the processing of a selection screen called using a dialog transaction, either the next dynpro> must be called using LEAVE TO SCREEN>> or a new dynpro sequence> called using CALL SCREEN>> during selection screen processing. The statement SET SCREEN> > is not sufficient here. In selection screen processing, the statement LOOP AT SCREEN>> can be used to access the properties of screen elements on the selection screen. ABAP_HINT_END