2013 Feb 12 10:14 AM
Hi,
I am trying to trigger the IDOC LOIPRO whenever the user creates(COR1) a process order or changes certain fields(COR2) in a process order.
I was using exit EXIT_SAPLCOZV_001 for this purpose until now. But I started noticing, whenever I change a value through COR2, for example, total quantity, two IDOCs are triggered - usually one with the old quantity value and the second with the new quantity.
I tried using the BADI WORKORDER_UPDATE as suggested in the below link:
http://scn.sap.com/message/8574200
It still seems to be triggering it twice. I tried adding a delay to wait until the update happens, that doesn't work either.
I am submitting to program RCCLORD and returning in the above cases. Is there any way to just get one IDOC triggered everytime I make a change and save through COR2? Will calling CLOI_MASTERIDOC_CREATE_LOIPRO directly help solve the issue? Has anyone come across this issue before?
Any help would be much appreciated.
Thanks in advance,
Tabraiz.
2013 Feb 12 1:35 PM
2013 Feb 13 10:53 AM
You can Try:
1. Create 1 FM which will have import paramters required for your SUBMIT.
2. In that FM submit to RCCLORD.
3. Call this FM in Background Task in BADI WORKORDER_UPDATE.
So your FM should get executed when V1 updates are finished.
Regards
Vinit
2013 Feb 27 5:09 PM
Hi,
Thanks for the reply. My earlier solution and the above too seemed to work. The problem is solved.
Thanks,
Tabraiz
2013 Mar 20 8:31 PM
Tabraiz,
what solution you used finally ?
is it triggering two idocs or 1 idoc ?
did you use BADI : WORKORDER_UPDATE and submitting program: RCCLORD to trigger outbound idoc LOIPRO ?
Appreciate your earliest reply.
Thanks,
Mahesh
2013 Mar 20 9:38 PM
Hi Mate,
The solution to call it in IN_UPDATE did work. It is called in update task and was the appropriate place to submit to RCCLORD. It was triggering two IDOCs for a different reason which is valid too. If you're creating LOIPRO at process order save, u can use this solution.
Tabraiz.