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: 

Regarding Badi ME_PROCESS_PO_CUST

Former Member
0 Kudos

Dear Gurus,

           I have came through a very strange problem I have implemented a badi for line items  on ME_PROCESS_PO_CUST on sand box it was working fine. But when I have implemented a new badi for the same line item  both the badi implementated badi's has stopped work. Can some one guide me because as much as I know I can implement multiple badi for a single transaction. If i am wrong please guide me.

Regards,

Zahid Hameed.

1 ACCEPTED SOLUTION

former_member195270
Active Participant
0 Kudos

Yes you can do multple implemenations for the BAdi.You can see example imlemenation class CL_EXM_IM_ME_PROCESS_PO_CUST of this BAdi.It will help you.

19 REPLIES 19

raymond_giuseppi
Active Contributor
0 Kudos

Are you sure of

I know I can implement multiple badi for a single transaction

Now, look more carefully at the BAdI definition (SE18) you should notice that the "Multiple use" box is not checked, so only one implementation can be active.

Regards,

Raymond

0 Kudos

So it means that we can  implement the said badi move than once. so can we check this check box for multiple selection and in the said badi.

0 Kudos

It means that only one implementation, at most, can be active.

But of course you can develop multiple implementation, like a sample or in a landscape with multiple systems. But in a system, one implementation at most can be active.

Regards,

Raymond

0 Kudos

If i add the new code in the implemented badi it should start work I think so but it is still not working. Sorry for late reply I was busy in some other taks.

Regards

former_member195270
Active Participant
0 Kudos

Yes you can do multple implemenations for the BAdi.You can see example imlemenation class CL_EXM_IM_ME_PROCESS_PO_CUST of this BAdi.It will help you.

0 Kudos

I have checked all the methods but it is not working I don't know what is the reason I have already delte the badi and create a new one, I have added my code in the old badi and then transport it to QA it is still not working on the QA and very strange that it is still triggering on DEV and Sand Box. Still not be able to resolve the problem.

Regards,

0 Kudos

Hello Zahid,

       i checked the same BADI in my system. following points to say.

1. the BADI is not multiple use so at a time you can have only one active implementation.

so if you have to implement it two times ( which is not possible ) kindly rearrange the logic so that you can put it in one implementation itself.

2. In the system where you are finding that the implementation is not running kindly see the Runtime Behaviour : it should be ( "the implementation will be called") if not the badi implementation will not be called.

Regards

Animesh Sundriyal

0 Kudos

in QA  goto se18 check implementations overview for your BADI and see whether the one implementation you are seeing  is active or not(may be some other implementation is currently active in QA) , only one can be active at one time.....

0 Kudos

Dear Manoj,

             I have checked that is very strange one of the other implementation is also present at QA but it dosent exist on DEV now wht will be your suggestion for that. How will I delete that other implementation which is already exist on QA I have deleted the Transport requests as well.

Regards,

0 Kudos

you can check the TR in the implementation and see , what happened to that TR in development , and how its changes get deleted in DEV , may be someone deleted it in DEV and also  deleted the TR (not sure how this condition came)...
one thing you could do is create an implementation in dev same name which is currently active in QA , and then activate and deactivate it in the transport and send that transport, it should deactivate the implementation in QA i hope...

0 Kudos

Dear Manoj ,

Thanks the problem is resolved.

0 Kudos

great

0 Kudos

Dear Manoj,

     I have been trying to change the same badi. I am in full mess right now. Now the only badi which exist on the QA is the one in which I have been making change that is zme_process_po_cust. I have deleted this badi many times and created it with the same name but no affect is coming I dont know why the badi is now not even triggering on QA i have checked the other implementation for the same badi no other implementation exist. Now wht i just want to trigger my badi the old one on PRD is working fine. if you could help me in this regard. I wil be very greatful.

regards,

0 Kudos

when you see this BADI implementation in QA what is the state of the BADI implementation is Active or Inactive?

There will be a runtime behaviour field when you open the implementation which should be Implementation will be called

It will only trigger if it is in Active state.....

0 Kudos

Dear manoj,

here is the screen short of my badi at QA. it is totaly active. As you can see the badi is active.

0 Kudos

ok , now can you go onto the method which you have overridden and put a breakpoint there, and then try to see whether it gets triggered or not.....
which method is that you are trying to implement and the steps that you are taking to trigger it....

0 Kudos

Dear Manoj,

I have put the session break point it is still not going. below  is the history tab image it has already been adjusted. But it is not calling i wouldn't be able to understand.

I have already put the break point at header level as well as on the line item level. But still it is  not working. Now both the methods Header and item level both are implemented but it is not calling  any one. I have been using the session break point. the thing is that I have used the cl_exithandler class as well to find out that whether it is calling the badi are not, The badi  is not  calling there.

Regards

0 Kudos

can you go to FM MEPOBADI_INITIALIZE
and put a breakpoint inside it...
when you open the transaction(ME22N) this should have been initialized with the references.

and check that the second instance me_process_po_cust is coming or not.

once this is there goto Include LMEPOBADIUXX , you will see for every method there is an include here , now the method you have implemented go inside that include and set a breakpoint there. If this goes then you can see there will be a CALL METHOD l_instance_cust->your method, by pressing F5/F6 you can reach there and see why this is not getting triggered....

0 Kudos

Dear Manoj,

         Thank you very much for your support and time. I have got the problem some how the implementation which i have created the related class and its method was still there even though I have deleted the badi and its implementation as well. I have used Class cl_exithandler in which I have found out that the class which has been created for  my implementation was still calling the badi ME_PROCESS_PO_CUST. I deleted that CL_IM_H_PO_ITEM_FIELD_SEL class and transport it to QA now it starts triggring the 1st class and my related code is working now. Thanx for the support and all the time given by all of you. You can see the class CL_IM_H_PO_ITEM_FIELD_SEL in below snap which wa calling for that particular badi. Now the implementation name is ZME_PROCESS_PO_CUST and its class name is ZCL_IM_ME_PROCESS_PO_CUST. In the below snap it was calling my 2nd implementation class.