WS_DELIVERY_UPDATE Function Module is not updating the Handling unit

Advertisement
Hi Experts,
I am using the Function Module WS_DELIVERY_UPDATE  for PGI and packing outbond delivery . I am getting the PGI date , Route.
but i am not getting the time in delivery field-WAUHR and i am getting the message 'Reqiured HU could not be found'.
Please find the attach code below:
FORM update_packing  USING wa_index.
  wa_index = wa_index + 1.
  w_track = int_delivery_data-zn12+0(20).
  itaverko-exidv       =  w_track.
  ltahus-exidv         =  w_track.
  itaverko-vhilm       =  p_shpmtl.  " from screen select parm
  ltahus-vhilm         =  p_shpmtl.
  w_brgew = int_delivery_data-brgew.
  SHIFT w_brgew LEFT DELETING LEADING ' '.
  itaverko-brgew                 =  w_brgew.
  ltahus-brgew                   =  w_brgew.
  SHIFT int_delivery_data-inhalt LEFT DELETING LEADING ' '.
  w_fcosts = int_delivery_data-inhalt.
  SHIFT w_fcosts LEFT DELETING LEADING ' '.
  itaverko-inhalt                 =  w_fcosts.
  ltahus-inhalt                   =  w_fcosts.
  itaverko-gewfx                  =  int_delivery_data-gewfx.
  ltahus-gewfx                    =  int_delivery_data-gewfx.
  INSERT itaverko INDEX wa_index.
  INSERT ltahus INDEX  wa_index.
ENDFORM.                    " UPDATE_PACKING
FORM update_delivery .
  CLEAR :   i_vbkok,ita_prot.
  REFRESH : i_vbpok,ita_prot.
  CLEAR: d_return.
  CLEAR:  ef_error_in_item_deletion_0 ,
          ef_error_in_pod_update_0 ,
          ef_error_in_interface_0 ,
          ef_error_in_goods_issue_0 ,
          ef_error_in_final_check_0 .
  READ TABLE int_delivery_data INDEX wa_index.
  IF sy-subrc = 0.
carry out goods issue
    i_vbkok-vbeln_vl = int_delivery_data-vbeln.  " Delivery nbr
    i_vbkok-vbeln    = int_delivery_data-vbeln.  " Pick Order
    i_vbkok-vbtyp_vl =  int_delivery_data-vbtyp.
    i_vbkok-wabuc = 'X'.       " post goods movement automatically
    L_VBKOK-KOMUE = 'X'.    " overwrite delvry qty with picking qty
   CONCATENATE 'US' INT_DELIVERY_DATA-ZN13 INTO W_ROUTE.
    i_vbkok-route = int_delivery_data-route.
    i_vbkok-kzroute = 'X'.
    i_vbkok-spe_kzgeoroute = 'X'.
    i_vbkok-packing_final  =  'X'.
   i_vbkok-wabuc  =  'X'.
    w_in_date = int_delivery_data-dattm+0(8).
    i_vbkok-wadat      =  w_in_date.
   L_VBKOK-WADAT_IST  =  W_in_DATE.
   w_gi_time       =  int_delivery_data-dattm+8(6).
    i_vbkok-wauhr          =  w_gi_time.
   w_track = int_delivery_data-zn12+0(20).
   t_sernr = w_track.
SET UPDATE TASK LOCAL and Perform PGI.
    CALL FUNCTION 'WS_DELIVERY_UPDATE'
      EXPORTING
          vbkok_wa           = i_vbkok
          synchron           = 'X'
          no_messages_update = ' '
         update_picking     = 'X'
         commit             = 'X'
          delivery           = int_delivery_data-vbeln
          nicht_sperren      = 'X'
          if_error_messages_send_0 = space
       IT_SERNR_UPDATE    = T_SERNR
      IMPORTING
          ef_error_any_0              = ef_error_any_0
          ef_error_in_item_deletion_0 = ef_error_in_item_deletion_0
          ef_error_in_pod_update_0    = ef_error_in_pod_update_0
          ef_error_in_interface_0     = ef_error_in_interface_0
          ef_error_in_goods_issue_0   = ef_error_in_goods_issue_0
          ef_error_in_final_check_0   = ef_error_in_final_check_0
          ef_error_sernr_update       = ef_error_sernr_update
      TABLES
*"      VBPOK_TAB STRUCTURE  VBPOK OPTIONAL
         prot                         = ita_prot
          verko_tab                   = itaverko        "  STRUCT VERKO
*"      VERPO_TAB STRUCTURE  VERPO OPTIONAL
*"      VBSUPCON_TAB STRUCTURE  VBSUPCON OPTIONAL
      IT_VERPO_SERNR               = T_VERPO_SERNR
*"      IT_PACKING STRUCTURE  REPACK_HU_WM OPTIONAL
*"      IT_PACKING_SERNR STRUCTURE  HUM_REP_SERNR OPTIONAL
*"      IT_REPACK STRUCTURE  HUM_REPACK OPTIONAL
*"      IT_HANDLING_UNITS STRUCTURE  HUM_REHANG_HU OPTIONAL
*"      IT_OBJECTS STRUCTURE  PGR_OBJECTS OPTIONAL
        et_created_hus               = ltahus  "STRUCTURE  VEKPVB
      EXCEPTIONS
          error_message = 1
          OTHERS        = 2.
    IF sy-subrc <> 0.
    ENDIF.
    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
    EXPORTING
      WAIT          =
    IMPORTING
      RETURN        =
  ENDIF.
ENDFORM.                    " UPDATE_DELIVERY
Could please help on this.
Thanks,
Rohit
Edited by: Rohit Sharma on Jul 24, 2009 3:25 PM
Edited by: Rohit Sharma on Jul 24, 2009 3:29 PM
Advertisement

Replay

Hi Joao,
I have the same problem. I tried to find the FM SD_OUTB_DELIVERY_CHANGE  but couldn't find it. Have you by any change specified the incorrect FM name here? If yes, can you please communicate the correct FM name?
Regards,
Divyaman