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: 

how to call bapi_transaction_commit in my sessionBean when icreated sales o

Former Member
0 Kudos

hi,

how to call bapi_transaction_commit

when i am creating salesorder by BAPI_SALESORDER_CREATEFROMDAT2.

After Callng that bapi i want to commit the transaction

For that i want to know how to call Transationbapi

5 REPLIES 5

Former Member
0 Kudos

Hi kalasker,

1. just like this.

DATA : ret LIKE bapiret2 OCCURS 0 WITH HEADER LINE.

CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'

EXPORTING

wait = 'X'

IMPORTING

return = ret.

regards,

amit m.

0 Kudos

HI

I am writing bapi call in a Session bean using Enterprise Connector.

I called the Bapi BAPI_SALESORDER_CREATFROMDAT2

By that i am getting sales document number.

Now i want to call BAPI_TRANSACTION_COMMIT.

How to call .

I want code

0 Kudos

Hi,

<b>BAPI_SALESORDER_CREATFROMDAT2</b> will return the <b>Return</b> table. check the return table for Error Messages.

if they are not present call the <b>BAPI_TRANSACTION_COMMIT</b> the way you are calling the above BAPI.

Regards

vijay

0 Kudos

Hi kalasker praveenkumar ,

Check your return messages. This would be an internal table with a field having type as a field.

Now

Loop at return.
 if return-type ne 'E'.
 call function 'BAPI_TRANSACTION_COMMIT'.
endif.
endloop.

this will solve your problem

Regards

Amit Kumar

Former Member
0 Kudos

hi, something in additional

when parameter 'WAIT' has been set, your application will hang on, wait the update work has finished.

It's 'COMMIT AND WAIT' in this FM.

But if it hasn't been set, your application will continue run and call this FM, and maybe the update information still haven't import into system.

thanks