# L_TR_CREATE — Create Transfer Requirement

> Checks and creates transfer requirements from the items passed in T_LTBA, like LB01. It is used in custom programs that request stock movements in WM, for example replenishment requests from production or external systems. Set I_SAVE_ONLY_ALL when either all items or none should be saved, and handle ITEM_ERROR.

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

## Importing parameters

| Parameter | Type | Description | Required |
|---|---|---|---|
| I_SINGLE_ITEM | RL02A-EINPO | One item per transfer requirement | - |
| I_SAVE_ONLY_ALL | RL02A-SNWAR | Save only if all items are error-free | - |
| I_UPDATE_TASK | RL02A-VERBU | Update via update task | - |
| I_COMMIT_WORK | RL02A-COMMI | Commit inside the function | - |

## Tables parameters

| Parameter | Type | Description | Required |
|---|---|---|---|
| T_LTBA | LTBA | Transfer requirement items | Yes |

## Exceptions

- ITEM_ERROR: Error in an item
- ITEM_WITHOUT_NUMBER: Item without number
- NO_ENTRY_IN_INT_TABLE: Internal table is empty
- NO_UPDATE_ITEM_ERROR: Not saved because of item errors

## Call template (ABAP)

```abap
CALL FUNCTION 'L_TR_CREATE'
  TABLES
    t_ltba = lt_t_ltba
  EXCEPTIONS
    item_error = 1
    item_without_number = 2
    no_entry_in_int_table = 3
    no_update_item_error = 4
    OTHERS = 5.
```

## Related tables

LTBK, LTBP

