Application Development 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: 

a strange problem about original file upload

Former Member
0 Kudos

hello,

write a function to upload original of document master,

test user: test_user

importing parameter:dokar,doknr,doktl,dokvr

processing:

1. delete document master's having original file,and commit work with function BAPI_DOCUMENT_CHANGE2;

2.upload new original file with function BAPI_DOCUMENT_CHANGE2 too.

now problem is :

when I tested the function in execute (F8), return error is:

document is freezed by test_user

and result is original wasn't uploaded.

but,when I tested it in debug(Ctrl +F7), result is right,no any problem.

this situation is caused what reason?

please help me.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

HI,

Are you using BAPI_transaction_commit function to commit the deletion of records to the data base.

After that, you use the new Bapi function to change the records. andn then again using bapi_transaction_commit to commit the changes.

Regards,

Venkatesh.

3 REPLIES 3

Former Member
0 Kudos

HI,

Are you using BAPI_transaction_commit function to commit the deletion of records to the data base.

After that, you use the new Bapi function to change the records. andn then again using bapi_transaction_commit to commit the changes.

Regards,

Venkatesh.

0 Kudos

hello,

but after BAPI was executed, if no error,then executed COMMIT WORK. so felt bapi_transaction_commit is similar with COMMIT WORK.

but I will try bapi_transaction_commit on my coding.

thank you.

best regards.

Chengjihui.

Former Member
0 Kudos

Hi,

In function module BAPI_TRANSACTION_COMMIT pass the parameter WAIT = 'X'.

It should work.

Thanks,

radha.