Quantcast
Channel: SCN: Message List - ABAP Connectivity
Viewing all articles
Browse latest Browse all 3125

Re: bapi: pack material in a hu (without wm)

$
0
0

Look for function modules in the function group : V51E for HU

 

 

Below Pseudo code could be useful

 

* Initialize internal tables of function group

  CALL FUNCTION 'HU_PACKING_REFRESH'.

 

 

* Initialize Delivery Data

  CALL FUNCTION 'HU_READ_DELIVERY_AND_INIT'

    EXPORTING

      if_delivery       = gv_delivery

      if_lock           = 'X'

    EXCEPTIONS

      no_delivery_found = 1

      posted            = 2

      display_only      = 3

      OTHERS            = 99.

 

 

 

 

* For adding items in HU

CALL FUNCTION 'HU_PACKING_AND_UNPACKING'

      EXPORTING

        is_packing_request = ls_pack

      IMPORTING

        es_p_request       = ls_pack

      EXCEPTIONS

        missing_data       = 01

        hu_not_changeable  = 02

        not_possible       = 02

        customizing        = 02

        weight             = 02

        volume             = 02

        OTHERS             = 99.

 

 

* Update Delivery

CALL FUNCTION 'WS_DELIVERY_UPDATE'

    EXPORTING

      vbkok_wa                     = ls_vbkok_wa

      delivery                     = gv_delivery

      update_picking               = 'X'

      nicht_sperren                = 'X'

      if_get_delivery_buffered     = 'X'

      if_no_generic_system_service = 'X'

    TABLES

      vbpok_tab                    = lt_vbpok

      prot                         = lt_prot.

 

 

 

 

LOOP AT lt_prot INTO ls_prot

                    WHERE msgty CA 'AE'.

    MESSAGE e002 WITH text-010 gv_delivery.

  ENDLOOP.

 

 

  COMMIT WORK AND WAIT.

 

 

* Release lock .... just to please the other users

  CALL FUNCTION 'DEQUEUE_ALL'.


Viewing all articles
Browse latest Browse all 3125

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>