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-repidVIA SELECTION-SCREEN.
    ELSE.
      LEAVE TO TRANSACTION sy-tcode.
    ENDIF.
  ENDIF.
************************************************************************
*---------------------- AT SELECTION SCREEN OUTPUT---------------------*
************************************************************************
AT SELECTION-SCREEN OUTPUT.
  PERFORM user_fc_steuern.

Comments

Popular posts from this blog

ABAP Tips - 1 : How to Display a Popup and Get Values from User ?

Help on BAPI_ACC_DOCUMENT_POST and BAPI_ACC_DOCUMENT_POST

Few Tips for Transport Request Manipulation