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: 

Badis (methods) need to be trigggered based on some validations

Former Member
0 Kudos

hi experts,

I have one query in BADIS.If i want to trigger my methods based on some values say for one badi i have implemeted 3 methods. Method 1, 2, 3.suppose if A condition satisfies then trigger 1,B satisfies trigger 2...how can i achive this.??

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

This can be achieved using filters in BADIs

For example BADI : FI_PAYREF_BADI_010

This is a filter dependent BADI so when you create a implementation you have to mention the value of the filter variable that you want it to trigger for like here we have LAND1 so if we only want on implementation to trigger for 1 country we can maintain the country.

Hope this helps.

Regards,

Himanshu

8 REPLIES 8

Former Member
0 Kudos

Hi,

This can be achieved using filters in BADIs

For example BADI : FI_PAYREF_BADI_010

This is a filter dependent BADI so when you create a implementation you have to mention the value of the filter variable that you want it to trigger for like here we have LAND1 so if we only want on implementation to trigger for 1 country we can maintain the country.

Hope this helps.

Regards,

Himanshu

0 Kudos

ok suppose if a Baid is not filter dependent.So how can i achieve my query even though that badi is not filter dependent.say, in ur badi itself land1 is not a filter dependent.In short if its blank field.

0 Kudos

Hi,

You can also keep checks in the methods in your implementations based on which the further code would would trigger if the BAPI is not filter dependent first thing you should check is if it is a multiple use BADI if it is not then you cnanot have multiple implementations for that BADI if it is a multiple use BADI and does not have filters then all of them would trigger there is no way of restricting the implementations but you can use checks in your code.

Regards,

Himanshu

0 Kudos

but the BAdi name which u have gave is not for multiple implementation rite??..because in attributes tab we have an option called multiple use.But its unchecked.

0 Kudos

but the BAdi name which u have gave is not for multiple implementation rite??..because in attributes tab we have an option called multiple use.But its unchecked.

0 Kudos

hi,

Thats right, so here only one implementation can be created and that wold also be only for the LAND1 values that you would specify in the filter values.

Regards,

Himanshu

Former Member
0 Kudos

hai,

what is the meaning of methods to be triggered

1) if a badi has multiple methods in it u want to control which to call

2) if badi is implemented multiple times u want to control

the answer is

if a badi has mulitple methods then the calling depends on where the mehtod is called and u cant control

the second answer is if u have multiple implementations all are called but the sequence is out of ur control

m.a

Former Member
0 Kudos

hi thank you guys.thread closed