Dynamic selection screen using PF status between two programs
1. Changing initial screen options can be done as follows
2. PF status (MENU from SE41 Menu painter) need to be created.
3. In the event AT SELECTION-SCREEN OUTPUT following need to used
AT SELECTION-SCREEN OUTPUT.
*Use a custom PF-STATUS instead of the standard one
CALL FUNCTION 'RS_SET_SELSCREEN_STATUS'.
EXPORTING
p_status = 'EDIT_TEXT'
TABLES
p_exclude = exclitab.
DATA: exclitab TYPE TABLE OF sy-ucomm.
4. While creating the push button following need to be taken care, ie Function type need to be ‘E’—Exit command
5. Later in the event AT SELECTION-SCREEN ON EXIT-COMMAND, depending on the command declared in the menu painter get the selection screen inputs if required and submit it to the program.
AT SELECTION-SCREEN ON EXIT-COMMAND.
IF sy-ucomm = <command declared in menu painter>
PERFORM submit_program.
ENDIF.
FORM submit_program .
DATA: sel_table TYPE TABLE OF rsparams.
CLEAR sel_table.
CLEAR p_detlay.
CALL FUNCTION 'RS_REFRESH_FROM_SELECTOPTIONS'
EXPORTING
curr_report = sy-repid
TABLES
selection_table = sel_table.
SUBMIT < to_which_program this need to be submitted>
VIA SELECTION-SCREEN WITH SELECTION-TABLE sel_table
AND RETURN.
ENDFORM. " submit_program
1. Changing initial screen options can be done as follows
2. PF status (MENU from SE41 Menu painter) need to be created.
3. In the event AT SELECTION-SCREEN OUTPUT following need to used
AT SELECTION-SCREEN OUTPUT.
*Use a custom PF-STATUS instead of the standard one
CALL FUNCTION 'RS_SET_SELSCREEN_STATUS'.
EXPORTING
p_status = 'EDIT_TEXT'
TABLES
p_exclude = exclitab.
DATA: exclitab TYPE TABLE OF sy-ucomm.
4. While creating the push button following need to be taken care, ie Function type need to be ‘E’—Exit command
5. Later in the event AT SELECTION-SCREEN ON EXIT-COMMAND, depending on the command declared in the menu painter get the selection screen inputs if required and submit it to the program.
AT SELECTION-SCREEN ON EXIT-COMMAND.
IF sy-ucomm = <command declared in menu painter>
PERFORM submit_program.
ENDIF.
FORM submit_program .
DATA: sel_table TYPE TABLE OF rsparams.
CLEAR sel_table.
CLEAR p_detlay.
CALL FUNCTION 'RS_REFRESH_FROM_SELECTOPTIONS'
EXPORTING
curr_report = sy-repid
TABLES
selection_table = sel_table.
SUBMIT < to_which_program this need to be submitted>
VIA SELECTION-SCREEN WITH SELECTION-TABLE sel_table
AND RETURN.
ENDFORM. " submit_program
No comments:
Post a Comment