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

Bapi Transaction commit

0 Likes
2,604

Hello Experts,

Can any one please tell me is there any other way to call a BAPI with out using bapi_transaction_commit to save the changes?

Regards,

Bindu

15 REPLIES 15
Read only

amol_samte
Contributor
0 Likes
2,097

Hi Bindu,

Use commit work statement after Fm call.

Regards,

Amol

Read only

0 Likes
2,097

Hi Amol,

Commit and bapi_transaction_commit both are not same.

Regards,

Madhu.

Read only

0 Likes
2,097

Hi Amol,

As i know commit and bapi_transaction_commit are not same...

bapi_transaction_commit will call a function module to refresh the buffer if previous bapi have any errors or not  ...with commit functinality

but commit_work does't have a concept of buffer...please go through the SDN once

Regards,

Bindu.

Read only

0 Likes
2,097

Hi Bindu,

Were did i said both are same????

Read only

0 Likes
2,097

Hi Amol,

Iam not saying that u said both are same ..i was just letting you know when u said the sentence

"use commit " ..

anyway if u mind then sorry

Regards,

Bindu.

Read only

madhu_vadlamani
Active Contributor
0 Likes
2,097

Hi,

As i  know there is no other option.

Regards,

Madhu.

Read only

Phillip_Morgan
Contributor
0 Likes
2,097

Hi,

Most Bapis require a separate commit/rollback so that an external application can have control over whether to save or discard the changes it has communicated to SAP. This means you can call several bapis then, if everything goes all right, commit else rollback. Hence the two (RFC) bapis for commit and rollback. If you are using one or more bapis in an ABAP program, you still need to commit or rollback. In this case, as said before, it is sufficient to use a simple ABAP commit statement.

regards,

Phillip

Read only

kesavadas_thekkillath
Active Contributor
0 Likes
2,097

Why not bapi_transaction_commit ?

Read only

Former Member
0 Likes
2,097

I agree with Kesavadas.  What is the problem you are trying solve?  Asking us for an alternative to bapi_transaction_commit is not too helpful.  Tell us why it is not working for you.

Read only

0 Likes
2,097

Hello Larry,

Here iam not facing any problem while using bapi_transaction _commit....

recently i have attended  interview there   my interviewer asked this qstn   that what is  alternative for  bapi_transaction _commit ?

he said without using  bapi_transaction_commit there is other way to work with bapi...that is what i want to know

Regards,

Bindu.

Read only

0 Likes
2,097

Hi BIndu,

We deal here with business scenarios and technical problems. Next time please do not ask an interview question. I am leaving the thread free.

Regards

Kesav

Read only

0 Likes
2,097

I personally do not know of any other way to commit DB changes performed by a bapi (that does not do a commit of it's own) other than bapi_transaction_commit or just a plain old commit statement.  Maybe the right answer to this interview question is "there is no other way".

Read only

RaymondGiuseppi
Active Contributor
0 Likes
2,097

Maybe they expected an answer like FM TRANSACTION_END with TRANSACTION_BEGIN ?

(Those FM belong to same FG than BAPI_TRANSACTION_COMMIT)

Regards,

Raymond

Read only

marcin_cholewczuk
Active Contributor
0 Likes
2,097

Hi Bindu,

The only other option of enforcing update task to be executed (and that's what Bapis are using) is to use statement SET UPDATE TASK LOCAL. With this any commit (directly in code as COMMIT WORK or any statement that lead to losing work process like GUI operation, WAIT, end of report or other) will save changes that were made by Bapi in DB.

Best regards

Marcin Cholewczuk

Read only

0 Likes
2,097

Hi Marcin,

Thank you very much for reply..its useful for me..

closing thread here now

Regards,

Bindu