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

please help with this bapi

Hi Experts!

I am trying to use 'BAPI_OUTB_DELIVERY_CONFIRM_DEC' for posting goods issue but could not succeed. I am getting the message 615 (Delivery item is not or only partially packed) when I test the same in SE37. However the same delivery, if I go to VL02n and issue post goods issue, it is succeeding. I think I am doing some mistake with the parameters to be passed to bapi. Please help me find the error as I am unable to find. I am stuck with this for pretty long time. Points assured for helpful answers.

Thanks for your time.

Krishen

DATA: itab_headerdata TYPE STANDARD TABLE OF bapiobdlvhdrcon WITH HEADER LINE.

DATA: itab_headercontrol TYPE STANDARD TABLE OF bapiobdlvhdrctrlcon WITH HEADER LINE.

DATA: itab_itemdata TYPE STANDARD TABLE OF bapiobdlvitemcon WITH HEADER LINE.

DATA: itab_itemcontrol TYPE STANDARD TABLE OF bapiobdlvitemctrlcon WITH HEADER LINE .

DATA: itab_bapiret2 TYPE STANDARD TABLE OF bapiret2 WITH HEADER LINE.

DATA: itab1_bapiret2 TYPE STANDARD TABLE OF bapiret2 WITH HEADER LINE.

DATA: itab3_bapiret2 TYPE STANDARD TABLE OF bapiret2 WITH HEADER LINE.

DATA: deliv_numb TYPE bapiobdlvhdrcon-deliv_numb.

  • Vbeln and posnr are coming from itab.

SELECT SINGLE * FROM likp

WHERE vbeln = itab-vbeln.

SELECT SINGLE * FROM lips

WHERE vbeln = itab-posnr.

itab_headerdata-deliv_numb = likp-vbeln.

itab_headercontrol-deliv_numb = likp-vbeln.

itab_headercontrol-post_gi_flg = 'X'.

CLEAR deliv_numb.

deliv_numb = likp-vbeln.

itab_itemdata-deliv_numb = likp-vbeln.

itab_itemdata-deliv_item = lips-posnr.

itab_itemdata-dlv_qty = lips-lfimg.

itab_itemdata-sales_unit = lips-meins.

itab_itemdata-fact_unit_nom = lips-umvkz.

itab_itemdata-fact_unit_denom = lips-umvkn.

itab_itemcontrol-deliv_numb = likp-vbeln.

itab_itemcontrol-deliv_item = lips-posnr.

itab_itemcontrol-chg_delqty = 'X'.

CALL FUNCTION 'BAPI_OUTB_DELIVERY_CONFIRM_DEC'

EXPORTING

header_data = itab_headerdata

header_control = itab_headercontrol

delivery = deliv_numb

  • TECHN_CONTROL =

TABLES

  • HEADER_PARTNER =

  • HEADER_PARTNER_ADDR =

  • HEADER_DEADLINES =

item_data = itab_itemdata

item_control = itab_itemcontrol

  • ITEM_SERIAL_NO =

  • SUPPLIER_CONS_DATA =

  • HANDLING_UNIT_HEADER =

  • HANDLING_UNIT_ITEM =

  • HANDLING_UNIT_SERNO =

  • EXTENSION1 =

  • EXTENSION2 =

return = itab_bapiret2.

  • TOKENREFERENCE =

CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'

EXPORTING

wait = 'X'

IMPORTING

return = itab1_bapiret2.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Oct 09, 2006 at 03:29 AM
    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 09, 2006 at 06:05 AM

    Hi Krishen

    Have done some modifications to your code. Highlighted below are the same. Please check if the same works for you.

    DATA: itab_headerdata TYPE STANDARD TABLE OF bapiobdlvhdrcon WITH HEADER LINE.

    DATA: itab_headercontrol TYPE STANDARD TABLE OF bapiobdlvhdrctrlcon WITH HEADER LINE.

    DATA: itab_itemdata TYPE STANDARD TABLE OF bapiobdlvitemcon WITH HEADER LINE.

    DATA: itab_itemcontrol TYPE STANDARD TABLE OF bapiobdlvitemctrlcon WITH HEADER LINE .

    DATA: itab_bapiret2 TYPE STANDARD TABLE OF bapiret2 WITH HEADER LINE.

    DATA: itab1_bapiret2 TYPE STANDARD TABLE OF bapiret2 WITH HEADER LINE.

    DATA: itab3_bapiret2 TYPE STANDARD TABLE OF bapiret2 WITH HEADER LINE.

    DATA: deliv_numb TYPE bapiobdlvhdrcon-deliv_numb.

    • Vbeln and posnr are coming from itab.

    SELECT SINGLE * FROM likp

    WHERE vbeln = itab-vbeln.

    SELECT SINGLE * FROM lips

    WHERE vbeln = itab-posnr.

    <b>select single kostk from vbuk into vbuk-kostk

    where vbeln = itab-vbeln

    and kostk = 'C'.

    if sy-subrc ne 0.

    • message "Picking is not fully done

    else.</b>

    itab_headerdata-deliv_numb = likp-vbeln.

    itab_headercontrol-deliv_numb = likp-vbeln.

    itab_headercontrol-post_gi_flg = 'X'.

    CLEAR deliv_numb.

    deliv_numb = likp-vbeln.

    <b>*itab_itemdata-deliv_numb = likp-vbeln.

    *itab_itemdata-deliv_item = lips-posnr.

    *itab_itemdata-dlv_qty = lips-lfimg.

    *itab_itemdata-sales_unit = lips-meins.

    *itab_itemdata-fact_unit_nom = lips-umvkz.

    *itab_itemdata-fact_unit_denom = lips-umvkn.

    *itab_itemcontrol-deliv_numb = likp-vbeln.

    *itab_itemcontrol-deliv_item = lips-posnr.

    *itab_itemcontrol-chg_delqty = 'X'.</b>

    CALL FUNCTION 'BAPI_OUTB_DELIVERY_CONFIRM_DEC'

    EXPORTING

    header_data = itab_headerdata

    header_control = itab_headercontrol

    delivery = deliv_numb

    • TECHN_CONTROL =

    TABLES

    • HEADER_PARTNER =

    • HEADER_PARTNER_ADDR =

    • HEADER_DEADLINES =

    item_data = itab_itemdata

    item_control = itab_itemcontrol

    • ITEM_SERIAL_NO =

    • SUPPLIER_CONS_DATA =

    • HANDLING_UNIT_HEADER =

    • HANDLING_UNIT_ITEM =

    • HANDLING_UNIT_SERNO =

    • EXTENSION1 =

    • EXTENSION2 =

    return = itab_bapiret2.

    • TOKENREFERENCE =

    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'

    EXPORTING

    wait = 'X'

    IMPORTING

    return = itab1_bapiret2.

    <b>endif.</b>

    Kind Regards

    Eswar

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 13, 2006 at 05:02 PM

    Hi,

    not sure if this will be any help or not - but this is what I fill when calling the same BAPI, we don't have any posting issues - maybe you could copy this filling in dummy values for the values that you dont have - then strip them out 1 by 1 until you get your error... :

    CLEAR HAND_UN_HDR.

    HAND_UN_HDR-DELIV_NUMB = P_DEL_NO.

    HAND_UN_HDR-HDL_UNIT_EXID = I_IDOC_SU-EXIDV.

    HAND_UN_HDR-HDL_UNIT_EXID_TY = 'B'.

    HAND_UN_HDR-TOTAL_WGHT = I_IDOC_SU-BTGEW.

    HAND_UN_HDR-LOAD_WGHT = I_IDOC_SU-NTGEW.

    HAND_UN_HDR-TARE_WGHT = I_IDOC_SU-TARAG.

    HAND_UN_HDR-TARE_UNIT_WT = I_IDOC_SU-GEWEI.

    HAND_UN_HDR-TOTAL_VOL = I_IDOC_SU-BTVOL.

    HAND_UN_HDR-VOLUMEUNIT = I_IDOC_SU-VOLEH.

    HAND_UN_HDR-SHIP_MAT = C_SHIP_MAT. HAND_UN_HDR-LENGTH = I_IDOC_SU-LAENG.

    HAND_UN_HDR-WIDTH = I_IDOC_SU-BREIT.

    HAND_UN_HDR-HEIGHT = I_IDOC_SU-HOEHE.

    HAND_UN_HDR-UNIT_DIM = I_IDOC_SU-MEABM.

    HAND_UN_HDR-WT_VOL_FIX = 'X'.

    APPEND HAND_UN_HDR.

    CLEAR HAND_UN_ITM.

    HAND_UN_ITM-HDL_UNIT_EXID = I_IDOC_SU-EXIDV.

    HAND_UN_ITM-HDL_UNIT_EXID_INTO = I_IDOC_SU-EXIDV.

    HAND_UN_ITM-DELIV_NUMB = P_DEL_NO.

    HAND_UN_ITM-DELIV_ITEM = P_EBELP.

    HAND_UN_ITM-PACK_QTY = P_LFIMG.

    *hand_un_itm-material = I_IDOC_ITEMS-. not needed anyway

    HAND_UN_ITM-HU_ITEM_TYPE = '1'.

    APPEND HAND_UN_ITM.

    and the call:

    Note EXT2_TAB, BAPI_RET, HDR_CTRL, HDR_DATA, ITEM_DATA and ITEM_CONTROL are just empty tables, DELIV_NUM is specified.

    We also copied the original bapi - and changed it slightly so that it does not set the decentralised flag - which prevents subsequent changes to the picking data and delivery header data - if you need to do this too - let me know by replying on this topic- and I can paste the change needed.

    CALL FUNCTION 'Z_BAPI_OUTB_DELIVERY_CONFIRM_DEC'

    EXPORTING

    HEADER_DATA = HDR_DATA

    HEADER_CONTROL = HDR_CTRL

    DELIVERY = DELIV_NUM

    • TECHN_CONTROL =

    TABLES

    • HEADER_DEADLINES =

    ITEM_DATA = ITEM_DATA

    ITEM_CONTROL = ITEM_CONTROL

    • SUPPLIER_CONS_DATA =

    HANDLING_UNIT_HEADER = HAND_UN_HDR

    HANDLING_UNIT_ITEM = HAND_UN_ITM

    • EXTENSION1 =

    EXTENSION2 = EXT2_TAB

    RETURN = BAPI_RET.

    Regards

    Sudheer

    Add a comment
    10|10000 characters needed characters exceeded

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.