Application Development and Automation 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: 
Read only

Process Order Creation/Modification BADI

Former Member
0 Likes
1,638

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_

1 ACCEPTED SOLUTION
Read only

nagarajan_ramudu
Active Participant
0 Likes
1,216

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

3 REPLIES 3
Read only

nagarajan_ramudu
Active Participant
0 Likes
1,217

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

Read only

0 Likes
1,216

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.

Read only

Former Member
0 Likes
1,216

It is working fine on production. No better solution finded.