‎2015 Mar 04 8:03 PM
Hi,
I am calling BAPI_SHIPMENT_CHANGE in a loop to update shipment with fwding agent for a list of shipments. I have included a simulation flag in the report which allows user to run the report to see if there are any errors in the data. I am not calling COMMIT WORK AND WAIT when the flag is CHECKED. However what we have noticed is that the changes gets commited to database. When we do the same thing in VT02N where we back out without saving we dont see this issue.
My question is BAPI will only commit changes to DB when we use COMMIT WORK after the FM is executed successfully else it will not. I have attached the screenshot of the location where this commit work happens. I am not sure what sets -NO_COMMIT_WORK = 'X' since the BAPI does not provide this parameter. Does anybody know why this happens or is there any note (I was not able to find one)
‎2015 Mar 04 8:08 PM
Try doing a ROLLBACK if it is being run in simulation mode.
Rob
‎2015 Mar 04 8:08 PM
Try doing a ROLLBACK if it is being run in simulation mode.
Rob
‎2015 Mar 04 8:47 PM
ROLLBACK will go back until last COMMIT WORK was executed. Will not help. @Francisco pointed out to comments in the FM which indicates that should not have been used in first place.
‎2015 Mar 04 8:56 PM
Hmmm....
That's what I thought you wanted.
I missed that the COMMIT was happening in the BAPI; so I see why it wasn't what you wanted.
Anyway, see note 1083509.
Rob
Message was edited by: Rob Burbank
‎2015 Mar 04 8:33 PM
I have the 6.0 version of SAP and the BAPI shows this message:
************************************************************************
* CAUTION *
* This function module is not released officially. *
* It is not implemented in normal applications *
* and is not well tested. *
* (This function module is only implemented to store the knowledge *
* for later use) *
************************************************************************
You have the change a lot of objects to have a test mode, because the internal code set the activities_no_commit_work in false value.
‎2015 Mar 04 8:44 PM
Yes. That variable is set to false. I am now wondering if this BAPI should not be used at all now that you pointed out the comments.