cancel
Showing results for 
Search instead for 
Did you mean: 

BAPI_PO_CREATE1 No Error But Not Creating

Neithan
Participant
0 Kudos
554

Hey Everyone ,

I'm trying to create PO with BAPI_PO_CREATE1. I don't get any errors, but when I look at the EKKO table with the document number, there is no record. 

I use the function in LOOP, and in each attempt it creates the document in the 1st and 3rd loop, but it does not create the document in the 2nd loop.

It returns the same RETURN result for all three of them, but as I said, it does not create the second one, even though it says it has been created.

I would like to know your ideas . Tahnks All !

The picture of BAPI_PO_CREATE1's return ; 

Screenshot_7.png 

 

Accepted Solutions (1)

Accepted Solutions (1)

Clemenss
Active Contributor

As Sandra recommenfs: After calling a BAPI function, check the RETURN parameter. If no error is recorded, call function BAPI_TRANSACTION_COMMIT, in case of error call function BAPI_TRANSACION_ROLLBACK. This is a quite old ABAP principle: Database updates are done asynchronous in background task not before the transaction has been COMMITed. This helps to ensure database consistency if more than one database table is involved in update process. Also processing speed is gained because database updates are done in background while the processing in foreground already continues. 50 years ago this was essential.

Answers (1)

Answers (1)

Neithan
Participant
0 Kudos

It worked, thank u !