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: 

BAPI_BATCH_CREATE

Former Member
0 Kudos

Hi All,

I am using  BAPI_BATCH_CREATE to create batch...after using the statement  BAPI_TRANSACTION_COMMIT and passing wait = "X" to save the data at database level.

After this select statement is written on MCHA table to check newly created batch and getting the info of Internal object no(CUOBJ_BM).

When I go in debug mode....everything is fine and getting the CUOBJ_BM field info and also batch is created in MCHA table.

BUt when we ran the transaction directly...we are not able to get the batch info from MCHA table.

Note: I don't want to use wait upto statement for this.

I use DO...ENddo also.

Is there any reason why it is not saving in database level even when we are using BAPI_TRANSACTION_COMMIT?

Regards,

Ramu Dhannarapu.

3 REPLIES 3

paul_bakker2
Active Contributor
0 Kudos

Hi,

I don't know this table, but could be that the SELECT is using buffered data. Try using SELECT .. BYPASSING BUFFER.

cheers

Paul

former_member182915
Active Contributor
0 Kudos

Hi,

you have to use wait up to one sec. Some time system take some time to update standard table

Plz confirm that wait up to 1 sec is give solution or not.when u in debug mode it get that few sec so u get success in select query.

bapi call

wait up to 1 sec.
bapi commit.

raymond_giuseppi
Active Contributor
0 Kudos

There may be some delay between end of commit and actual update of database, so use some BYPASS BUFFER option, you could add a delay, but for performance, only WAIT up to 1 seconds when unsuccessful. (e.g. DO 2-3 TIMES/SELECT/IF successful EXIT/Else WAIT UP TO 1 seconds/ENDDO)

Regards,

Raymond