Pack Handling Units on Shipment
Hi Experts,
We have a requirement to Pack the Bundles (SUB - HU's) onto TRUCKs (HU's) in Shipment.
I have been trying various FM's and also gone through the links with little success. In one of the links, friend Christopher has suggested to use 3 FMs in order to do this.
1. RV_SHIPMENT_VIEW
2. HU_PACKING_AND_UNPACKING
3. HU_POST
I have tried this with some success but not in the way we wanted. Instead of packing BUNDLE - sub HU onto the TRUCK - HU in shipment, it was packing the bundle onto shipment.
Can someone please tell me how to achieve my requirement?
Thanks in advance.
Regards,
Lakshmi Narayana
Please check the following code snippet.
Certain attributes are hardcoded, please ensure that you change it accordingly to suit your needs.
types: VSEP_S_PITHU TYPE PACKING_ITEM_HU.
types: VSEP_T_OBJKEY TYPE HUM_OBJECT_T.
types: VSEP_S_OBJKEY TYPE HUM_OBJECT.
data: l_PACKING_REQUEST type VSEP_S_PITHU.
data: l_VEKPVB like VEKPVB.
data: l_header51 like HEADER51.
data: l_IT_OBJECTS TYPE VSEP_T_OBJKEY.
data ls_objects TYPE vsep_s_objkey.
data l_vbplk_a like vbplk.
Read the packing details (HUs) for the shipment
move 'IEQ' to st_shipment.
move i_shipment to st_shipment-low.
append st_shipment to t_shipment.
CALL FUNCTION 'SD_PACKING_FOR_SHIPMENT'
TABLES
SHIPMENT_TAB = t_shipment
VBPLK_TAB = t_hu
VBPLP_TAB = t_hu_heirarchy
EXCEPTIONS
OTHERS = 3.
IF SY-SUBRC <> 0.
raise NO_HUS_ON_SHIPMENT.
ENDIF.
Sort table by sortl field to ensure that the order of
entries in the table reflect the true order of items
in the consist
sort t_hu by sortl venum.
Find the top level (consist) HU
read table t_hu
into l_vbplk_a
with key veltp = 'A'.
Pack all lower level HUs into the higher level
loop at t_hu into st_hu
where veltp ne 'A'.
clear l_header51.
l_header51-OBJECT = '04'.
l_header51-OBJKEY = i_shipment.
l_header51-PLANHU = 'A'.
l_header51-SPRAS = sy-langu.
l_header51-VTWEG = '04'.
l_header51-SPART = '10'.
l_header51-profile = '0006'.
clear ls_objects.
ls_objects-object = '04'.
ls_objects-objkey = i_shipment.
APPEND ls_objects to L_IT_objects.
CALL FUNCTION 'V51P_READ_HUS_FOR_TRANSPORT'
EXPORTING
IF_LOCK_HU = 'X'
IF_FIRST = 'X'
IS_HEADER51 = l_header51
IT_OBJECTS = l_it_objects
EXCEPTIONS
HUS_LOCKED = 1
NOTHING_FOUND = 2
FATAL_ERROR = 3.
if sy-subrc ne 0.
raise hu_cannot_be_locked.
endif.
do 2 times.
Do this twice as it is possible that the update of the
delivery has not completed (even though commit and wait)
CALL FUNCTION 'RV_SHIPMENT_VIEW'
EXPORTING
SHIPMENT_NUMBER = i_shipment
OPTION_TVTK = 'X'
OPTION_TTDS = 'X'
OPTION_ITEMS = 'X'
OPTION_STAWN_READ = 'X'
OPTION_SEGMENTS = 'X'
OPTION_PARTNERS = 'X'
OPTION_MESSAGES = 'X'
OPTION_PACKAGE_DIALOG = 'X'
OPTION_FLOW = 'X'
OPTION_DELIVERY_LOCK = 'X'
OPTION_AUTHORITY_CHECK = 'X'
ACTIVITY = 'V'
OPTION_NO_REFRESH = ' '
OPTION_IGNORE_MISSING_DELIV = 'X'
EXCEPTIONS
NOT_FOUND = 1
NO_AUTHORITY = 2
DELIVERY_MISSING = 3
DELIVERY_LOCK = 4
OTHERS = 5.
if sy-subrc eq 4.
wait up to 1 seconds.
else.
exit.
endif.
enddo.
CASE sy-subrc.
when 0.
when 4.
raise DELIVERY_CANNOT_BE_LOCKED.
when others.
raise CANNOT_READ_SHIPMENT.
endcase.
clear l_packing_request.
l_PACKING_REQUEST-VENUM = l_vbplk_a-venum.
l_PACKING_REQUEST-EXIDV = l_vbplk_a-exidv.
l_PACKING_REQUEST-VELIN = '3'.
l_PACKING_REQUEST-SUB_HU_EXIDV = st_hu-exidv.
l_PACKING_REQUEST-QUANTITY = 1.
l_PACKING_REQUEST-ALTME = 'EA'.
l_PACKING_REQUEST-VEANZ = 1.
CALL FUNCTION 'HU_PACKING_AND_UNPACKING'
EXPORTING
IS_PACKING_REQUEST = l_packing_request
EXCEPTIONS
OTHERS = 9.
case sy-subrc.
when 0.
when others.
message i999(zv) with 'Error while packing - return code' sy-subrc.
raise ERROR_PACKING.
endcase.
CALL FUNCTION 'HU_PACKING_UPDATE'.
commit work and wait.
endloop.
ENDFUNCTION.
Similar Messages
-
How to Issue Output for a Single Handling Unit from Shipment
Hi,
I would like to know how to issue an Output for a Single Handling Unit from Shipment, i mean i have attached an output type 'ZPN0' (Customised) to a Handling unit in the Tcode VT03N to a Handling Unit.
VT03N>click on Handling unit icon> select a handling unit --> go to Extras --> Output --> give the Out put type (maintained)) -- > saved.
Once i come back --> i did not find any option / icon to issue the output from VT03N for handling unit. We have an option to issue output for the Entire Shipment.
Tried alternative by going to VT70, give the shipment no, and output type for handling unit. When executed, Getting a message "No Messages Found".
let me know how to issue the output for a handling unit of the shipment. Only Handling Unit & not the entire shipment.
Regards,
SwapnaDear Swapna ,
maintain out put type for handling units in V V 61 -
Output for a Single Handling Unit from Shipment
Hi,
I would like to know how to issue an Output for a Single Handling Unit from Shipment, i mean i have attached an output type 'ZPN0' (Customised) to a Handling unit in the Tcode VT03N to a Handling Unit.
VT03N>click on Handling unit icon> select a handling unit --> go to Extras --> Output --> give the Out put type (maintained)) -- > saved.
Once i come back --> i did not find any option / icon to issue the output from VT03N for handling unit. We have an option to issue output for the Entire Shipment.
Tried alternative by going to VT70, give the shipment no, and output type for handling unit. When executed, Getting a message "No Messages Found".
let me know how to issue the output for a handling unit of the shipment. Only Handling Unit & not the entire shipment.
Regards,
SwapnaHi,
For VT70 transaction have entered the Print control and Output device. -
Handling units in Shipments cannot be unpacked
Dear All,
In shipments, there are HUs which needs to be unpacked since user wants to delete the related deliveries. When he goes to Shipment change mode and tries to unpack the HUs, it is greyed out in and not able to delete or empty the HUs. System gives a message (green color) "The Handling units cannot be changed". Kindly help me to resolve this issue.
Your efforts regarding this would be appreciated and rewarded.
Regards
Samier DanishOk, just to be sure;
1) did you pack in the deliveries? You're not trying to unpack these HU's?
2) is there a user status scheme active?
3) did you pack the deliveries and did you pack these HU's into a new HU in the shipment? And are you now trying to unpack the HU created in the shipment?
4) is the packaging button itself greyed out?
5) what is the status of the HU you're trying to unpack?
MdZ -
Create and Pack Handling Units in the Sales Order Using HU_CREATE_ONE_HU
Hello Experts,
I am trying to use HU_CREATE_ONE_HU function module to create a handling unit and pack it with specific line items in the sales order program in the background. I am able to create the handling unit and pack it but it does not get associated to the sales order / line item. If you look at the sale order's packing proposal, it does not show it packed. If I look at VEKP / VEPO, I see where it was created but there is no value for vbeln or the posnr I proposed. Below is the code, I am using. Does anyone know what I am doing wrong or is there another function module I can use?
LOOP AT t_vbap.
CLEAR: is_header_proposal, it_items, es_header, et_items, et_messages, t_vbap2.
REFRESH: et_items, et_messages, t_vbap2.
is_header_proposal-exidv = '$1'.
is_header_proposal-exida = 'A'.
is_header_proposal-vhilm = 'UNIBOX'.
is_header_proposal-hu_status_init = 'A'. "planned
is_header_proposal-status = '0001'. "planned
"get the components that make up this subassembly including the parent.
SELECT * FROM vbap
INTO TABLE t_vbap2
WHERE vbeln = t_vbap-vbeln
AND posnr = t_vbap-posnr. "parent
SELECT * FROM vbap
APPENDING TABLE t_vbap2
WHERE vbeln = t_vbap-vbeln
AND uepos = t_vbap-posnr. "children
"now load the items to be packaged in the proposal
LOOP AT t_vbap2.
CLEAR: it_item.
it_item-velin = '1'. "material item
it_item-belnr = t_vbap2-vbeln.
it_item-posnr = t_vbap2-posnr.
it_item-quantity = t_vbap2-kwmeng.
it_item-meins = t_vbap2-meins.
it_item-matnr = t_vbap2-matnr.
it_item-werks = t_vbap2-werks.
it_item-lgort = t_vbap2-lgort.
APPEND it_item TO it_items.
ENDLOOP.
CALL FUNCTION 'HU_INITIALIZE_PACKING'.
CALL FUNCTION 'HU_CREATE_ONE_HU'
EXPORTING
if_create_hu = 'X'
is_header_proposal = is_header_proposal
it_items = it_items
IMPORTING
es_header = es_header
et_items = et_items
et_messages = et_messages
EXCEPTIONS
input_missing = 1 " Data that is Necessary for Creation is Missing
not_possible = 2 " HU Creation not Possible
header_error = 3 " HU Header Data Contains Incorrect Data
item_error = 4 " Items Cannot be Created
serial_nr_error = 5 " Serial Number Error
fatal_error = 6 " Internal Error
OTHERS = 7.
CALL FUNCTION 'HU_POST'
EXPORTING
if_synchron = space
if_commit = 'X'.
ENDLOOP.
Thanks for the help.
LauraThe abap statement does not make sense.
xlips_high_posnr = ( lips-posnr / tvlk-incpo ) * tvlk-incpo
posnr & incpo are both type numc length 6.
Here is my recommendation to catch the divide by zero error.
data: l_oref type REF to cx_root.
data: l_text type string.
TRY.
clear l_text.
xlips_high_posnr = lips-posnr / tvlk-incpo.
CATCH cx_sy_zerodivide INTO v_oref.
l_text = l_oref->get_text( ).
CLEANUP.
* Put your code to do further processing if it is divide by zero
ENDTRY. -
Packing handling units to outbound delivery with batch management
Hello all,
I am packing an outbound delivery with a material that has batch management active. The packing is from a storage location that manages handling units (HU-managed sloc).
My problem is u2013 before entering the HUs to the delivery u2013 the system asks me to enter the batches (in the batch split function). Only then I am allowed to enter the HUs in the packing function.
What could be the reason for this preliminary batch entries ?
How can I set the system not to do that, i.e., I would like to be able to enter the HUs directly without entering the batchs separately.
Thanks,
IsaacDear Isaac,
this system behaviour can not be changed in standard and is also not recommended to change it via a modification. The reason for this system behaviour is to avoid inconsistencies in the system. The HU that you assign to the delivery, should exactly fit to the delivery. In case if the material is batch managed, you should specify the batch first, and then add the fitting HU with exactly that batch.
I suppose you checked the longtext for HUDIALOG102, that you get in the described case, but I copy it for you, in case if you did not read it:
"Diagnosis
There are items to be handled in batches which have not yet been
assigned to a batch.
Batches must be recognized for items with HU-managed storage location
For items at a storage location that is not HU-managed, the item type
determines if packing will take place at cumulated item quantity level
(meaning that the batch is not recognized at any point in the handling
unit) or if packing must take place at batch level.
System Response
If an item requires batch identification, that item will not be
suggested for packing as long as the batch is not recognized.
Procedure
Go to the maintenance of the delivery item and assign at least one batch
to the item."
Regards,
Ely -
Dear SAP,
We are using Manual Packing in our business scenario. In the packing process, system will not considering, Most appropriate material to pack in the handling unit, if the handling unit have some space, But the system is considering the immediate next material only.
Here I am explaining the business process:
1.Packing Material CART is having allowed volume is 10 CCM.
2.There are three material (Normal finished material )
Material - Volume
X - 1 CCM
Y - 2.5 CCM
Z - 1.5 CCM
3.The Delivery consists of following delivery quantity:
Item No - Material - Quantity
90001 - X - 8
90002 - Y - 4
90002 - Z - 1
4.While in packing, the system generating the three Handling units.
Handling unit - Material - Quantity - Total Volume
Handling Unit 1 - X - 8 - 8CCM
Handling Unit 2 - Y - 4 - 10CCM
Handling Unit 3 - Z - 1 - 1.5 CCM
But above generation is wrong .system has to generate as
Handling unit - Material - Quantity - Total Volume
Handling Unit 1 - X - 8 - 9.5CCM
- Z - 1
Handling Unit 2 - Y - 4 - 10 CCM
The Reason as follows:
System first packing the item no: 90001, in handling unit1 (Say consumed 8 CCM) and for remaining space, its considering the only immediate next item only (i.e. Item-90002), But its not considering the most appropriate material (item no.90003)
Kindly help me out in above scenario.
Regards,
ShekarU can always change manually in the sales order if there is a mismatch the quantity which can be fit into the carton.... from the packing proposal screen in the sales order or Handling unit screen in the delivery...
Create the packing instruction for the quantity which is regularly used and change manually for all the other quantities...
As far as I know there is no other option for this...
Thanks and Regards,
Pavan P. -
Secnario : A delivary has 5 Handling Units.
A
B
C
D
E
I need to Create a new Outer HU (PALLET) and Pack D & E HU's into New Outer handling Unit (PALLET) F -
Please Explain Steps to do this.
How to identify inner HU 's and Outer HU's in ABAP Program. any field which specifies that ?Hi,
you can create nested HUs (pack HUs into another one) under tab "pack HUs" that is next to the tab "pack material" on the packing view of the delivery. It works the same way with the difference that you mark the HUs you want to pack and not the material.
Regards,
Ely -
Batch number is blank and not editable during packing into Handling Unit
Hi, we have an issue that the batch number (VEPO-CHARG) for delivery line item is not showing up and not editable during packing into Handling Unit through shipment transaction VT01N.
When we have a batch split for one delivery line item, we want to be able to choose which batch to be packed into each handling unit.
Does anybody know any userexit to populate that field or at least make it editable? Is there something in the configuration that make it not show up?
We tried all the SAP suggested userexit for VT01N but nothing seem to control the handling unit packing screen.
Any hint is appreciated and point will be rewarded.
Minamiyou should take the ovn on the effective date. A max will not always work.
Is the max also not hiding a no data found? -
Pack existing Handling Units into outbound delivery
Hi,
The current scenario is that a WHSCON IDoc is passed into SAP which will pack handling units onto an inbound delivery. As part of this processing the IDoc will create the HU records on VEKP.
Now, we are sending in a similar WHSCON IDoc to pack the same HU onto an outbound delivery. However, the IDoc is failing. It appears that the IDoc wants to create the HU instead of simply using the existing one.
Has anybody faced a similar issue.
Thanks
MartinHallo!
Yes, I have the same problem now.
In the past we had 2 wm sub systems which send data via WHSCON to SAP and pack the delivery items.
To avoid error messages we "kill" the old vekp-record by setting the vekp-status to "0099" with a hart update and create new hu records.
Nowadays this solution is not sufficient, because the old hu has serial numbers.
Any solution in sight?
bye
bernhard -
Hi,
Can you please help me with the code for populating the Handling units while shipment creation using bapis.
Thanks,
Thomas Kash
Moderator message: please (re)search yourself first.
Edited by: Thomas Zloch on Dec 9, 2010 10:55 AMif we have the delivery with the packaging already done(VL02n) it should be present in shipment creation already ...better have the delivery with packaging already done and do that shipment .
however if you are doing packaging(Handling Unit ) dusring shipment(VT01) i have not much clarity on that .
Please refer below threads to gain some insights , We do not have much information on this in the Forum .
mentors please help *
BAPI_HU_CREATE
BDC table control for handling unit
http://wiki.sdn.sap.com/wiki/display/ABAP/UseofBAPI_SHIPMENT_CREATEconcerningshippingstatuses%28and+deadlines%29 -
Goods Receipt of co-product (handling unit)
Hi everybody,
I wonder if it is possible to make goods receipt of co-product using standard transaction (like COWBHUWE)?
I can pack co-product with reference to an order, but when I try to post packed HU (with COWBHUWE or function module) material/co-product inside HU is switched with material defined in production order header (main material).
I can post GR of co-product with MIGO (or FM equvialent) and pack co-product later; but in that case HU has no reference to production order.
Is there any way (standard transaction or function module) to post GR of co-product HU with reference to production order?
Thank you for your answers.
MarkoMarko Kunsic wrote:
I can post GR of co-product with MIGO (or FM equvialent) and pack co-product later; but in that case HU has no reference to production order.
In case we posted goods receipts of co-product using MIGO, we have to create/pack handling units afterwards.
Is it possible to create HU with reference to production order (VEKP-VPOBJ = '09') or somehow regularly insert data about production order number into 'free' HU (VEKP-VPOBJ = '12') history?
There is an option to fill this data (production order number) into field of VEKP, but this seems not to be the optimal way.
Thank you for your help.
Marko -
Handling Unit Managment Process flow
Hi all,
I am implementing Handling Unit Management currently. I am looking for; how does the business process flow change once HUM is activated.
So far, I got an idea:
GR process:
Purchase Order -> Goods Receipt (MIGO) -> ASN(Inbound Delivery) -> Pack & Create Handling Unit -> Post Goods Receipt(via the Inbound Delivery)
GI process:
Sales Order -> Outbound Delivery ->Pick & Pack(Handling Unit) -> Goods Issue
Please let me know if i am correct in my assumption.
Also, I would like to know how the stock is transferred from the stock stored in HU's in the warehouse to the stock which is to be delivered.
For example :
I store a material X in HU's in multiples of 500. I have to deliver to a customer around 100 pieces of X.
How do I go about unpacking the HU of 500, then creating 2 HU's (one with 400 pieces to be stored back in the warehouse, and the other HU of 100 pieces for the customer.)
Is it possible to do so ?
Or I need to create a separate storage location where I have to keep the partial unpacked 400 pieces ?
Anyone's help will be appreciated in this matter.
Thanks,
Shefalitry this
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/LOHU/LOHU.pdf -
URGENT DELIVERY HANDLING UNIT STATUS ERROR
Hi Experts when i am doing PGI i am getting the following error and system is not allowing to do PGI
ERROR: When trying to read the status of an object (HU 210868), a system error occurred: For object number HU0000210868 there is no status object.Hi Ramesh,
The material is having the Packing ( Handling Units).
In delivery please do the Packing for the Materials because they have linked with the Handling Units. and Also check the wheather the Handling Units are configured properly.
For your Information please go through the Below which will help you further.
The SAP Handling Unit Management system allows you to manage the entire movement of the handling units and the materials they contain rather than tracking each material individually.
This paper is for the HUM Delivery although some of the contents is related to Inventory under the Logistics General modules.
Table of Contents
Objective
IMG Menu The Starting Point
Handling Unit Management Overview
Start of HUM Outbound Deliveries Manual Packing Configuration
Define Number Ranges for Handling Units
Define Packaging Material Types
Define Material Group for Packaging Materials
Define Allowed Packaging Materials
Use Handling Unit Supplements
Maintain Goods Movements for Handling Unit Stock-Posting
Define User Status Profile
Set QM Check and Delivery Type for Each Movement Type
HU Requirement for Storage Locations and Default Values for Deliveries
Packing Control By Item Category
Define Requirements for Packing in the Delivery
Delivery Type Determination
Set Unique Number Assignment for HU Identification
Number Range Maintenance for HU Identification
Define Number Assignment for Each Packaging Material Type
Delivery Output type for Packing List
Maintain the Delivery Output Determination Procedure
What else to maintain after the Manual Handling Units Configurations?
Start of the Automatic Packaging Configuration
Define Number Ranges for Packing Instructions
Define Determination Type for Packing Instructions
Define Number Ranges for Packing Instruction Determination Records
What else to maintain after the necessary Automatic Packaging Configurations?
Appendix A: How to do Manual Packing for Non-Assigned Handlings Units?
Appendix B: Scenario 1 How to do Manual Packing by Delivery Item?
Appendix C: Scenario 2 How to Manual Pack the Materials into Pallets?
Appendix D: How to do Automatic Packing?
Appendix E: How to do Goods Movement for Handling Unit Material?
Appendix F: How to Unpack the Handling Unit Material?
A handling unit is a physical unit that consists of the packaging materials (load carrier / packaging material) and the goods contained therein. A handling unit is always a combination of materials and packaging materials. All the information contained in the material items, such as batches and serial numbers, is always available by way of the handling units.
Handling units can be nested, meaning that you can also create new handling units from several handling units as often as you like.
Handling units have unique, scannable identification numbers that can be formed according to standards such as EAN 128 or SSCC.
Figure 1: Handling unit example
Structure
The handling unit object contains the following attributes:
Identification number
Dimensions
Weight
Volume
Status
Materials and quantities
Packaging materials
Packing instructions
A handling unit consists of a handling unit header and handling unit items. For identification purposes, it is given a unique number.
Handling unit header
The header data of a handling unit is divided in the following way:
Weight/Volume/Dimensions
General data
Means-of-transport data
Additional data
Output determination procedure
For more information about each of these detailed points, see Editing detailed data for handling units.
Status
The handling unit is linked to general status management. In this way, the various physical states (planned or implemented) and other attributes (weighed, loaded, blocked or posted goods issue) of handling units can be documented.
You can use the HU_ST_INIT user parameter when you create handling units without object reference to set which initial status the handling unit is to have when it is created.
If you want to implement a status of your own, you can define a user-specific procedure for the packaging material type (see also Define Packaging Material Types).
Handling unit item
The items of a handling unit can consist of material items, packaging materials or other handling units that appear in an overview. For more information about this overview, see the Contents section of Editing detailed data for handling units.
To access the item data of an individual handling unit, select the handling unit concerned and choose Goto  Detailed HU data  Contents.
Integration
Handling units can be used in all processes within the supply chain.
Please Reward If Really Helpful,
Thanks and Regards,
Sateesh.Kandula -
Sales Handling unit enhancement
Dear friends,
This is regarding packing handling units in delivery. I have a customized table which is having ready handling units with reference to sales order.
I have a requirement to pick these handling units from Ztable and attach to delivery when the user clicks PACK button in OBD, instead of selecting handling units one by one again.
Please suggest any appropriate user exits.
Regards,
Praveen LoboHi,
Please check below link on all user exits in SD.
https://wiki.sdn.sap.com/wiki/display/ERPLO/SDUserexits
You should be able to find the right one there...
Best regards,
Anupa
Maybe you are looking for
-
Setup WSUS - Now My External Website Cannot be Accessed via Domain Machines
Hi all, I recently set up a WSUS server for my company so I can manage updates to domain computers. I got it working and each domain computer now looks to the server (192.168.0.101) for updates. In addition, I have a DC on this machine as well which
-
I updated my software as "recommended" and my optical output is not working anymore to my receiver and thus no surround sound. My HDMI to the TV still provides the picture and sound to the TV. My receiver only uses optical and was fine BEFORE the sof
-
HT204022 How can I display photos in my photo stream via a webbrowser?
If I take photos with e.g. the iPhone, iPad/iPod and have a WLAN connection then they are uploaded as soon as I get the connected. The files are then stored in the cloud and will be distributed to all my devices, which use the same iCloud ID. But if
-
Hi Gurus, Is there a difference in setting up of Route determination for STO (Stock transport Order) as I am getting route determined in my SO (Sales order) and not in when I create STO with same values like Shipping point, Transport Group, Departure
-
Triggering output for delivery
Hi, I had an issue regarding the output for delivery failed because of the partner type wrongly entered manually.Now I was been advised to change the partner type and re-trigger the output.Can you please let me know with what t.code and the re-trigge