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.
cancel
Showing results for 
Search instead for 
Did you mean: 

BADI's step by step.

Former Member
0 Kudos

I'm programming an example of BADI's following a tutorial but I have some questions.

1. In TCODE sucomp I found a BADI: ADDRESS_CHECK with ST05 tracking

2. I Create a Project ZPROJ and I need to know the name of the enhancement (in this case is: SZRS0003) how can I find this name?

3. Then in CMOD I go to Components and I can se de FM with a Z INCLUDE. In this include I can write custom code.

Another question... I've read that you can use a badi more than one time (not like user-exits) but if I create a new project and I want to assign the same enhancement: SZRS0003 I receive an error... because the enhancement is already in use. what's happening?

Thanx in advanced

5 REPLIES 5

Former Member
0 Kudos

Hi,

Why are you writing your code in CMOD ? CMOD is used for Customer exits (FM exit, screen exits and menu exits) and not for BADI's.

You have to use transaction SE19 for implementing a BADI.

Please explain your problem in detail.

Reward points if the answer is helpful.

Regards,

Mukul

Former Member

Former Member
0 Kudos

Hi

You need not create project for a badi,

Just go to transaction se19, create an implementation for the badi and code in the relevant methods.

Regards

Dinesh

Former Member
0 Kudos

Hi,

Implementing Business Add-Ins (BADI)

The use of object orientated code within SAP has lead to new method of enhancing standard SAP code called

Business Add-Ins or BADI's for short. Although the implementation concept is based on classes, methods and

inheritance you do not really have to understand this fully to implement a BADI. Simply think of methods

as a function module with the same import and export parameters and follow the simple instructions below.

Steps:

1. Execute Business Add-In(BADI) transaction SE18

2. Enter BADI name i.e. HRPBSGB_HESA_NISR and press the display

button

3. Select menu option Implementation->Create

4. Give implementation a name such as Z_HRPBSGB_HESA_NISR

5. You can now make any changes you require to the BADI within this

implementation, for example choose the Interface tab

6. Double click on the method you want to change, you can now enter

any code you require.

7. Please note to find out what import and export parameters a

method has got return the original BADI definition

(i.e. HRPBSGB_HESA_NISR) and double click on the method name

for example within HRPBSGB_HESA_NISR contract is a method

8. When changes have been made activate the implementation

See below link for more info:

https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/d0456c54-0901-0010-f0b3-cd765fb9...

Step by step proc

http://www.sapdevelopment.co.uk/enhance/enhance_badi.htm

<b>Reward points</b>

Regards

former_member235056
Active Contributor
0 Kudos

Hi,

To know the name of enhancement u have two ways:

1. Go for searching the component name e,g; package name,t code, program name in system->status and then search the the function "customer-function".

2. U can also search the same in se80 repository for same function name.

Yes it is true that multiple implementations are possible for BADIs but u cannot use the same definition again and again only u can change ur functionality for that definition and every time u have to deactivate the implementation before u go on for the modification for the same and after u finish changes again activate the project.

Pls reward points.

Regards,

Ameet