Summary:
This article will help ABAP developers in understanding how to create or pack Handling Units in EWM system.
Introduction:
Recently got a chance to work in EWM module and being a ABAP developer many-a-times we come across custom requirements to Create Handing Units or packing Handling Units.
Still in EWM module, not lot of technical help is available, hence thought to share some knowledge/solutions which I have explored by debugging standard T-codes like /SCWM/PACK.
SAP has provided class /SCWM/CL_WM_PACKING and its superclass /SCWM/CL_PACK; which has lot of methods to fulfill mostly custom requirements.
Below is the steps to create HU and Pack HU:
- Create object of class /SCWM/CL_WM_PACKING like: DATA: g_create TYPE REF TO /scwm/cl_wm_packing.
CREATE OBJECT g_create.
- Initialize class with warehouse by calling INIT method of class: CALL METHOD g_create->init
EXPORTING
iv_lgnum = Warehouse_Code.
- Also we need to call FM /SCWM/TO_INIT_NEW,to initialize Warehouse Task Processing CALL FUNCTION '/SCWM/TO_INIT_NEW'
EXPORTING
iv_lgnum = Warehouse_Code.
- Afterwards call method CREATE_HU of Interface /SCWM/IF_PACK_BAS by passing material, HU name and Storage Bin where HU needs to be create. and then call SAVE method.
*CASE name is nothing but Handling Unit
5. Above steps only create an empty HU, now to pack HU inside it, there is a need to call PACK_HU method and then call method SAVE to commit everything to database.
Above steps will create HU and you can pack HU into it. Hope this serves to lot of similar requirements of repacking HU and all, by exploring other methods from same class.
Note: This work is carried out on SCM 7.02
I will try to cover some other topics in EWM in my future posts and urge readers to contribute the same.