Create and Pack Handling Unit in EWM
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.
Hi Kirti,
some other helpful source of information might also be the following book:
SAP EWM Architecture and Programming
Best regards
Markus
Thanks Markus for bringing the source into notice.
Hi Kirti,
Please let me know how to pass the quantity during creation of HU.
Regards,
Brahma
Thank you for this article, This helped me in one of my issue.
Glad to hear this..!!
This is a great blog. It really helped me in my development.
Good Job Kirti!!!
Thanks for sharing.
Regards,
Amol
Please could you help me?
I would like to know if you have a program to create an Inbound Delivery Order into EWM system directly, based on Purchase Order.
I mean, user is creating manually an Inbound delivery order into standard transaction /SCWM/GRPE and Purchase Order data is already into EWM system.
ABAP requirement is creating an Inbound Delivery Order automatically using a program providing input data with PO Number, item, qty, UOM, and so on.
Getting an error " Index entry (object type H) already exists " if I am passing multiple HU's to this method inside an FM. Can you please help