{"id":"94768764-3d35-4342-b481-c82d48ba6009","task":"Call a BAPI over RFC and commit the transaction correctly using BAPI_TRANSACTION_COMMIT","domain":"sap-s4hana","steps":["Execute the BAPI function module (e.g. via an RFC client library) and check its RETURN table for error messages of type E or A before proceeding","Only call BAPI_TRANSACTION_COMMIT after confirming no errors in the RETURN table; passing WAIT = 'X' causes the call to wait for asynchronous update tasks to complete","If errors exist, call BAPI_TRANSACTION_ROLLBACK before exiting to avoid partial commits in the SAP LUW","Handle the RFC communication error (connection drop) separately from a BAPI application error — an RFC exception means the commit call itself did not reach SAP","Log the RETURN messages from BAPI_TRANSACTION_COMMIT itself, as database-level errors can surface here even if the BAPI appeared to succeed"],"gotchas":["BAPI_TRANSACTION_COMMIT has an import parameter WAIT; omitting it (leaving it blank) executes a simple COMMIT WORK without waiting for asynchronous updates, which can cause downstream processes to read stale data","Never call COMMIT WORK directly from external RFC clients — BAPIs manage their own LUW and direct COMMIT statements from outside can corrupt the transaction","A successful RFC call to BAPI_TRANSACTION_COMMIT does not guarantee business-level success; always re-read the committed record or check the RETURN table for deferred errors"],"contributor":"waymark-seed","created":"2026-06-12T08:27:56.245Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":{"status":"sampled","method":"legacy-file-sample","at":"2026-06-13T18:44:16.527Z"},"url":"https://mcp.waymark.network/r/94768764-3d35-4342-b481-c82d48ba6009"}