Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
Showing results for 
Search instead for 
Did you mean: 

BADI - Menu Enhancement

Former Member
0 Kudos

Hi all ,

i am implementing badi-HRBAS00_GET_PROFL for transaction PFCG. In SE18 we have to pass the program name for that (fcode), which name i have to pass under program.




Former Member
0 Kudos


Check the procedure for creating BADI

A. BAdI Definition

1. SE18

2. Enter the name for the BAdI to be created in customer namespace and press "Create".

3. Enter a definition for your BAdI and on the interface tab enter a name for the BAdI interface. SAP proposes a name and it is pretty good. Meanwhile a BAdI class is also created which is not in our concern.

e.g for "ZTEST", SAP proposes "ZIF_EX_TEST" for the interface and "ZCL_EX_TEST" for the class.

4. Save your BAdI.

5. Double-click on the interface name. It will pass to a Class Builder session to make you implement your interface. If you are not familiar to the Class Builder; it's a bit like Function Builder and it will be easy to discover its procedure.

6. Save and activate your interface.

B. Calling your BAdI from an application program

1. Declare a reference variable with reference to the Business Add-In interface.

e.g. DATA exit_ref TYPE REF TO zif_ex_test.

2. Call the static method GET_INSTANCE of the service class CL_EXITHANDLER. This returns an instance of the required object.



CHANGING instance = exit_ref .

3. After those two steps, you can now call all of the methods of the BAdI where it is required in your program. Make sure you specify the method interfaces correctly.

C. BAdI Implementations

1. SE19

2. Enter the name for the BAdI implementation to be created in customer namespace and press "Create".

3. It will request the BAdI definition name to which this implementation will be tied.

4. Enter a definition for your implementation and on the interface tab enter a name for the implementing class. Again SAP proposes a name and it is pretty good.

e.g for "ZIMPTEST", SAP proposes "ZCL_IM_IMPTEST".

5. Save your implementation.

6. To implement a method, just double-click on the method name and you will be taken to the Class Builder to write the code for it. Here you redefine the BAdI interface methods.

7. You must activate your implementation to make it executable. You can only activate or deactivate an implementation in its original system without modification. The activation or deactivation must be transported into subsequent systems

That's all. For further details, i.e. filter-dependence, multi-usage, menu nehancements etc... you can have a look at course materials of BC425 "Enhancements and Modifications".

Also check this link



Former Member
0 Kudos


Please look into this link for more info around this...

Context Objects Info

HRBAS00_GET_PROFL (BAdI: Determine Assigned Structural Profiles)


0 Kudos

Thank you Kiran.