2008 Jan 11 11:02 AM
HI all.
I use BAPI_SALESORDER_CREATEFROMDAT2 to create orders. When creating
rush orders the system automatically creates a corresponding delivery for the order.
After I call the commit BAPI I try to read the created delivery from VBFA. But it often happens
that the VBFA update is not done synchronously which means I cannot find my delivery in VBFA.
I do not want to do a loop and select 10 times from VBFA till the delivery can be found.
Do you know any other way of getting the delivery directly after creating the order with this BAPI?
The BAPI returns the delivery number as message variable in the return parameter. But using it does smell bad to me.
Thanks and cheers,
Sascha
HI all.
I use BAPI_SALESORDER_CREATEFROMDAT2 to create orders. When creating
rush orders the system automatically creates a corresponding delivery for the order.
After I call the commit BAPI I try to read the created delivery from VBFA. But it often happens
that the VBFA update is not done synchronously which means I cannot find my delivery in VBFA.
I do not want to do a loop and select 10 times from VBFA till the delivery can be found.
Do you know any other way of getting the delivery directly after creating the order with this BAPI?
The BAPI returns the delivery number as message variable in the return parameter. But using it does smell bad to me.
Thanks and cheers,
Sascha
2008 Jan 11 1:13 PM
When calling BAPI_TRANSACTION_COMMIT pass the WAIT parameter as 'X', that will execute a COMMIT WORK AND WAIT.
Regards,
Michael
2008 Jan 11 1:17 PM
Hi Michael.
Thanks but the flag is already set to X.
I get the order number and the order exists in database. What is missing is everything about the delivery ... no lips no likp no vbfa ...
Seems that the internal commit for the delievry tables is done somehow later. Could this be?
I thought when calling Bapi_Transaction_Commit everything of the actual workprocess gets committed.
Cheers,
Sascha
Edited by: Sascha Dingeldey on Jan 11, 2008 2:17 PM
2008 Jan 11 2:05 PM
Hello Sascha,
That was my understanding as well. The commit work and wait is supposed to wait until everything is posted and completed and only then continue.
One reason why that happens might be that the actual delivery creation is done is a separate LUW and that's why the commit work and wait doesn't recognize that process.
I know that doesn't really help you but at least it would explain why it happens.
Sorry,
Michael
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |