# L_INV_COUNT_EXT — Enter Warehouse Inventory Count from External System

> Enters count results for WM inventory documents that were counted outside SAP, for example with handheld scanners. It is used in physical inventory interfaces and RF counting programs. Run it with I_CHECK_ONLY first to validate the lines in S_LINV, then post; each line needs either a quantity or the empty-bin indicator.

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

## Importing parameters

| Parameter | Type | Description | Required |
|---|---|---|---|
| I_CHECK_ONLY | RL04I-XFELD | Check only, do not post | - |
| I_COMMIT | RL03B-COMIT | Commit inside the function | - |

## Exporting parameters

| Parameter | Type | Description |
|---|---|---|
| ALLE_LGNUM | LINV-LGNUM | Warehouse number |
| ALLE_IVNUM | LINV-IVNUM | Inventory document number |
| ALLE_NVERS | LINV-NVERS | Recount version |

## Tables parameters

| Parameter | Type | Description | Required |
|---|---|---|---|
| S_LINV | E1LINVX | Count results | Yes |

## Exceptions

- BIN_NOT_IN_IVNUM: Storage bin not in the inventory document
- CHECK_PROBLEM: Check failed
- COUNTS_NOT_UPDATED: Counts not updated
- EITHER_QUANTITY_OR_EMPTY_BIN: Enter either a quantity or empty bin
- IVNUM_NOT_FOUND: Inventory document not found
- LOCK_ERROR: Lock error
- L_INV_READ: Error reading the inventory document
- NO_COUNT_ALLOWED: Counting not allowed

## Call template (ABAP)

```abap
CALL FUNCTION 'L_INV_COUNT_EXT'
  IMPORTING
    alle_lgnum = lv_alle_lgnum
    alle_ivnum = lv_alle_ivnum
    alle_nvers = lv_alle_nvers
  TABLES
    s_linv = lt_s_linv
  EXCEPTIONS
    bin_not_in_ivnum = 1
    check_problem = 2
    counts_not_updated = 3
    either_quantity_or_empty_bin = 4
    ivnum_not_found = 5
    lock_error = 6
    l_inv_read = 7
    no_count_allowed = 8
    OTHERS = 9.
```

## Related tables

LINK, LINP, LINV

