# Automatic Replenishment Transfer Order Job for Fixed Picking Bins

> A custom background job that evaluates stock in fixed picking bins together with the pending pick demand of open deliveries, and automatically creates replenishment transfer orders from reserve storage for bins that will fall below their minimum quantity. The bin is refilled before a picker reaches an empty slot.

- Type: Program, Custom development, Background program
- Module: WM
- Estimated effort: M (4–6 working days)
- Last updated: 2026-11-17
- URL: https://nekuhub.com/en/programs/automatic-fixed-bin-replenishment-transfer-order-job/


## Why is the standard not enough?

LP21 creates transfer requirements for fixed bin replenishment, but it only compares today's stock with the minimum quantity; it ignores the not-yet-picked demand of open deliveries and does not turn the replenishment quantity into a transfer order using a rounding rule. The requirements must then be processed separately in LT04, and during heavy waves bins run empty in the middle of the day.

### Closest standard alternatives

- LP21: Creates transfer requirements for fixed bin replenishment; ignores open delivery demand.
- LT10: Used for manual stock transfers; does not calculate the replenishment need.

## Tables used

| Table | Role | Access | Join | System |
|---|---|---|---|---|
| MLGT | Fixed bin, minimum/maximum bin quantity and replenishment quantity (driving table) | Read | - | ECC + S/4 |
| LQUA | Stock in the fixed bin and source quants in reserve storage | Read | LQUA-LGNUM = MLGT-LGNUM AND LQUA-MATNR = MLGT-MATNR | ECC + S/4 |
| LIPS | Delivery demand without a transfer order yet | Read | LIPS-LGNUM = MLGT-LGNUM AND LIPS-MATNR = MLGT-MATNR | ECC + S/4 |
| LIKP | Loading and goods issue date of the delivery | Read | LIKP-VBELN = LIPS-VBELN | ECC + S/4 |
| LTAK | Header of the created replenishment transfer order | Write | - | ECC + S/4 |
| LTAP | Open picking items from the fixed bin (read) and the created replenishment item (write) | Read / write | LTAP-LGNUM = MLGT-LGNUM AND LTAP-VLTYP = MLGT-LGTYP AND LTAP-VLPLA = MLGT-LGPLA | ECC + S/4 |

## BAPIs and functions used

- L_TO_CREATE_SINGLE: Creates a replenishment transfer order from reserve storage to the fixed bin

## Selection screen parameters

| Parameter | Description | Type | Reference field | Required |
|---|---|---|---|---|
| S_LGNUM | Warehouse number | Range / multiple | MLGT-LGNUM | Yes |
| S_LGTYP | Picking (fixed bin) storage type | Range / multiple | MLGT-LGTYP | Yes |
| S_MATNR | Material | Range / multiple | MLGT-MATNR | No |
| S_SRCTYP | Reserve (source) storage types | Range / multiple | LQUA-LGTYP | Yes |
| P_LDDAT | Loading date limit for delivery demand | Single value | LIKP-LDDAT | No |
| P_DLVDEM | Include delivery demand | Checkbox | - | No |
| P_TEST | Test mode (list without creating transfer orders) | Checkbox | - | No |

## Result list columns

| Column | Source |
|---|---|
| Material | MLGT-MATNR |
| Fixed bin | MLGT-LGPLA |
| Minimum qty | MLGT-LPMIN |
| Maximum qty | MLGT-LPMAX |
| Bin stock | Calculated: Sum of LQUA-GESME in the fixed bin |
| Open demand | Calculated: Unconfirmed picking items (LTAP-VSOLM) + delivery quantity without transfer order (LIPS-LFIMG) |
| Replenishment qty | Calculated: If remaining stock < LPMIN: LPMAX − remaining stock, rounded to multiples of MLGT-NSMNG |
| Source bin | LTAP-VLPLA |
| Transfer order | LTAK-TANUM |
| Status | Calculated: Created, no replenishment needed, no stock or error |
| Message | Calculated: Message returned by the function |

## How does the program work?

1. For the selected warehouse number and picking storage types, materials with a fixed bin and their minimum (LPMIN), maximum (LPMAX) and replenishment quantity (NSMNG) are read from MLGT.
2. Stock in the fixed bin is summed from LQUA (GESME); picking items from the same bin not yet confirmed (LTAP, PQUIT blank) are deducted as open issues.
3. With 'include delivery demand' selected, the quantity of delivery items (LIKP/LIPS) up to the selected loading date for this warehouse number and material that has no transfer order yet is also deducted.
4. If the remaining stock is below the minimum, replenishment quantity = maximum − remaining stock, rounded to multiples of the replenishment quantity. If no available quant exists in the reserve storage types, the line is logged as 'no stock'.
5. In test mode only the calculation is listed. In a real run L_TO_CREATE_SINGLE creates a transfer order from reserve storage to the fixed bin for each material; the source quant is chosen by the storage type's removal strategy (e.g. FIFO). The result is written to the job log.

## Authorization objects

- L_LGNUM: Authorization to create transfer orders by warehouse number and storage type
- L_BWLVS: Authorization for the replenishment movement type

## Frequently asked questions

### Which movement type is used for replenishment?

The WM movement type set up for replenishment in the warehouse (319 in many systems, or a customer-specific type) is set in the selection-screen variant. Source and destination storage types must match the settings of this movement type.

### Can two replenishments be created for the same bin?

No. If an open (unconfirmed) replenishment transfer order to the fixed bin exists, the quantity on its way is added to stock and a new one is created only if a shortfall remains.

### Does it run on S/4HANA?

It runs for LE-WM and stock room management on S/4HANA. In EWM replenishment is more complete in the standard and this job is not needed.

---
Let us build this program for your system: https://nekuhub.com/en/request-a-quote/?report=wm-fixed-bin-replenishment-job
