cancel
Showing results for 
Search instead for 
Did you mean: 

Generate Production Order idocs using RCCLORD when the Order is saved

0 Kudos

I have a requirement to create idoc for a Production order when it is saved. My two options are the following both of which are having issues....

Option1. Call RCCLORD as a submitted job in background and run it every 20 minutes or so. I am using selections Plant, Actual Release Date, Logical system and message type. Problem is that whenever the Program is called, it creates idocs with the same Production Order again and again if a new Production order is created. Is there a solution for this?

Option 2. using user exit, EXIT_SAPLCOBT_001(PPCO0001), submit RCCLORD with Order Number. Problem is that, since the data is not saved at this point, it does not create the idoc. Is there any other user exit I can use? Also, I am trying to avoid to create a submitted Program to run RCCLORD and run when the locks are out. This causes authorization issues for submitting a job for a lot of end users.

It will be appreciated if anyone can suggest a solution for this .

Thanks!

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member365886
Contributor
0 Kudos

Hi Anjana,

Just a suggestion ,incase As an alternate way if you want to avoid batch job scheduling inside Exit, Can you please check the SAVE exit -> EXIT_SAPLCOZV_001.

If you have all the data for the PP order inside this exit, you may use FM CLOI_MASTERIDOC_CREATE_LOIPRO with some relevant code/business logic to generate IDOC instead of program RCCLORD or Program RCCLTRAN

Regards,

Avik

raymond_giuseppi
Active Contributor
0 Kudos

Create a RFC enabled wrapper FM for report RCCLORD with parameter order number, in EXIT_SAPLCOBT_001 call the wrapper in backgound task or unit so it will be executed after the commit and end of update tasks.

0 Kudos

Thanks Raymond. I was trying to avoid submitting the job because of the authority issues for the end users. Any other ways to achieve this?

raymond_giuseppi
Active Contributor
0 Kudos

Create a small Z-table with the fields MANDT and AUFNR as primary key, in the exit insert the order in the table (e.g. with an update task FM or in in a ON COMMIT form) then create a periodic job with a user with required authorizations that will loop at the table records, call the standard report and delete the records.

0 Kudos

Thank you! This will work.