Application Development 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: 

CO01 - where does the reservation get created?

Former Member
0 Kudos

I've searched forums for this specific question and not had much luck so far.

My requirement is to send the updated ATP information for the Production Order components after a Production order is created, released or deleted.

I already have a working function that returns the ATP values for each component, but all the exits and BAdIs that I've tried are too early in the CO01 process (i.e. they are triggered before the reservation gets created).

I need to call my function somewhere in the CO01 processing logic *after* the reservation gets created, so I have the updated ATP values to send.

So far, I've tried most of the exits

Specifically, PPCO0001, PPCO0007, PPCO0008, PPCO0023.

I've tried most of the methods of BAdI WORKORDER_UPDATE

(e.g.  WORKORDER_UPDATE~IN_UPDATE, WORKORDER_UPDATE~BEFORE_UPDATE, WORKORDER_UPDATE~AT_SAVE

I even tried calling my function in update task to put it last in the update stack (hopefully after the commit of the reservation, but it doesn't seem to work that way either).

Is there a place in the CO01 logic that I can enhance to call my function *after* the reservation gets created (or modifies the ATP values)?

Thanks

Jeremy H.

1 ACCEPTED SOLUTION

Caetano
Product and Topic Expert
Product and Topic Expert

Hello

BAdIs and exits are usualy called before the database update, as they are generally used to update or check data that will be posted.

Table RESB is saved on form RESB_POST of program LCOVBF10 and you can check if there is any place to your enhancement here.

Be very careful, as a modification here may lead to update terminations or inconsistent data saved to the database.

BR
Caetano

4 REPLIES 4

Caetano
Product and Topic Expert
Product and Topic Expert

Hello

BAdIs and exits are usualy called before the database update, as they are generally used to update or check data that will be posted.

Table RESB is saved on form RESB_POST of program LCOVBF10 and you can check if there is any place to your enhancement here.

Be very careful, as a modification here may lead to update terminations or inconsistent data saved to the database.

BR
Caetano

Former Member
0 Kudos

Thanks - I've placed an enhancement in there at the end of the FORM, and will use caution.  Debug won't go in there, so I'll have to see what structures are available in there that are similar to CAUFVB and RESBB (header and component table).

Thank you for the advice.  I'll see how it works.

Caetano
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hello

This program is called in update mode. If you activate update debugging you will be able to analyze the program execution in debug.

You can activate update debugging on the menu 'settings', 'change bebugger profile/settings' on the debugger.

BR
Caetano

Former Member
0 Kudos

The enhancement location that you indicated worked well for our requirement.  The RESB table had properly been adjusted, so I was able to carry on the other logic needed to send the proper ATP amounts.  Thanks again for the help.