# BAPI_INSPLOT_GETLIST — Select Inspection Lots

> Selects inspection lots by plant, material, batch, vendor, customer, purchase order, order, material document or status. It is used by LIMS and worklist programs to find lots waiting for results or a decision. Limit the result with MAX_ROWS and the STATUS_ flags.

- Modules: QM
- Type: BAPI
- Function group: 2045
- Remote-enabled (RFC): Yes
- S/4HANA status: Used the same way in S/4HANA
- URL: https://nekuhub.com/en/functions/bapi-insplot-getlist/

## Importing parameters

| Parameter | Type | Description | Required |
|---|---|---|---|
| PLANT | BAPI2045L1-PLANT | Plant | - |
| MATERIAL | BAPI2045L1-MATERIAL | Material number | - |
| BATCH | BAPI2045L1-BATCH | Batch | - |
| VENDOR | BAPI2045L1-VENDOR | Vendor | - |
| CUSTOMER | BAPI2045L1-CUSTOMER | Customer | - |
| PO_NUMBER | BAPI2045L1-PO_NUMBER | Purchase order number | - |
| PO_ITEM | BAPI2045L1-PO_ITEM | Purchase order item | - |
| ORDER | BAPI2045L1-ORDER_NO | Production or process order | - |
| MAT_DOC | BAPI2045L1-MAT_DOC | Material document number | - |
| MATDOC_ITM | BAPI2045L1-MATDOC_ITM | Material document item | - |
| DELIV_NUMB | BAPI2045L1-DELIV_NUMB | Delivery number | - |
| CREAT_DAT | BAPI2045L1-CREAT_DAT | Creation date | - |
| STATUS_CREATED | BAPI2045AS-STATUS_CREATED | Select lots with status created | - |
| STATUS_RELEASED | BAPI2045AS-STATUS_RELEASED | Select released lots | - |
| STATUS_UD | BAPI2045AS-STATUS_UD | Select lots with usage decision | - |
| MAX_ROWS | BAPI2045S1-MAXROWS | Maximum number of hits | - |

## Exporting parameters

| Parameter | Type | Description |
|---|---|---|
| RETURN | BAPIRETURN1 | Return messages |

## Tables parameters

| Parameter | Type | Description | Required |
|---|---|---|---|
| INSPLOT_LIST | BAPI2045L1 | Inspection lots found | Yes |

## Call template (ABAP)

```abap
CALL FUNCTION 'BAPI_INSPLOT_GETLIST'
  IMPORTING
    return = lv_return
  TABLES
    insplot_list = lt_insplot_list.
```

## Related tables

QALS

