Skip to Content
author's profile photo Former Member
Former Member

Changing net weight on a Batch Sub-item (outb. delivery)

Hi !

From a report I have to change the Net weight on a Batch Sub-item on an outbound delivery !

I use BAPI 'BAPI_OUTB_DELIVERY_CHANGE' but I can't make it work... Does anybody know which parameters and tables I have to fill out when calling the BAPI

/Kenneth

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Jan 19, 2005 at 12:40 PM

    Hi Kenneth,

    Could you post the piece of coding you are using and be a bit more specific about the error you are getting right now?

    Regards,

    John.

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi !

      I can change the Delivery quantity on the batch sub-item...but when a try to change the Net weight on the same batch sub-item from eg. 850 kg to 853 kg the Net weight field is blank when the delivery has been updated..

      I don't know if I have filled out the right fields in my internal table it_item_data...??

      Table u_it_data contains the items that should be changed...both the main item 000010 and the batch sub-items...(900001, 900002)!

      Here is my code !

      LOOP AT u_it_data INTO wa_data.

      IF wa_data-hieraritem = wa_data-posnr AND

      wa_data-batchsp = 'X'.

      • this is the main-position (000010)

      wa_item_data-deliv_numb = wa_data-vbeln.

      wa_item_data-deliv_item = wa_data-posnr.

      wa_item_data-material = wa_data-matnr.

      wa_item_data-sales_unit = wa_data-vrkme.

      wa_item_data-sales_unit_iso = wa_data-vrkme.

      wa_item_data-base_uom = wa_data-meins.

      wa_item_data-unit_of_wt = wa_data-gewei.

      wa_item_data-fact_unit_nom = wa_data-umvkz.

      wa_item_data-fact_unit_denom = wa_data-umvkn.

      wa_item_data-batch = wa_data-charg.

      APPEND wa_item_data TO it_item_data.

      wa_icontrol-deliv_numb = wa_data-vbeln.

      wa_icontrol-deliv_item = wa_data-posnr.

      wa_icontrol-volume_flg = 'X'.

      wa_icontrol-gross_wt_flg = 'X'.

      wa_icontrol-chg_delqty = 'X'.

      wa_icontrol-net_wt_flg = 'X'.

      APPEND wa_icontrol TO it_icontrol.

      ELSE.

      • this is the Batch Sub-items (900001, 900002)

      wa_item_data-deliv_numb = wa_data-vbeln.

      wa_item_data-deliv_item = wa_data-posnr.

      wa_item_data-net_weight = wa_data-weight.

      IF wa_data-batchsp = 'X'.

      wa_item_data-dlv_qty = wa_data-lfimg.

      wa_item_data-dlv_qty_imunit = wa_data-lfimg.

      ELSE.

      wa_item_data-dlv_qty = wa_data-kcmeng.

      wa_item_data-dlv_qty_imunit = wa_data-kcmeng.

      ENDIF.

      wa_item_data-hieraritem = wa_data-hieraritem.

      wa_item_data-batch = wa_data-charg.

      wa_item_data-usehieritm = '1'.

      wa_item_data-material = wa_data-matnr.

      wa_item_data-sales_unit = wa_data-vrkme.

      wa_item_data-sales_unit_iso = wa_data-vrkme.

      wa_item_data-base_uom = wa_data-meins.

      wa_item_data-unit_of_wt = wa_data-gewei.

      wa_item_data-fact_unit_nom = wa_data-umvkz.

      wa_item_data-fact_unit_denom = wa_data-umvkn.

      APPEND wa_item_data TO it_item_data.

      wa_icontrol-deliv_numb = wa_data-vbeln.

      wa_icontrol-deliv_item = wa_data-posnr.

      wa_icontrol-chg_delqty = 'X'.

      wa_icontrol-net_wt_flg = 'X'.

      APPEND wa_icontrol TO it_icontrol.

      ENDIF.

      CLEAR: wa_icontrol,

      wa_item_data.

      ENDLOOP.

      CALL FUNCTION 'BAPI_OUTB_DELIVERY_CHANGE'

      EXPORTING

      header_data = wa_hdata

      header_control = wa_hcontrol

      delivery = u_delivery

      techn_control = wa_tech

      TABLES

      • HEADER_PARTNER =

      • HEADER_PARTNER_ADDR =

      • HEADER_DEADLINES =

      item_data = it_item_data

      item_control = it_icontrol

      • ITEM_SERIAL_NO =

      • SUPPLIER_CONS_DATA =

      • EXTENSION1 =

      • EXTENSION2 =

      return = it_return

      • TOKENREFERENCE =

      .

      Regards,

      Kenneth

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.