cancel
Showing results for 
Search instead for 
Did you mean: 

Production order release and confirm at same time

0 Kudos

Hi,

We are creating a production order in CO01 and then release it in CO02.

Our requirement is: when user click on release button (in CO02) and save it then production order phase '0020' should get confirmed.

To fulfill this we have tried using Customer Exit fm EXIT_SAPLCOZV_001 and BADI WORK_ORDER_UPDATE( methods AT_RELEASE and AT_SAVE). We are currently using FM 'CO_RU_CONFIRMATION_PREPARE' to confirm but when we call this FM in exits and Bad ,we get the error that Production order is not yet released.

we also tried calling this FM inside wrapper Update FM but still does not work.

Please provide any suggestion.

Accepted Solutions (1)

Accepted Solutions (1)

raymond_giuseppi
Active Contributor
0 Kudos

'we also tried calling this FM inside wrapper Update FM but still does not work.'

Don't use an update FM as wreapper but a RFC enabled FM and call it in BACKGROUND TASK so executed after the main commit/update task, when order released in database.

(Also replace the FM with a released BAPI)

NB: Other solution could be call of a FM at an event triggered by order release (SWO1, BSVZ)

Answers (1)

Answers (1)

rupesh_brahmankar3
Active Contributor
0 Kudos

Hello,

Yes that's correct behavior, for confirmation of order or operation, order or operation must be released.

You should call order confirmation FM after order release saved.

Best Regards,

R.Brahmankar

0 Kudos

Can you please share the Customer exit or BADI that would trigger after release process is updated in the database?

rupesh_brahmankar3
Active Contributor
0 Kudos

Hello,

The recommended way is to use enhancement PPCO0001 you should carry out follow-up actions based on the status changes

contents of the STATUS_TABLE and STATUS_TABLE_OLD tables are equal, you cannot carry out the actions. If order is REL then trigger CO_RU_CONFIRMATION_PREPARE' to confirm operation.

Best Regards,

R.Brahmankar