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 Coll.run.

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.

Regards,

NN

Former Member
replied

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.

Regards,

Raymond

0 View this answer in context

Helpful Answer

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