×

[PR]この広告は3ヶ月以上更新がないため表示されています。
ホームページを更新後24時間以内に表示されなくなります。




Sapass

 Simplify SAP R/3 development with Excel VBA/VB RFC  
Home> Bapi>HandlingUnit



Index

HandlingUnit

HandlingUnit


Definition:


The "Handling unit" business object illustrates the packing structure
in the system. A handling unit (HU) consists of a packaging material and can contain as many items as you like.




Use:


You can use the "Handling unit" business object to create and process
handling units without object reference, which are handling units that
are not assigned to any other object (such as a delivery or a production order).



Structure:


A handling unit groups several items together. These items may include
materials, auxiliary packaging materials or other handling units.



Example:


A pallet containing 20 tires and shrinkwrap can be reflected in the
system as follows: the pallet would be the handling unit, the tires
would be a material item (quantity: 20) and the shrinkwrap would be an auxiliary packaging-material item.


If the pallet described above is in a container, you would use a second
handling unit to represent it in the system. This handling unit (the container) would have one HU item, which would be the pallet.



11-Dec-2005


Methods

Available Methods


  • Create : Create handling unit with items [ BAPI_HU_CREATE ]
  • Delete : BAPI for deleting handling units [ BAPI_HU_DELETE ]
  • DisplayHistory : Displays the history of an HU [ BAPI_HU_DISPLAY_HISTORY ]
  • Getlist : Select handling units for deliveries, shipments, production order, and so on [ BAPI_HU_GETLIST ]
  • GetListOutput : Select handling unit output [ BAPI_HU_GET_LIST_MSG ]
  • Pack : Pack an item into an HU [ BAPI_HU_PACK ]
  • ProcessOutput : HU output processing [ BAPI_HU_PROCESS_MSG ]
  • ProcessOutputDirect : Select and process handling-unit outputs [ BAPI_HU_PROCESS_MSG_DIRECT ]
  • Repack : Repack HUs and HU items [ BAPI_HU_REPACK ]
  • Unpack : Unpack an item from a handling unit [ BAPI_HU_UNPACK ]

11-Dec-2005


Create

Create


Functionality

You can use this method to create non-assigned handling units withoutstock information. These handling units may also be created with items,
if you like. Serial numbers can also be included for each handling-unit item at this point.
You can also create nested handling units by accessing this method more than once.

Example

Example 1:

Creating a non-assigned handling unit with packaging material PALLET with a "Planned HU" physical status:


HEADERPROPOSAL: pack_mat = 'PALETTE'
hu_status_init = 'A'.

Example 2:

Following access of the above method (example 1), the return parameterHUKEY returns the ID of the handling unit that was created in the KEY =
ID1 field. To pack the handling unit that was just created in anotherhandling unit, call up the BAPI_HU_CREATE method again with the following import parameters:

IHEADERPROPOSAL: pack_mat = 'CONTAINER'
ITEMPROPOS AL: hu_item_type = '3'


lower_level_key = ID1

You have now created a nested handling unit (a pallet inside a container).

Further Information

For a more exact description of how a parameter is to be filled in, refer to the documentation for the parameter in question.


11-Dec-2005


Delete

Delete


Deleting a handling unit.

The handling unit that is identified by the HUKEY import parameter is deleted.

Special case: If the handling unit that is to be deleted is itselfthe contents of a higher-level handling unit (in other words, it has been packed into another HU), it is only deleted if the import
indicator "IfPacked" is set.

If the handling unit contains other lower-level handling units, you canuse the import indicator "WithLowerHUs" to dictate whether the systemshould delete the entire sub-hierarchy. If this indicator is not set, the lower-level handling units are unpacked.


Example

Deleting a container (key = KEY1) that contains a pallet (key = KEY2):

Example 1:

Import parameter: hukey-hu_exid = 'KEY1'
WithLowerHus = Space
=> The pallet is unpacked and the container-HU is deleted.


Example 2:

Import parameter: hukey-hu_exid = 'KEY1'
WithLowerHus = 'X'
=> Both the pallet and the container are deleted.

Example 3:

Import parameter: hukey-hu_exid = 'KEY2'
IfPacked = 'X'
=> The pallet is deleted.



11-Dec-2005


DisplayHistory

DisplayHistory


This method calls up the display dialog for a handling unit's history.


11-Dec-2005


Getlist

Getlist


This method returns all keys for the corresponding handling units orall headers and items including the higher- and lower-level handling units for a quantity of handling unit identificationsor for several objects.

Notes

If both import tables are entered, only one of the two are taken into consideration.


11-Dec-2005


GetListOutput

GetListOutput


You can use this method to select HU outputs. Limit the search by usingHU keys, output types and transmission type. The table of the selected outputs (MESSAGEKEY) is returned to the BAPI interface.

The processing mode, which serves as the control, must be entered.
Status and send time are then determined. A quantity of similar outputs(outputs whose only difference is creation date and time) is alwaysobserved. Depending on the mode (referring to the newest output), the system selects according to the following:

1: Initial processing
Outputs with a status of 0 and a send time of 3 are selected.


2: Repeated processing
Here, the newest output must have status 1 or 2.

3: Error processing
The system checks whether the newest output has status 2. In repeatprocessing or error processing, the send time is irrelevant since theoutput was already processed. The output type determines whether an
output is allowed to be repeated for these two modes. You can set the"manually changeable/repeatable" (T685B-NBEAR) attribute in the output type.


11-Dec-2005


Pack

Pack


Packing in a handling unit. If the handling unit already contains thematerial that is to be packed with the same stock category, the existing item is increased by the corresponding quantity. If thematerial that is to be packed does not exist yet in the handling unit
(or if the object that is to be packed is a handling unit), the system adds a new item.

Example

Handling unit 4712 is to be packed into a handling unit with external identification 4711.
HUKEY-HU_EXID = '4711'.
ITEMPROPOSAL:

HU_ITEM_TYPE = '3'.


LOWER_LEVEL_EXID = '4712'.


11-Dec-2005


ProcessOutput

ProcessOutput


This method processes outputs that belong to handling units.

All output key-attributes that were specified and found using the"MessageKey" parameter are processed by this method. If a processingmode is also specified using the "Processing" parameter, the output
that was specified is processed according to this processing mode.

Dynamic control of the output device is also an option that is offered using the 'DynamicOutputDevice' parameter.


11-Dec-2005


ProcessOutputDirect

ProcessOutputDirect


This method includes the "GetListOutput" and "ProcessOutput" methods.

The outputs that belong to the handling units that were specified inthe HUKEY parameter were selected and then processed immediately.

Dynamic control of the output device is offered as an option via the "DynamicOutputDevice" parameter.


Outputs are sorted according to the value specified in the "SortMessage" parameter.

The processing status of each output that was processed can be accessed in the "MessageProtocol" return parameter.


11-Dec-2005


Repack

Repack


If quantities are to be repacked from one handling unit (HU) to another(or if entire HUs are to be repacked), you can either access theHU_UNPACK und HU_PACK methods separately or accomplish the same thingin one step by using this method. However, it is not possible to change
the packed quantites with this method; you can only change the packing structure.

Example

Example 1:

The handling unit PALLET 1 contains 9 boxes and PALLET 2 contains 7boxes. You can use this method to repack one box from PALLET 1 to PALLET 2:


Fill in the HUKEY parameter with the destination HU (PALLET 2).

The REPACK table will then contain an entry that looks like this:

1. SOURCE_HU: BOX 1

2. FLAG_PACKHU: 'X'

Example 2:

PALLET 1 contains 20 pieces of material MAT1. PALLET 2 is empty. 5 pieces are to be repacked.


Fill in the HUKEY parameter with the destination HU (PALLET 2).

The REPACK table will then contain an entry that looks like this:

1. SOURCE_HU: PALLET 1

2. FLAG_PACKHU: ' '

3. PACK_QTY: 5

4. BASE_UOM: PC

5. MATERIAL: MAT1


The other stock categories of the material should also be specified, where necessary.

Notes

When you repack handling units, the HU that is to be repacked is alwaysentered in the SOURCE_HU field. The system can tell whether this HU is
already packed and then unpacks it from its higher-level HU before it is packed in the destination HU (HUKEY).
If the handling unit in question is to become a highest-level handlingunit rather than be repacked into another handling unit, the entry inthe destination HU field should be the identical to the source HU field.


If you want to repack into a handling unit that does not exist yet,fill in the HEADERPROPOSAL parameter and enter either "$1" or the HUidentification as the destination handling unit, under which the HU is to be created.


11-Dec-2005


Unpack

Unpack


Unpacking handling units or materials from a handling unit.

Lower-level handling units, material items or auxiliary packagingmaterials can be unpacked. Even partial quantities can be unpacked from material items and auxiliary packaging materials.


Example

Handling unit 4711 contains handling units 4712 and 4713 and 12 pieces of material XY.

1. Unpacking 4712:

ITEMUNPACK-UNPACK_EXID = 4712. HUKEY-HU_EXID = 4711.

2. Unpacking 5 pieces of XY:


HUKEY-HU_EXID = 4711;

ITEMUNPACK-QUANTITY = '5'. ITEMUNPACK-MEINS = 'PC'.

ITEMUNPACK-MATERIAL = 'XY'. ITEMUNPACK-PLANT = .... and so on.

You can also specify the ITEMUNPACK-HU_ITEM_NUMBER, if you know it.

.



11-Dec-2005