How to implement the created badi in your program

1: create Badi with any name as I have created badi with name 'ZBADI_TEST' if you are new to create badi please refer previous post.
2: create reference of the badi as I am doing.  
2: then call the method of your badi in try catch.


DATA lr_badi TYPE REF TO ZBADI_TEST.

  TRY.
      GET BADI lr_badi.
      IF lr_badi IS BOUND.
        CALL BADI lr_badi->PROCESS_FIELDS
          Exporting
            IV_DUMMY                 = LV_DUMMY    
          Changing
            CS_HEADER       = CS_HEADER  
      Endif.
    CATCH cx_badi_not_implemented.
      "Throw error
  ENDTRY.

Comments

Popular posts from this blog

Alternative to READ_TEXT Function Module (to fetch multiple long text at one go )