Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Perform on commit or Update function module

Hello Experts,

I am working on a basic requirement like sending invoice outputs as email attachment. For this i have created a Z include and attached it to NACE.

Its working fine. Further to my requirement i need update the invoice in DMS. For this i am using the same include. After sending mail part i have written code for DMS.

I am able to generate the DMS number using BAPI_DOCUMENT_CREATE2 and attaching document using CVAPI_DOC_CHECKIN.

The problem is now after calling create BAPI and chekinĀ  Bapi, i am using commit BAPI. This is generating a runtime error like not use commit statement or BAPI before system commit.

To over come this i read, update fm and perform is commit is available. Now i have created a FM, processing type as update and

inside Fm if use commit i am getting run time error, if dont use the dms number is not generating.

Please suggest how to proceed further.



Former Member

You must not use any commit either in update task or in a perform at commit form. So create a RFC enabled wrapper that will execute the BAPI and the COMMIT-WORK, and call this FM IN BACKGROUND TASK.



0 View this answer in context

Helpful Answer

Not what you were looking for? View more on this topic or Ask a question