‎2014 Jun 10 9:07 AM
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
‎2014 Jun 10 9:09 AM
‎2014 Jun 10 9:13 AM
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
‎2014 Jun 10 9:21 AM
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 ..
‎2014 Jun 10 9:12 AM
In SORTING of BADI execution sequence define only one badi which you want to get trigger.
‎2014 Jun 10 9:13 AM
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
‎2014 Jun 10 9:20 AM
‎2014 Jun 10 9:27 AM
‎2014 Jun 10 9:30 AM
‎2014 Jun 10 9:47 AM
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
‎2014 Jun 13 5:02 AM
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
‎2014 Jun 15 7:08 AM
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.
‎2014 Jun 16 11:53 AM
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
‎2014 Jun 16 3:32 PM
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
‎2014 Jun 17 5:15 AM
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
‎2014 Jun 10 2:37 PM
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
‎2014 Jun 15 7:21 AM
What are the criteria for the BADI implementation to run? Without that fairly basic piece of information, how can anyone answer your question?
‎2014 Jun 16 12:06 PM
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
‎2014 Jun 16 12:14 PM
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.
‎2014 Jun 16 12:36 PM
I dont want to deactivate it....
applying filter is what i want to explore.
Regards
‎2014 Jun 16 3:44 PM
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.
‎2014 Jun 17 5:26 AM
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
‎2014 Jun 16 1:37 PM
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.