Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

wrapper FM to commit transaction in BADI

Former Member
0 Likes
958

Hello All,

what is a wrapper FM? how do I create one? I need to commit the transaction in a BADI method. But Since I cannot commit in BADI, I want to create a FM and call that in update task in BADI. Anyone has any other ideas? How do I commit a transaction in BADI?

Thanks,

Chandni

Hello All,

what is a wrapper FM? how do I create one? I need to commit the transaction in a BADI method. But Since I cannot commit in BADI, I want to create a FM and call that in update task in BADI. Anyone has any other ideas? How do I commit a transaction in BADI?

Thanks,

Chandni

2 REPLIES 2
Read only

uwe_schieferstein
Active Contributor
0 Likes
612

Hello Chandni

A BAdI is called within the flow of a transaction, thus you should (must) not do a COMMIT WORK here.

For example, if you want to call a function module (FM) on a remote system but it is not RFC-enabled then you would need a wrapper function module. The wrapper has the same interface as the FM yet is defined as RFC-enabled. Within the wrapper you simply call the FM.

I really cannot say what happens if you call your function module IN UPDATE TASK within the BAdI method. You have to try it out and see what happens if the transaction is either finished (i.e. committed) or cancelled (i.e. rollback).

Regards

Uwe

Read only

Former Member
0 Likes
612

Wrapper FM will contain the same interface as the BADI which you are encapsulationg. After calling the BADI, BAPI_TRANSACTION_COMMIT in your wrapper fm. Read the documentaion of BAPI_TRANSACTION_COMMIT