# L_TO_CONFIRM — Confirm Transfer Order

> Confirms a transfer order completely or item by item, like LT12, including differences, handling units and separate pick and transfer confirmation. It is the core function behind RF confirmation screens and interfaces from automated warehouses. Pass the items in T_LTAP_CONF or use I_SQUIT for confirmation with requested quantities, and handle the exceptions because many checks are reported that way.

- Modules: WM
- Type: Function module
- Function group: L03B
- Remote-enabled (RFC): Yes
- S/4HANA status: Used the same way in S/4HANA
- URL: https://nekuhub.com/en/functions/l-to-confirm/

## Importing parameters

| Parameter | Type | Description | Required |
|---|---|---|---|
| I_LGNUM | LTAK-LGNUM | Warehouse number | Yes |
| I_TANUM | LTAK-TANUM | Transfer order number | Yes |
| I_SQUIT | RL03T-SQUIT | Confirm with actual = requested quantity | - |
| I_QUKNZ | RL03T-QUKNZ | Confirmation type (pick/transfer) | - |
| I_SUBST | RL03T-SUBST | Include subsystem items | - |
| I_QNAME | LTAP-QNAME | User performing the confirmation | - |
| I_UPDATE_TASK | RL03A-VERBU | Update via update task | - |
| I_COMMIT_WORK | RL03B-COMIT | Commit inside the function | - |

## Tables parameters

| Parameter | Type | Description | Required |
|---|---|---|---|
| T_LTAP_CONF | LTAP_CONF | Items to confirm | Yes |
| T_LTAP_CONF_HU | LTAP_CONF_HU | Handling unit data for confirmation | - |

## Exceptions

- TO_CONFIRMED: Transfer order already confirmed
- TO_DOESNT_EXIST: Transfer order does not exist
- ITEM_CONFIRMED: Item already confirmed
- ITEM_DOESNT_EXIST: Item does not exist
- FOREIGN_LOCK: Object locked by another user
- NOTHING_TO_DO: Nothing to process
- QUANTITY_WRONG: Invalid quantity
- SQUIT_OR_QUANTITIES: Pass either immediate confirmation or quantities
- NO_DIFFERENCES_ALLOWED: Differences not allowed
- NO_NEGATIVE_QUANTITIES: Negative quantities not allowed
- CHARG_MISSING: Batch missing
- NLPLA_WRONG: Invalid destination storage bin
- SU_NOT_FOUND: Storage unit not found
- HU_NOT_FOUND: Handling unit not found
- NOT_ENOUGH_STOCK_IN_HU: Not enough stock in the handling unit
- TWO_STEP_CONFIRMATION_REQUIRED: Two-step confirmation required
- PICK_CONFIRMATION_MISSING: Pick confirmation missing
- INPUT_WRONG: Invalid input
- NO_AUTHORITY: No authorization
- UPDATE_WITHOUT_COMMIT: Update task used without commit

## Call template (ABAP)

```abap
CALL FUNCTION 'L_TO_CONFIRM'
  EXPORTING
    i_lgnum = lv_i_lgnum
    i_tanum = lv_i_tanum
  TABLES
    t_ltap_conf = lt_t_ltap_conf
    t_ltap_conf_hu = lt_t_ltap_conf_hu
  EXCEPTIONS
    to_confirmed = 1
    to_doesnt_exist = 2
    item_confirmed = 3
    item_doesnt_exist = 4
    foreign_lock = 5
    nothing_to_do = 6
    quantity_wrong = 7
    squit_or_quantities = 8
    OTHERS = 9.
```

## Related tables

LQUA, LTAK, LTAP

