Skip to Content
avatar image
Former Member

BAPI_BATCH_CREATE

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.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Jan 13, 2015 at 10:07 PM

    Hi,

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

    cheers

    Paul

    Add comment
    10|10000 characters needed characters exceeded

  • Jan 14, 2015 at 06:49 AM

    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.

    Add comment
    10|10000 characters needed characters exceeded

  • Jan 14, 2015 at 01:40 PM

    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

    Add comment
    10|10000 characters needed characters exceeded