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: 

How to call multiple BAdi implementations dynamically

Former Member
0 Kudos

Hi All,

I have an Enhancement spot, where i have multiple implementations with different filters and Different BAdi definitions.

I Want to call these BAdi definitions dynamically one after another. based on the filter value.

Can anyone let me know how to do this?

Thanks,

Seema

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi there,

The following is code to call the BAdi definition implementations:

DATA: v_handle TYPE <badi_name>.

GET BADI v_handle

FILTERS

<filter_field> = <corresponding_program_value>.

CALL BADI v_handle-><badi_method_name>

EXPORTING

<exporting parameters here>

IMPORTING

<importing parameters here>.

What this does is it calls the method of the badi definition in your code and calls all implementations made on the definition.

Cheers,

Aditya

Edited by: Aditya Laud on Feb 8, 2008 5:26 AM

3 REPLIES 3

Former Member
0 Kudos

Hi there,

The following is code to call the BAdi definition implementations:

DATA: v_handle TYPE <badi_name>.

GET BADI v_handle

FILTERS

<filter_field> = <corresponding_program_value>.

CALL BADI v_handle-><badi_method_name>

EXPORTING

<exporting parameters here>

IMPORTING

<importing parameters here>.

What this does is it calls the method of the badi definition in your code and calls all implementations made on the definition.

Cheers,

Aditya

Edited by: Aditya Laud on Feb 8, 2008 5:26 AM

0 Kudos

Thanks for reply,

but i needed solution for calling multiple implementations which have different Definition & different methods.

The problem has been solved.

Former Member
0 Kudos

Solved my self