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: 

Using BAPI_OUTB_DELIVERY_CONFIRM_DEC for batch split?

Former Member
0 Kudos

Dear All,

I have an existing DO in SAP with one line item.

I would like to use BAPI_OUTB_DELIVERY_CONFIRM_DEC to update the this line item with Batch Split.

For example, the existing line item has a material M001 with quantity 5. I need to update the DO to split this line into two batchs - qty 3 from Batch A and qty 2 from Batch B.

In the BAPI's ITEM_DATA - I filled 3 lines:

Line 1 - DO Number 1014---, Item number 00001, Material Number M001, qty 0

Line 2 - DO Number 1014---, Item number 90001, Material Number M001, qty 3, HIERAR 00001, USEHIERITM 1, Batch Batch A

Line 3 - DO Number 1014---, Item number 90002, Material Number M001, qty 2, HIERAR 00001, USEHIERITM 1, Batch Batch B

I also updated the ITEM_CONTROL with Deliv_NUMB ---, DELIV_ITEM 00001, CHG_DELQTY X, GROSS_WT_FLG X.

I get no errors after calling this BAPI and the RETURN table is empty, yet, the document was not changed!

I did a bapi call via remote and there is a commit work after the bapi call.

Best Regards,

Junwen

Message was edited by: Junwen Huang

1 REPLY 1

Former Member
0 Kudos

Hi Junwen,

Did you call the BAPI_TRANSACTION_COMMIT afterwards?

Before this the data is not saved. After that it is saved.

Regards,

Rob.