Application Development and Automation 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: 
Read only

Help

Abh_2
Participant
0 Likes
674

Can you please tell me how to Call a Badi in a program.

7 REPLIES 7
Read only

0 Likes
632

I dont understand your question, but, if i am in certain, it is not posible. A badi only is executed when the program where have developed the badi trigger the corresponding event.

Perhaps, you could execute the method of the class, but im not sure.

Read only

Former Member
0 Likes
632

If you know your BADI name...then do a new implementation and code it.

It will be automatically executed in your xyz trasaction process. no need to call explicitly.

or if you know your BADI method then call method explicitly.

Edited by: janardhan bidharkota on Dec 19, 2007 4:28 PM

Read only

Former Member
0 Likes
632

Hi,

Please look in to this .

Using Business Add-Ins, you can change the SAP standard programs without carrying out any system modifications.

Business Add-Ins are a new SAP enhancement technique based on ABAP Objects

They can be inserted into the SAP System to accommodate user requirements too specific to be included in the standard delivery

Specific industries often require special functions, SAP allows you to predefine these points in your software

In the definition view, an application programmer predefines exit points in a source that allow specific industry sectors, partners, and customers to attach additional software to standard SAP source code without having to modify the original object.

In the implementation view, the users of Business Add-Ins can customize the logic they need or use a standard logic if one is available.

Go To IMG( Implementation guide)

Find the BADI in implementation Guide (IMG)

TCODE: SPRO (IMG)

Search for BADI

Check the Documentation For BADI for functionality

Data Populated as Parameters in the BADI .

Functionality will be implemented in the Method.

Calling determine_account Badi through the program

Call method cl_exithandler=>get_instance

changing instance = exit1.

  • call customer function

call method exit1->determine_account

exporting

item_data = item_data

changing

acct_data = acct_data[ ].

  • end customer function

To create BAdi follow the steps

Go to Tcode: SE18

Enter definition name

Click create

Go to Tcode: SE19

Enter the implementation name

Click create

Enter definition name

Calling determine_account Badi through the program

Call method cl_exithandler=>get_instance

changing instance = exit1.

  • call customer function

call method exit1->determine_account

exporting

item_data = item_data

changing

acct_data = acct_data[ ].

  • end customer function

send your mailid if you want pictorial document.

Thanks

Sivaparvathi

Please reward points if helpful..........

Read only

Former Member
0 Likes
632

Dear Abhishek,

BAdIs can be called using a combination of the ABAP statements GET BADI and CALL BADI

>GET BADI FILTERS f1=x1 ... fn=xn

>CALL BADI badi->meth

Best Regards,

Rajesh

Please reward points if found helpful.

Read only

Former Member
0 Likes
632

Hi Abhishek,

Kindly Refer The Following link,

Read only

Abh_2
Participant
0 Likes
632

Calling determine_account Badi through the program

Call method cl_exithandler=>get_instance

changing instance = exit1.

  • call customer function

call method exit1->determine_account

exporting

item_data = item_data

changing

acct_data = acct_data[ ].

  • end customer function