0% found this document useful (0 votes)
80 views10 pages

Delivery and Shipment Handling Units

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
80 views10 pages

Delivery and Shipment Handling Units

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 10

Delivery and Shipment handling units

Business Requirement:
1. Creation of Delivery Handling unit for over packing and master cartons even if
over packing is not required.
2. Creation of Shipment Handling Unit for boxes packed in Deliveries to allow receipt
by HU# in the receiving plants.

Challenges: While creating shipment handling unit, all the delivery handling units
are automatically attached to the shipment handling unit and they are deleted from
deliveries when the BAPI (BAPI_HU_CREATE) is used. BAPI_HU_CREATE has the
parameter LOWER_LEVEL_EXID is present in tables parameter (BAPIHUITEM),
however after using this parameter to attach the delivery handling units to Shipment,
these handling units are deleted from delivery.

Solution – In order to avoid above issue we had gone ahead of different approach
and able to attach the delivery handling units to shipment with correct hierarchy. we
need to call the below bapi’s in sequence to achieve the above functionality

head_proposal-hu_status_init = Pass 'A' ."Planned.


head_proposal-pack_mat = Pass Packaging Material
"Call the below function module to create an Unassigned HU object.
CALL FUNCTION 'BAPI_HU_CREATE'
EXPORTING
headerproposal = _head_proposal
IMPORTING
huheader = hu_header
hukey = hu_key
TABLES
return = return.
IF hu_key IS NOT INITIAL.
"Call the below function module to Commit the data
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
wait = 'X'
IMPORTING
return = return.
" Assign to a Shipment
hu_header-pack_mat_object = '04'. "04-HU Type for Shipment
hu_header-pack_mat_obj_key = Shipment number "Shipment #
hu_header-lenght = Pass Pallet length
hu_header-width = Pass Pallet Width
hu_header-height = Pass Pallet Height
hu_header-total_wght = Pass Pallet weight
hu_header-unit_dim = Pass Pallet Uom for dimensions
hu_header-unit_of_wt = Pallet Uom
hu_header-max_unit_of_wght = Pallet Uom.
ENDIF.
"Call the below function module to assign the handling unit to shipment
CALL FUNCTION 'BAPI_HU_CHANGE_HEADER'
EXPORTING
hukey = hu_key
huchanged = hu_header
TABLES
return = change_return.
IF change_return[] IS INITIAL.
"Call the below function module to commit the data by assigning Shipment to
Handling Unit
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
wait = 'X'
IMPORTING
return = return.
" Get the Internal Handling unit based on external handling unit and prepare the
handling unit numbers (Box_pallet_venum) which needsto be passed to below
function module.
" The below function module is called for filling the global memory
CALL FUNCTION 'HU_GET_HUS'
EXPORTING
if_lock_hus = co_x
if_no_loop = co_x
it_venum = box_pallet_venum
EXCEPTIONS
hus_locked = 1
no_hu_found = 2
fatal_error = 3
OTHERS = 4.
"Each and every Internal handling unit (Boxes) to be attached to shipment and the
below function module should be called in a loop.
packing_request-venum = Hu_header-hu_id.
packing_request-exidv = hu_key.
packing_request-velin = '3'.
packing_request-sub_hu_venum = vekp-venum.
packing_request-quantity = '1'.
Packing_request-veanz = '1'.
" The below function module is called to Repack the deliveries in the shipment which
is required for hierarchy in shipment
CALL FUNCTION 'HU_PACKING_AND_UNPACKING'
EXPORTING
if_repack = 'X'
is_packing_request = packing_request
IMPORTING
ef_rcode = return_code
CHANGING
cs_header = cs_header
EXCEPTIONS
missing_data = 1
hu_not_changeable = 2
not_possible = 3
customizing = 4
weight = 5
volume = 6
serial_nr = 7
fatal_error = 8
OTHERS = 9.
IF sy-subrc EQ 0.
" Call the below function module to commit the data by assigning Shipment to
Handling Unit
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
wait = 'X'
"If the Pallet packing is successful then only call the below function module
" The below function module commits the data to database.
CALL FUNCTION 'HU_POST'
EXPORTING
if_commit = 'X'
ENDIF.

Negative results – ( when the Bapi Function module (BAPI_HU_CREATE) is used


and passing the parameter LOWER_LEVEL_EXID), the output as follows

1. Delivery handling units are correctly packed and the hierarchy is correct
2. However when we pack the delivery boxes to shipment the hierarchy is off as
shown below. The hierarchy should be ‘0’ for Shipment handling unit,’1′ for delivery
handling unit and ‘2’ for material.

Positive results – ( when the Function modules are called in sequence as


suggested in the blog)

1.The handling units for delivery are shown below which was successfully attached
to delivery
2. HUPAST tcode for handling units with respect to delivery.

3. Handling units with respect to delivery shown below and the important element is
the hierarchy (Shipment handling unit comes first , then delivery handling unit and
then the packaging materials.
SAP ABAP IMG Activity SIMG_HUMIDHUEX (Number Range Maintenance for HU Identification)

IMG Activity
ID SIMG_HUMIDHUEX Number Range Maintenance for HU Identification

Transaction Code S_P99_41000250 IMG Activity: SIMG_HUMIDHUEX

Created on 19990611

Customizing
SIMG_HUMIDHUEX Number range maintenance for HU identification
Attributes

Customizing Activity SIMG_HUMIDHUEX Number Range Maintenance for HU Identification

Document
Hypertext: Object Class - Class to which a document
Document Class SIMG
belongs.

Document
SIMG_HUMIDHUEX
Name

In this activity, you can maintain number ranges for number assignment for handling unit
identification via number range intervals.

There are two types of number assignment:

 Internal number assignment

The SAP System automatically assigns a sequential number from the specified number
range.

 External number assignment

When creating a handling unit, you use a number from the external number range.

It is possible to maintain multiple internal and external number range intervals in order to assign
numbers from different intervals to various packaging material types.

Requirements
The number assignment section in the packaging material type of the packaging material must
be customized for number assignment from an internal or external number range interval in
order for it to take place.

Standard settings
A delivery of an internal and external number range interval with suggested values is available.

Recommendation
When choosing your intervals, make sure that the number ranges will not overlap.
Activities
To define a number range, you must insert a new number range interval:

1. Enter an alphanumerical key with a maximum of two characters.


2. Enter the limits for the number interval. Individual number intervals may not overlap. In
other words, each number may only appear once.
3. If the number range is to be used for external number assignment, indicate it as such.

Transportation
You transport number range objects as follows:

Choose Interval -> Transport in the accounting document Number Range screen.

All intervals for the selected number range object are deleted in the target system first. After the
import, only the intervals you export are present. The number statuses are imported with their
values at the time of export.

Dependent tables are not transported or converted.

Further notes
If you also plan to use handling units in the warehouse in connection with storage units, make
sure that the maintenance for number range intervals for storage units has the same length as
the intervals maintained here.

Business Attributes
ASAP Roadmap ID 204 Establish Functions and Processes

Mandatory / Optional 2 Optional activity

Critical / Non-Critical 2 Non-critical

Country-Dependency A Valid for all countries

Assigned Application Components


Documentation Object Documentation Object Current line Application Applic
Class Name number Component

SIMG SIMG_HUMIDHUEX 0 HUM0000002 Basic fun

Maintenance Objects
Maintenance object type C Customizing Object

Assigned
objects

Customizing Object Type Transaction Sub-object Do not Skip Subset Descr


Object Code Summarize Dialog Box

SNUM T - Individual HUEX 0000000001 Numbe


transaction object Mainten

History
Last changed by/on SAP 19990611

SAP Release Created


in

You might also like