‎2009 Feb 12 10:28 AM
Hi all,
I'm just trying to send standard LOIPRO idoc when a process order is saved on COR1 / COR2 transactions. First of all I've decided to do it via user-exit but I've seen that the order number (AUFNR) is not determinated yet, so finally I'm doing it with the BADI WORKORDER_UPDATE (method BEFORE_SAVE) where there is all the data ok.
Until this point all goes fine. To send the standard idoc there is the program RCCLORD but as the order is not saved on the system tables I cannot do a submit, so I'm doing a call to the function where the idoc is send of the program ( CLOI_MASTERIDOC_CREATE_LOIPRO ). All seems to be ok, but finally it goes allways to a short dump because at the end of the function there is a commit instruction ( and it seems it is not possible into a BADI (sy-oncom = P) ).
There is a easy way to do it or am I on the correct way?
I'm trying a lot of possibilities ( and it doesn't work for distinct causes ) but allways the start point is the avobe process.
Many thanks in advance.
Legoles_
‎2009 Feb 12 2:54 PM
Hi,
The question is do you wanted to send the process order information instantanously? I had the same situation in my company and there was no easy way I found. I have written a bacth program (scheduled in back ground for every 5 minutes). This batch program will select the "changed" process orders (either created in COR1 or changed in COR2) and will send send the details to legacy system.
Please let me know,
Thanks
Nagarajan
‎2009 Feb 12 2:54 PM
Hi,
The question is do you wanted to send the process order information instantanously? I had the same situation in my company and there was no easy way I found. I have written a bacth program (scheduled in back ground for every 5 minutes). This batch program will select the "changed" process orders (either created in COR1 or changed in COR2) and will send send the details to legacy system.
Please let me know,
Thanks
Nagarajan
‎2009 Feb 13 7:30 AM
Yes, it is just it, the customer wants the process order sended inmediatly to a external system, and I your solution has been evaluated and they don't want it. I've just solved it yesterday last hour with a "similar" bad solution but it was approved. We have coppied the standard function CLOI_MASTERIDOC_CREATE_LOIPRO and all the commits has been removed. It works perfect and we assume the danger of standard code copy.
Many thanks!
I will not close the post waiting if there is a better solution.
‎2010 Jun 11 9:46 AM
It is working fine on production. No better solution finded.