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: 

FM or BAPI to add line item to SD Delivery

Former Member
0 Kudos

I have created a custom function module to create SD deliveries with reference to a sales order from an idoc. In the case of a batch split the requirement is to add a new line item to the delivery instead of using batch split functionality. Based on searching other threads out here I am doing the following:

1) Create delivery with reference via FM RV_DELIVERY_CREATE

2) Change or delete existing line items via BAPI_OUTB_DELIVERY_CHANGE

Is there a FM or BAPI to add a line item to an existing delivery? I am trying to avoid a BDC session. We are on ECC 5.0.

5 REPLIES 5

Former Member
0 Kudos

I am not sure ,did you try this FM : LE_MOB_DELIVERY_UPDATE

Former Member
0 Kudos

Hi Todd Walter,

Using BAPI would be good as the documentation provides a wide range of fields to cater to your requirement. As a result of which you can map the fields with ease. The documentation is provided as below with an example.

Functionality

You can use this method to change outbound deliveries in both the Enterprise Resource Planning system (ERP system) and the decentralized Warehouse Management System (WMS), according to their respective distribution to the decentralized WMS. You can make these changes in the central ERP system and in the decentralized WMS. The interface ensures that outbound delivery data planned for a comparison is identical in both systems, even after subsequent changes.

<b>Changing Header Data:</b>

Weight (gross weight and net weight)

Volume

Door

Delivery date

Delivery priority

Route

Incoterms

Unloading point

Delete delivery

You can only delete deliveries in the decentralized system and copy this deletion to the central SAP ERP system, if the decentralized WMS is an external system. For this, set the DLV_DEL indicator in the HeaderControl parameter.

<b>Changing Item Data:</b>

Quantity

Weight (gross weight and net weight)

Volume

Expiration date

Delete item

<b>Changing Partner Data:</b>

<b>Change or delete partner for a partner function</b>

<b>Change a partner's address</b>

If you want to change partner data, the system checks the Customizing settings of the other system, to see whether this type of change is permitted.

<b>Change Process Flow</b>

1. You subsequently change an outbound delivery in the central ERP system or the decentralized WMS, after the delivery was distributed to the decentralized WMS.

2. If the decentralized WMS is an SAP system, the system blocks the relevant outbound delivery in the partner system as soon as you call the change transaction.

3. When you save the changes to the outbound delivery, the system sends a synchronous change request to the connected partner system.

4. The partner system uses the synchronous change request to simulate the change, then either accepts or rejects the change request.

5. If the partner system rejects the change request, you cannot make the change. The system cancels processing and displays a relevant error message.

6. If the partner system accepts the change request, the system saves the changes to the outbound delivery in the system in which you have made the changes. It then sends an asynchronous change request to the partner system.

7. This asynchrounous change request causes the partner system to update the outbound delivery data.

8. The system removes the cross-system lock for the changed outbound delivery.

Example

If you want to change the quantity for a distributed quantity, then following entries are required for the transfer to the connected system:

In the header data of outbound delivery parameter (HEADER_DATA)

The delivery number (DELIV_NUMB)

In parameter item data of outbound delivery (ITEM_DATA)

The delivery number (DELIV_NUMB)

The delivery item (DELIV_ITEM)

The delivery quantity in sales unit (DLV_QTY)

The actual delivery quantity in base UoM (DLV_QTY_IMUNIT)

The sales unit (SALES_UNIT)

The ISO code for the sales unit (SALES_UNIT_ISO)

The base unit of measure (BASE_UOM)

The ISO code for the base unit of measure (BASE_UOM_ISO)

In the control of the outbound delivery at item level parameter (ITEM_CONTROL)

The delivery number (DELIV_NUMB)

The delivery item (DELIV_ITEM)

The Change Delivery Quantity indicator(CHG_DELQTY)

If you do not make any further entries, the system copies the material number, plant, quantities as floating point numbers, volumes, weights, and their units from the original outbound delivery document.

Parameters.

HEADER_DATA

HEADER_CONTROL

DELIVERY

TECHN_CONTROL

HEADER_PARTNER

HEADER_PARTNER_ADDR

HEADER_DEADLINES

ITEM_DATA

ITEM_CONTROL

ITEM_SERIAL_NO

SUPPLIER_CONS_DATA

EXTENSION1

EXTENSION2

RETURN

TOKENREFERENCE

Exceptions

Function Group

V50I

Reward Points.

Thanks,

Tej..

0 Kudos

hi todd..

i am facing same problem of adding line item in Delivery..if you have found solution other that BDC then please mail me at gopal.abap@gmail.com

Thanks in Advance..

regards

Former Member
0 Kudos

hi todd..

i am facing same problem of adding line item in Delivery..if you have found solution other that BDC then please mail me at gopal.abap@gmail.com

Thanks in Advance..

regards

Former Member
0 Kudos

I'am looking to do similiar thing - Add an line item to an exisiting delivery.If you have found any solution can you email me.

My email address is r_vodela@yahoo.com

Ramesh