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

Auto commit in BAPI_MATERIAL_SAVEDATA

Former Member
0 Likes
2,870

hi

i want to know whether there is an auto commit in this method BAPI_MATERIAL_SAVEDATA or do we need to explicitly commit

Correct answer will be suitably rewarded

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,815

No there is no auto commit in BAPI_MATERIAL_SAVEDATA . you have to explicitly call <b>Bapi_transaction_commit</b> function module or Bapi_transaction_rollback( for rollback in case of errors)..

Reward if usefull...

Regadrs,

Srini

8 REPLIES 8
Read only

Former Member
0 Likes
1,816

No there is no auto commit in BAPI_MATERIAL_SAVEDATA . you have to explicitly call <b>Bapi_transaction_commit</b> function module or Bapi_transaction_rollback( for rollback in case of errors)..

Reward if usefull...

Regadrs,

Srini

Read only

Former Member
0 Likes
1,815

Hello Baldeep,

#

There is no auto commit for this BAPI.

Either u need to use the FM Bapi_transaction_commit or the stmt COMMIT WORK AND WAIT.

Before commting check the retur parameter from the BAPI.

If useful reward.

Vasanth

Read only

Former Member
0 Likes
1,815

Use BAPI_TRANSACTION_COMMIT after passing the data to FM

Read only

Former Member
0 Likes
1,815

Hi Baldeep,

I think you need to call the Commit explicitly bcoz if you check out this line perform dequeue_locks on commit. I think this will take care of commiting.

Please let me know if iam wrong

Reward points if it is helpful,

Reagrds,

Kiran I

Read only

Former Member
0 Likes
1,815

Normally this Bapi commits the data to the system....Still if U want u can use BAPI_TRANSACTION_COMMIT explicity to commit or else even can write Commit Work.

Read only

Former Member
0 Likes
1,815

Hi Baldeep

There is an auto commit in this method BAPI_MATERIAL_SAVEDATA.

You <b>dont</b> have to do an explicit commit.

Thanks

Elan

Read only

0 Likes
1,815

hi elan

can u plz elaborate on what u have told.. .......what is the parameter in the method by which we can find out that it is autocommit.........

thanx in anticipation

points are guranteed if u can explain this

Read only

0 Likes
1,815

Hi Baldeep,

I dont think there is any parameter in this method which will let u know whether this method does an auto commit or not.

I normally execute the BAPI with the basic required data and check whether it is updating the database tables, and if the tables get updated then there is no need to explicitly commit or rollback, but if it does not update the database tables then I do an explicit commit.

I guess all this has got to do with the difference in creating master data and the transaction data. When ever u are using a bapi to create the master data u dont have to do an explicit commit. But when ur creating a transaction data in the database u have to do an explicit commit.

Thanks

Elan