Skip to Content
0
Former Member
Oct 09, 2006 at 03:24 AM

please help with this bapi

77 Views

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.