‎2011 Sep 18 7:41 AM
Hi,
We have developed a Z transaction to post goods issue, goods reciept and confirmation of production order.We are using three BAPIs for :
Production Order header level confirmation(BAPI_PRODORDCONF_CREATE_HDR)
Goods Issue to production order (BAPI_GOODSMVT_CREATE)
Goods Receipt against production order (BAPI_GOODSMVT_CREATE)
Currently we are committing all three BAPIs one by one. We are using
BAPIs for production order confirmation cancellation and goods movement
cancellation in case of any error. This is not acceptable as per
business because it causes reversal document and consumes a number
range too.
If we use single BAPI transaction commit for all the BAPIs , it does
not work as SAP LUW gets refreshed after every BAPI. Moreover it will
write data of only last BAPI to data base or it will give some error.
Kindly suggest if we can commit all the three BAPIs in such a way that
either all gets committed successfully(without errors) or neither gets
committed whenever there is any error in any BAPI in sequence.
Regards.
‎2011 Sep 19 3:56 AM
We are using BAPIs for production order confirmation cancellation
and goods movement cancellation in case of any error.
In PP Shop Floor standard process Production order confirmation, goods issue to production and goods receipt from production are independent of each other unless you implement any badi which changed this.
So, my suggestion would be to do all the three. Normally there will not be any error in confirmation (unless you're using collective orders then you cannot confirm before the subordinate orders) and goods receipt from production. The errors are most probably gonna be in goods issue and they're collected in a table AFFW and can be manually fixed through TCode COGI.
But if you wanna do all the three only if none of them has errors you can use the WAIT option in the thread quoted by the above poster.
‎2011 Sep 18 8:32 AM
‎2011 Sep 19 3:56 AM
We are using BAPIs for production order confirmation cancellation
and goods movement cancellation in case of any error.
In PP Shop Floor standard process Production order confirmation, goods issue to production and goods receipt from production are independent of each other unless you implement any badi which changed this.
So, my suggestion would be to do all the three. Normally there will not be any error in confirmation (unless you're using collective orders then you cannot confirm before the subordinate orders) and goods receipt from production. The errors are most probably gonna be in goods issue and they're collected in a table AFFW and can be manually fixed through TCode COGI.
But if you wanna do all the three only if none of them has errors you can use the WAIT option in the thread quoted by the above poster.