2019 Jun 10 3:44 PM
Hi All,
I'm using BAPI_DELIVERYPROCESSING_EXEC to create an inbound delivery with batch split. The problem is that the program sometimes runs fine and creates only one inbound delivery (as it's supposed to do) and sometimes it creates two deliveries even if it's being called only once (I checked in debug and the program only goes once through the bapi). The input data for the bapi is always the same, only the result it returns sometimes is wrong. No error is returned.
At this point the problem seems random. I can't find a pattern. When the program doesn't run correctly, usually, one delivery contains the parent item with maybe one batch as a child, and the second delivery contains the rest of the batches with no parent. Basically, it splits the data that should have been used for creating only one delivery, into two different deliveries.
The batches are created using BAPI_BATCH_CREATE before the creation of the inbound delivery. While testing, I have noticed that when the program skips the creation of batches, the result seems to always be the right one.
After executing each bapi, I run BAPI_TRANSACTION_COMMIT with commit and wait. These are the only parameters I give to the function:
CALL FUNCTION 'BAPI_DELIVERYPROCESSING_EXEC'
TABLES
request = ut_request
createditems = ct_items
item_serial_no = ct_item_serial_no
return = ct_return
EXCEPTIONS
error_message = 99.
Any idea what goes wrong inside BAPI_DELIVERYPROCESSING_EXEC or how I could fix the problem?
Hi All,
I'm using BAPI_DELIVERYPROCESSING_EXEC to create an inbound delivery with batch split. The problem is that the program sometimes runs fine and creates only one inbound delivery (as it's supposed to do) and sometimes it creates two deliveries even if it's being called only once (I checked in debug and the program only goes once through the bapi). The input data for the bapi is always the same, only the result it returns sometimes is wrong. No error is returned.
At this point the problem seems random. I can't find a pattern. When the program doesn't run correctly, usually, one delivery contains the parent item with maybe one batch as a child, and the second delivery contains the rest of the batches with no parent. Basically, it splits the data that should have been used for creating only one delivery, into two different deliveries.
The batches are created using BAPI_BATCH_CREATE before the creation of the inbound delivery. While testing, I have noticed that when the program skips the creation of batches, the result seems to always be the right one.
After executing each bapi, I run BAPI_TRANSACTION_COMMIT with commit and wait. These are the only parameters I give to the function:
CALL FUNCTION 'BAPI_DELIVERYPROCESSING_EXEC'
TABLES
request = ut_request
createditems = ct_items
item_serial_no = ct_item_serial_no
return = ct_return
EXCEPTIONS
error_message = 99.
Any idea what goes wrong inside BAPI_DELIVERYPROCESSING_EXEC or how I could fix the problem?
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |