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

BADI; Multiple Filters and implementation

0 Likes
3,600

Hi All,

I have a scenario where i need to create a BADI definition which has Multiple Filters ( Filter dependent BADI).

For example, i have created BADI definition with two filters

1) Consuming_application ( values could be AR, PR CR )

2) Mode ( values could be D , U )

Now, the application teams have implemented the BADI with their respective values for the filters.

Issue:

Example:

I am using GET BADI LR

FILTERS

CONSUMING_APPLICATION = 'AR'

MODE = 'D'

to get the reference of BADI implementation.

I want to get the BADI implementation to be called only when the application implements the BADI with both filters.

1) Even if the application implements a BADI with only one filter value i.e. Consuming application as 'AR' or Mode = 'D' , the BADI implementation is getting called.

Now, i do not want this to happen.

I want the implementation to get called only if both the filter values match with the one that the application has implemented.

I highly appreciate your valuable suggestions.

Many thanks in advance.

Cheers,

Ravi.

Hi All,

I have a scenario where i need to create a BADI definition which has Multiple Filters ( Filter dependent BADI).

For example, i have created BADI definition with two filters

1) Consuming_application ( values could be AR, PR CR )

2) Mode ( values could be D , U )

Now, the application teams have implemented the BADI with their respective values for the filters.

Issue:

Example:

I am using GET BADI LR

FILTERS

CONSUMING_APPLICATION = 'AR'

MODE = 'D'

to get the reference of BADI implementation.

I want to get the BADI implementation to be called only when the application implements the BADI with both filters.

1) Even if the application implements a BADI with only one filter value i.e. Consuming application as 'AR' or Mode = 'D' , the BADI implementation is getting called.

Now, i do not want this to happen.

I want the implementation to get called only if both the filter values match with the one that the application has implemented.

I highly appreciate your valuable suggestions.

Many thanks in advance.

Cheers,

Ravi.

2 REPLIES 2
Read only

former_member557751
Participant
2,127

Hello,

have you combined your two filter elements with 'AND'?

Check this thread for help.

https://archive.sap.com/discussions/thread/3699936

Best regards, Tapio

Read only

DoanManhQuynh
Active Contributor
0 Likes
2,127

when you define 2 filter separately, its mean one of 2 satisfied then Badi get called. take both of condition in 1 combination and use AND operation would solve it.