Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Pack HU - Pack Carton Hus to Pallet HUs- BAPI Issue

former_member300568
Participant
0 Kudos
373

Hi All,

I have a scenario where i have to generate Pallet HU and then attach it to delivery. Next step would be to Pack Carton HU to Pallet HU.

First step, i am able to create HU successfully with below Code, after commit i see the HU Number in VEKP table.

But When i try to link it to delivery i dont see any error from BAPI but i am unable to see the vbeln_ga in VEKP.

  
        CALL FUNCTION 'BAPI_HU_CREATE'
          EXPORTING
            headerproposal = ls_headerproposal
          IMPORTING
            hukey          = ls_hukey
            huheader       = ls_hu_header
          TABLES
            itemsproposal  = lt_item_proposal
*           ITEMSSERIALNO  =
            return         = lt_return
*           HUITEM         =
          .
*Commit HU creation,then assign HU to shipment
        CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
          EXPORTING
            wait = c_x.

        REFRESH lt_return.

        ls_hu_header-pack_mat_obj_key = gv_delv.
        ls_hu_header-pack_mat_object = '12'.
        CALL FUNCTION 'BAPI_HU_CHANGE_HEADER'
          EXPORTING
            hukey     = ls_hukey
            huchanged = ls_hu_header
* IMPORTING
*           HUHEADER  =
          TABLES
            return    = lt_return.

        CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.

To pack HU i tried SD_DELIVERY_UPDATE_PACKING , But it didnt work. But when i try 
CALL FUNCTION 'BAPI_HU_PACK'
    EXPORTING
      hukey        = lv_hukey
      itemproposal = lk_itmproposal
    IMPORTING
      huitem       = lk_huitem
      huheader     = lk_huheader
    TABLES
      return       = gt_return.

I do not get error , but in VEPO table i dont see the Carton HU which i am passing to the itmproposal above is 
not linked to the parent (pallet) HU.
Any suggestions will be appreciated
0 REPLIES 0