How to add a "My Default" Button on Selection Screen
This is the procedure to add "My Default" to selection screen
************************************************************************
*Source Code For MY Default Button
************************************************************************
*SAP standard Include for Variant Maintenance for User
INCLUDE rq00mf10.
************************************************************************
*-------------------------- INITIALIZATION ---------------------------*
************************************************************************
INITIALIZATION.
sscrfields-functxt_01 = text-001. "Default
PERFORM variant_start_f10.
TRY .
* CREATE OBJECT o_input.
* CREATE OBJECT o_events_h1. "Event Handler
CATCH cx_sy_create_object_error
cx_root.
MESSAGE e001. "Error While Creating object
ENDTRY.
************************************************************************
* AT SELECTION-SCREEN
************************************************************************
AT SELECTION-SCREEN.
IF sscrfields-ucomm = c_fc01.
PERFORM variant_f10.
IF sy-tcode = c_se38 OR sy-tcode = c_sa38.
SUBMIT (sy-repid) VIA SELECTION-SCREEN.
ELSE.
LEAVE TO TRANSACTION sy-tcode.
ENDIF.
ENDIF.
************************************************************************
*---------------------- AT SELECTION SCREEN OUTPUT---------------------*
************************************************************************
AT SELECTION-SCREEN OUTPUT.
PERFORM user_fc_steuern.
*Source Code For MY Default Button
************************************************************************
*SAP standard Include for Variant Maintenance for User
INCLUDE rq00mf10.
************************************************************************
*-------------------------- INITIALIZATION ---------------------------*
************************************************************************
INITIALIZATION.
sscrfields-functxt_01 = text-001. "Default
PERFORM variant_start_f10.
TRY .
* CREATE OBJECT o_input.
* CREATE OBJECT o_events_h1. "Event Handler
CATCH cx_sy_create_object_error
cx_root.
MESSAGE e001. "Error While Creating object
ENDTRY.
************************************************************************
* AT SELECTION-SCREEN
************************************************************************
AT SELECTION-SCREEN.
IF sscrfields-ucomm = c_fc01.
PERFORM variant_f10.
IF sy-tcode = c_se38 OR sy-tcode = c_sa38.
SUBMIT (sy-repid) VIA SELECTION-SCREEN.
ELSE.
LEAVE TO TRANSACTION sy-tcode.
ENDIF.
ENDIF.
************************************************************************
*---------------------- AT SELECTION SCREEN OUTPUT---------------------*
************************************************************************
AT SELECTION-SCREEN OUTPUT.
PERFORM user_fc_steuern.
Comments
Post a Comment