SAP documentation says that BAPIs released after 4.x will not issue commit by itself but requires a commit call by the external program (caller). However, some of the new BAPIs (e.g., BAPI_SALESORDER_CREATEFROMDAT1) got one import parameter, without_commit, which the caller can use to control the commit behavior of these BAPIs. Is the usage of commit flag in BAPIs recommended by SAP? Is it documented anywhere? Can we assume that the new BAPIs from SAP will depend on commit flag to issue commit from the BAPIs ?
The rule is as you say. No BAPI since 4.0A is supposed to issue a COMMIT WORK statement. Most BAPIs follow the rule, but not all. Some do a COMMIT WORK, some allow the application programmer to decide by offering a special parameter. This is all "wrong" according to the rule book, so your own BAPIs should not do this. If the documentation of a BAPI does not explicitly state how it deals with COMMIT WORK, you should test its behavior before using it.
Dig Deeper on SAP ABAP
Have a question for an expert?
Please add a title for your question
Get answers from a TechTarget expert on whatever's puzzling you.