# EWM Stock Packing, Transfer into Handling Units and Carton Label Printing

> A custom program that packs free stock from a bin into cartons or pallets by quantity per carton, moves the resulting handling units to the destination bin with a warehouse task and prints the carton label automatically on the user's assigned printer. Packing is completed on one screen with a few fields.

- Type: Program, Custom development, Fiori app
- Module: WM
- Estimated effort: M (7–10 working days)
- Last updated: 2026-11-18
- URL: https://nekuhub.com/en/programs/ewm-stock-packing-into-handling-units-and-carton-label-printing/


## Why is the standard not enough?

/SCWM/PACK is a powerful but multi-step packing screen: creating the handling unit, moving the product, closing it and moving it to the target are separate steps. There is no automatic split by quantity per carton, and the label printer usually depends on the work centre setup; choosing the printer per operator needs extra setup.

### Closest standard alternatives

- /SCWM/PACK: Standard packing screen; multi-step, no automatic split per carton and no per-user printer.
- /SCWM/MON: Monitors handling units and tasks; does not pack.

## Tables used

| Table | Role | Access | Join | System |
|---|---|---|---|---|
| /SCWM/AQUA | Free stock in the source bin | Read | - | ECC + S/4 |
| MARM | Quantity per carton (alternative unit of measure) | Read | - | ECC + S/4 |
| MARA | Packaging material | Read | - | ECC + S/4 |
| /SCWM/HUHDR | Carton and pallet handling units created | Write | - | ECC + S/4 |
| /SCWM/ORDIM_O | Warehouse task moving the handling unit to the destination bin | Write | - | ECC + S/4 |
| /SCWM/ORDIM_C | Confirmed tasks (result list) | Read | - | ECC + S/4 |

## BAPIs and functions used

- FP_FUNCTION_MODULE_NAME: Finds the carton label form
- FP_JOB_OPEN: Opens the print job on the user's printer
- FP_JOB_CLOSE: Closes the print job

## Selection screen parameters

| Parameter | Description | Type | Reference field | Required |
|---|---|---|---|---|
| P_LGNUM | Warehouse number | Single value | /SCWM/AQUA-LGNUM | Yes |
| P_LGPLA | Source bin | Single value | /SCWM/AQUA-LGPLA | Yes |
| P_MATNR | Product | Single value | MARA-MATNR | Yes |
| P_PMAT | Packaging material | Single value | MARA-MATNR | Yes |
| P_QTY | Quantity per carton (from the unit of measure if empty) | Single value | - | No |
| P_NLPLA | Destination bin | Single value | /SCWM/ORDIM_O-NLPLA | Yes |
| P_TEST | Test mode | Checkbox | - | No |

## Result list columns

| Column | Source |
|---|---|
| Handling unit | /SCWM/HUHDR-HUIDENT |
| Packaging material | MARA-MATNR |
| Product | Calculated: /SCWM/AQUA-MATID → /SAPAPO/MATKEY-MATNR |
| Batch | /SCWM/AQUA-CHARG |
| Quantity | /SCWM/AQUA-QUAN |
| Source bin | /SCWM/AQUA-LGPLA |
| Destination bin | /SCWM/ORDIM_O-NLPLA |
| Warehouse task | /SCWM/ORDIM_O-TANUM |
| Label | Calculated: Printed / no printer / test |
| Status | Calculated: Packed and moved, packed, remainder or error |

## How does the program work?

1. The operator enters or scans the warehouse number, source bin, product and packaging material. Free stock in the source bin is read from /SCWM/AQUA (LGPLA, MATID, CAT, QUAN, CHARG); the product GUID is resolved through /SAPAPO/MATKEY.
2. The quantity per carton comes from the product's alternative unit of measure (MARM, e.g. a carton unit) or from the screen; the total is split into full cartons and any remainder is shown with a warning.
3. For each carton a handling unit is created with the packaging material and the stock is packed into it; records are written to /SCWM/HUHDR. If needed, cartons are nested into a pallet handling unit.
4. The new handling units are moved to the destination bin with a warehouse task through /SCWM/TO_CREATE, and the task can be confirmed from the screen.
5. The carton label (handling unit barcode, product, batch, quantity) is printed with an Adobe form; the printer comes from a custom per-user settings table, otherwise the work centre default is used.
6. Test mode only shows the carton split and the task preview.

## Authorization objects

- /SCWM/HU: Authorization to create and pack handling units
- /SCWM/TOCR: Authorization to create warehouse tasks

## Frequently asked questions

### Can it be used on a handheld?

Yes. The same logic can be offered as an RF screen; the operator scans bin, product and packaging material and the label prints on the nearest printer.

### Can the carton label follow a customer format?

Yes. The label form can be chosen per customer or product group; standard shipping label barcode structures are added to the form during installation.

---
Let us build this program for your system: https://nekuhub.com/en/request-a-quote/?report=ewm-stock-packing-carton-label
