02-12-2009 9:30 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 ).
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_
05-01-2009 9:49 AM
Hi,
Check this program which is a modification of the SAP Standard Program.
https://wiki.sdn.sap.com/wiki/display/Snippets/ProductionOrderIdoc+Program
cheers
Aveek
05-01-2009 4:14 AM
Bump This Thread Up!
I have the same requirement!
I want to immediately trigger the outbound LOIPRO IDOC when someone creates/changes a PP Order in the CORn transactions.
Any one know how to do this without resorting to batchjobs?
Thanks!!!
05-01-2009 4:43 AM
Ok, I believe I have this solved...
CORn
--> Create or change a PP order, release and save
BADI WORKORDER_UPDATE~BEFORE_UPDATE
--> Do your checks and call a custom function module (ZZ_SEND_IDOC) sending the aufnr, matnr, and werks. Cal this FM starting new task destination 'none'.
ZZ_SEND_IDOC (RFC-enabled)
--> wait up to 60 seconds (so update finishes)
--> add code to see if the record is no longer locked
--> Fill parameter table rsparams with aufnr, matnr, werks, logical system, and mess type
--> submit RCCLORD and return
parallel processing rules say you should not use a submit in the FM but it is working for me.
With this I can avoid using batch jobs to send these out. Yay.
04-27-2016 11:26 AM
Hello, i have done the same thing( Submit program RCCLORD with parameters) but it does not work.
Could you please help?Do you think it has anything to do with authorization on the program RCCLORD?
05-02-2016 6:37 AM
Problem solved!
Had to add "FREE MEMORY ID 'LOIAUFNRTAB' " before doing the submit.
05-01-2009 9:49 AM
Hi,
Check this program which is a modification of the SAP Standard Program.
https://wiki.sdn.sap.com/wiki/display/Snippets/ProductionOrderIdoc+Program
cheers
Aveek
05-04-2009 7:33 AM
I all.
Thanks for your answers, this is an old problem finally resolved as it says on the last one, we had created a Z FM which process the idoc outbound. This is because the submit to the RCLORD program was not a good way because our client wants an inmmediatly information between R3 and PI without the wait of 60 seconds nor the possible wait to a blocking status...
Thanks a lot, I will close de thread but for future readers say that we still don't know if it is really possible to do what we want without the standard code modification.
Kind regards,
12-28-2009 10:34 PM
Hi I have exactly the same requirement and I am strill not able to find the solution, Can you please let me know, How you did it?
06-18-2011 7:57 PM
Hello,
Do you remember how you solve this problem? We are facing the same problem and I can't find an answer.
Thanks,
Sara