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: 

BAPI_OUTB_DELIVERY_CHANGE Help - Add new line item

Former Member
0 Kudos

I am trying to use BAPI_OUTB_DELIVERY_CHANGE to add a new line item to an existing delivery automatically when a new line is added to the sales order. I can successfully use the bapi to change the order quantity of an existing line but cant get it to add a new line. Thoughts?

What fields are required? Currently I am passing it:

CALL FUNCTION 'BAPI_OUTB_DELIVERY_CHANGE'

EXPORTING

TECHN_CONTROL = it_tech

HEADER_DATA = it_header

HEADER_CONTROL = it_hdr_cont

DELIVERY = gp_delivery

TABLES

NEW_ITEM_DATA = it_new_item

NEW_ITEM_ORG = it_new_item_org

RETURN = it_return

.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Dear Kyndal Copley,

Did you fill in the following fields?

it_new_item-deliv_numb

it_new_item-deliv_item

it_new_item-material

it_new_item-dlv_qty

it_new_item-fact_unit_nom

it_new_item-fact_unit_denom

item_control-deliv_numb

item_control-deliv_item

item_control-chg_delqty

I think you miss out the item_control table

8 REPLIES 8

Former Member
0 Kudos

Hi,

I want to add new items in the existing Inbound delivery. I thought I am planning to use

BAPI_INB_DELIVERY_CHANGE. But It is not useful.

please suggest any FM to add new items in the existing delivery.

Thanks in advance.

shar

Former Member
0 Kudos

Dear Kyndal Copley,

Did you fill in the following fields?

it_new_item-deliv_numb

it_new_item-deliv_item

it_new_item-material

it_new_item-dlv_qty

it_new_item-fact_unit_nom

it_new_item-fact_unit_denom

item_control-deliv_numb

item_control-deliv_item

item_control-chg_delqty

I think you miss out the item_control table

0 Kudos

Thanks for the replies.

There ended up being a couple reasons why although the BAPI worked easily to change the quantity of the delivery based on the sales order, there were issues when adding a new line. The reference docs, ie sales order number and item, aren't available to be passed and so I had to edit the BAPI as well as some additional tweaks. Once updated, i was able to get this working.

Thanks, Kyndal

0 Kudos

Hi Kyndal!

Please share how you customized BAPI_OUTB_DELIVERY_CHANGE to add new line items.

Thank you!

0 Kudos

Hi Kyndal,

how did you change the standard FM?

thanks a lot

Juraj

Former Member
0 Kudos

Hi Kyndal, it would be great if you could provide an example on how you filled the parameters of the function module to add a new item to the delivery.

Thank you very much, best regards, Martin

0 Kudos

Hi Kyndal,

I have a requirment to add new items in a delivery which will refer to the higher items in the same delivery itself.

I am trying to use the BAPI BAPI_OUTB_DELIVERY_CHANGE for the purpose.

Could u pls give some clue on how to tried to do it?

I am constantly getting a error VL216.

Also I tried passing the reference document and item : same delivery number and the higher level item in the delivery

VBTYP_N = J

0 Kudos

Hi All,

How was it possible to pass the reference document in this FM? I have the same requirement.

Thanks.