Skip to Content
0
Former Member
Apr 23, 2007 at 05:01 PM

WS_DELIVERY_UPDATE

143 Views

Hi ,

I am posting my code where i am trying to pack the delivery with handling unit but unable to do so, trying to execute the same functionality as VL32N:

*&---------------------------------------------------------------------*
*& Report  ZGUNJ_PACK_1
*&
*&---------------------------------------------------------------------*
*&
*&
*&---------------------------------------------------------------------*

REPORT  zgunj_pack_1.
DATA: vbkok_wa LIKE vbkok,
delivery LIKE likp-vbeln,
verko_tab TYPE STANDARD TABLE OF verko,
wa_verko TYPE verko,
verpo_tab TYPE STANDARD TABLE OF verpo,
wa_verpo TYPE verpo.
*wa_id_tab LIKE zkomi_id_tab.

DATA: e_any TYPE xfeld,
e_item TYPE xfeld,
e_pod_update TYPE xfeld,
e_interface TYPE xfeld,
e_goodsissue TYPE xfeld,
i_exidv TYPE vekp-exidv VALUE '00000000001000000089',
i_vbeln TYPE likp-vbeln VALUE '3000002101',
e_fcheck TYPE xfeld.

UNPACK i_exidv TO i_exidv.

vbkok_wa-vbeln_vl = i_vbeln.
delivery = i_vbeln.

SELECT SINGLE vhilm exidv INTO CORRESPONDING FIELDS OF wa_verko
FROM vekp
WHERE exidv EQ i_exidv.
wa_verko-object = '01'.
wa_verko-objkey = i_vbeln.

APPEND wa_verko TO verko_tab.

*LOOP AT it_id_tab INTO wa_id_tab.

SELECT SINGLE vbeln
posnr
lfimg
meins
FROM lips
INTO (wa_verpo-vbeln,
wa_verpo-posnr,
wa_verpo-tmeng,
wa_verpo-vrkme)
WHERE vbeln EQ i_vbeln.
*  AND matnr EQ wa_id_tab-matnr
*  AND charg EQ wa_id_tab-charg.

wa_verpo-exidv_ob = i_exidv.

APPEND wa_verpo TO verpo_tab.
*ENDLOOP.
break gkamur.
CALL FUNCTION 'HU_PACKING_REFRESH' .

CALL FUNCTION 'WS_DELIVERY_UPDATE'
EXPORTING
vbkok_wa = vbkok_wa
* SYNCHRON = ' '
* NO_MESSAGES_UPDATE = ' '
commit = 'X'
delivery = delivery
 update_picking = 'X'
 nicht_sperren = 'X'
* IF_CONFIRM_CENTRAL = ' '
* IF_WMPP = ' '
* if_get_delivery_buffered = 'X'
* IF_NO_GENERIC_SYSTEM_SERVICE = ' '
* if_database_update = '1'
* IF_NO_INIT = ' '
* IF_NO_READ = ' '
* IF_ERROR_MESSAGES_SEND_0 = 'X'
* IF_NO_BUFFER_REFRESH = ' '
* if_no_mes_upd_pack = 'X'
IMPORTING
ef_error_any_0 = e_any
ef_error_in_item_deletion_0 = e_item
ef_error_in_pod_update_0 = e_pod_update
ef_error_in_interface_0 = e_interface
ef_error_in_goods_issue_0 = e_goodsissue
ef_error_in_final_check_0 = e_fcheck
TABLES
* VBPOK_TAB =
* PROT =
verko_tab = verko_tab
verpo_tab = verpo_tab.
* VBSUPCON_TAB =
* IT_VERPO_SERNR =
* IT_PACKING =
* IT_PACKING_SERNR =
* IT_REPACK =
* IT_HANDLING_UNITS =
* ET_CREATED_HUS =
* TVPOD_TAB =

any pointer on where i am going wrong will be properlt rewarded:

Regards

Gunjan