Aller au contenu

Reporting - Créer une implementation badi variable

Procedure to implement an Exit variable via the BADI RSROA_VARIABLES_EXIT

Why we use the BADI:

  • Avoid the management of a large program that changes rapidly over time
  • Avoid conflicts if two users want to modify two variables at the same time.
  • Minimize returns and facilitate program maintenance if needed.

Objective: creation of a BADI by InfoObjet

T-Code = SE19

Enter the name of the BADI as below then create implementation:

Untitled

Give the name of the implementation and the description:

=> Naming rule: ZBW_OBJEXIT (example:  ZBWCALDAY_EXIT)

Untitled

Save the implementation already created.

Enter the following data then validate:

Naming rule

  • Implementation name: ZBW_OBJ_EXIT
  • The implementation class to be created: ZCL_OBJ (Cyril the 9TH of September 2022 : From my point if view the implementation class should be named ZCL_ and not ZCL_OBJ, to be validated by expert)
  • Choose the BADI: RSROA_VARIABLES_EXIT_BADI

Untitled

Scroll with the small arrow to see the filters and the implementation.

Untitled

Untitled

Create a filter on the object in question, here: ZYEAR

Untitled

Create a filter on the IO in question.

Untitled

Click on implementing class then on method

Untitled

Enter the ABAP code for the variable in question.

Untitled

Note:

To go to I_step 2, the variable must not be defined as input ready.

You must uncheck the box in the properties of the variable

Untitled