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 implementations

Former Member
0 Likes
4,285

Hi all,

i got two enhancement implementations for the standard BADI IBAPI_ALM_ORD_MODIFY say

implementation1 - YENHANCEMENTIMP with class implementation CL_IM_BIMP 

implementation2 - YRUNAROUNDIMP With class implementation cl_imp_runaround

here when ever i execute my BAPI these two implementations are getting triggered...

How could i restrict one without deactivating it.

Regards

22 REPLIES 22
Read only

Former Member
0 Likes
4,119

Set filter values for the BADI.

Read only

0 Likes
4,119

Thank you for the early reply...

How should i... ?

i cant check the check box against "Filter Depend"  for this IBAPI_ALM_ORD_MODIFY

just below the " Multiple Use" check box....

so how should i set filter values guide me...

regards

Read only

0 Likes
4,119

Go to Se18.

Select the checkbox filter dependent.

Select a suitable filter type (Use F1 and F4) to get the suitable data element.

Save it.

NOw check the BAPI implementations, it will have an extra parameter for filter values.

Pass the appropriate value for filter value in the parameter when calling BAPI.

For each BAPI implementation, introduce the code like

check flt_val = 'X'.

So only the intended BAPI will be executed.

You can check the documentation on the same ..

Read only

Former Member
0 Likes
4,118

In SORTING of BADI execution sequence define only one badi which you want to get trigger.

Read only

Former Member
0 Likes
4,118

is there any filter option in BADI ? Both the implementation created due to some business reason , why you want to restrict that ? If you you can implement your reason to restrict in code then that condition you can put

BR,

Prakash

Read only

Former Member
0 Likes
4,118

YOU uncheck multiple implementation check box.

Read only

0 Likes
4,118

Its a standard BADI. I cant change anything in here.

Regards

Read only

0 Likes
4,118

You can change it, just go via SE18

Read only

0 Likes
4,118

Yes i did change it...thank you

where to find the changes or filter parameter?

this is the standard bapi im using in my code BAPI_ALM_ORDER_MAINTAIN.

Regards

Read only

0 Likes
4,118

Hi Sushmita,

i have an issue here... I checked "Filter Depend" to save changes it asked for access key.. which i gave.. i got this filter parameter also. But when i tried to understand Bapi i tried to apply break-point in side it.. i'am getting this message

"The main program SAPLIBAPI_ALM_ORDER must be

generated."

how to generate this and where... ?

i'am getting the dump when i executing   BAPI_ALM_ORDER_MAINTAIN

regards

Read only

0 Likes
4,118

Check SAP NOTE 705126 - BAPI_ALM_ORDER_MAINTAIN: Error during various scenarios

* If there are multiple calls of BAPI BAPI_ALM_ORDER_MAINTAIN, a dump occurs.

Read only

0 Likes
4,118

Thank you for the reply..

i got rid of the Dump. i could see "Flt_val " parameter only in the parameters of the method...

how to pass value to it... i am using BAPI_ALM_ORDER_MAINTAIN in my code!!!!!!!

regards

Read only

SuhaSaha
Product and Topic Expert
Product and Topic Expert
0 Likes
4,118

Thank you for the reply..

i got rid of the Dump. i could see "Flt_val " parameter only in the parameters of the method...

how to pass value to it... i am using BAPI_ALM_ORDER_MAINTAIN in my code!!!!!!!

What can you do now - MODIFY the BAPI code?

Sorry for being so direct, but honestly I don't understand why don't people think before MODIFY'ing standard SAP solutions?

There is a reason SAP did not mark this BAdI as filter-dependent and IMO you should not try to override this without weighing in other options.

Now, back to your problem. Can you confirm if you see this in your BAdI definition?

BR,

Suhas

Read only

0 Likes
4,118

Yes! I could see it in my BADI definition..

Ok,  "What can you do now - MODIFY the BAPI code?"

Suhas frankly this where i am struck.  When i started this thread i wanted to know wheather we have any option other than deactivating it... Somebody said yes "Filter" is option. I (want to try) tried that and now i am like "What can you do now - MODIFY the BAPI code?" No! i don't want to do (Modify) it.

i just want make it sure.... did i miss something (where others got it and i am not) or this it...

Really i don't have any intention to modify SAP code.

Regards

Read only

former_member214915
Participant
0 Likes
4,118

Hi satish ,

                  You can use the set_buffer and get_buffer FM to terminate the execution.If suppose implementation1 - YENHANCEMENTIMP is executed first than set some parameter value as X in first implementation and pass it to buffer than use get_buffer FM and extract the value of field if it is X than write EXIT command.

Regards,

Shahezad

Read only

matt
Active Contributor
0 Likes
4,118

What are the criteria for the BADI implementation to run? Without that fairly basic piece of information, how can anyone answer your question?

Read only

Former Member
0 Likes
4,118

hi,

we have two enhancement implementations for the same badi.. both are to maintain values of the user defined fields... i observed while executing bapi in debugging mode that both the implementations are being called..

i was thinking is there any to prevent one implementation being called without de-activating it.

The solution is filters.

My query is how?

Regards

Read only

0 Likes
4,118

Satish,

there are 2 implementations (IBAPI_ALM_ORD_MODIFY),

you want to call only one and don't wanna deactivate or apply filter...

Your code it's a customer implementation (Y).

This badi has only one method.

One possible way, is to insert one line (the first line) in implementation that you don't want to call:

CHECK 1 = 2.

This implemantion will not have effect in your functional process.

Read only

Former Member
0 Likes
4,118

I dont want to deactivate it....

applying filter is what i want to explore.

Regards

Read only

matt
Active Contributor
0 Likes
4,118

Applying filters is apparently only an option by modifying the BADI definition, which is a very bad idea.

If you do not wish to run one of the implementations, then there is no reason at all to not deactivate it. If you wish to run one implementation under one circumstance, and the other in another, then put the logic in the implementation.

I'm running out of patience over this thread. It will soon be locked if common sense does not start to resurface.

Read only

Former Member
0 Likes
4,118

Matthew Billingham wrote:

Applying filters is apparently only an option by modifying the BADI definition, which is a very bad idea.

If you do not wish to run one of the implementations, then there is no reason at all to not deactivate it. If you wish to run one implementation under one circumstance, and the other in another, then put the logic in the implementation.

I'm running out of patience over this thread. It will soon be locked if common sense does not start to resurface.

Thank you, if the conclusion is that, there is no other option except to deactivate the implementation,,, and "Filters" are the Bad idea....

I thought to know more and how Filter work.

I would like to close this thread.

Regards

Read only

former_member183073
Active Participant
0 Likes
4,118

Hi Satish.

why didn't you put the IF Condition in both implementations instead of changing the BAdI.

Same filter condition you could have coded in IF Condition.