# BAPI_WHSE_STOCK_GET_DETAIL — Get Warehouse Stock per Quant

> Reads the stock data of one quant in a warehouse number, such as material, batch, storage bin and quantities. It is used by RF, label printing and interface programs that need quant details through a released API. Read STOCKDATA only when RETURN contains no error.

- Modules: WM
- Type: BAPI
- Function group: L3016
- Remote-enabled (RFC): Yes
- S/4HANA status: Used the same way in S/4HANA
- URL: https://nekuhub.com/en/functions/bapi-whse-stock-get-detail/

## Importing parameters

| Parameter | Type | Description | Required |
|---|---|---|---|
| WHSENUMBER | BAPI3016C-WHSENUMBER | Warehouse number | Yes |
| QUANT | BAPI3016C-QUANT | Quant number | Yes |

## Tables parameters

| Parameter | Type | Description | Required |
|---|---|---|---|
| STOCKDATA | BAPIQUANT | Stock data of the quant | Yes |
| EXTENSIONOUT | BAPIPAREX | Customer extension output | Yes |
| RETURN | BAPIRET2 | Return messages | Yes |

## Call template (ABAP)

```abap
CALL FUNCTION 'BAPI_WHSE_STOCK_GET_DETAIL'
  EXPORTING
    whsenumber = lv_whsenumber
    quant = lv_quant
  TABLES
    stockdata = lt_stockdata
    extensionout = lt_extensionout
    return = lt_return.
```

## Related tables

LQUA

