# BAPI_RESERVATION_CREATE1 — Create Reservation

> Creates a manual material reservation with header and items, as in MB21. Maintenance, project and internal requisition programs use it to reserve stock for a cost center, order or WBS element. Check RETURN, optionally use TESTRUN first and call BAPI_TRANSACTION_COMMIT to save the reservation.

- Modules: MM
- Type: BAPI
- Function group: MB_BUS2093
- Remote-enabled (RFC): Yes
- S/4HANA status: Used the same way in S/4HANA
- URL: https://nekuhub.com/en/functions/bapi-reservation-create1/

## Importing parameters

| Parameter | Type | Description | Required |
|---|---|---|---|
| RESERVATIONHEADER | BAPI2093_RES_HEAD | Reservation header data | Yes |
| TESTRUN | BAPI2093_TEST | Test run (no update) | - |
| ATPCHECK | BAPI2093_ATPCHECK | ATP check control | - |
| CALCHECK | BAPI2093_CALCHECK | Factory calendar check | - |

## Exporting parameters

| Parameter | Type | Description |
|---|---|---|
| RESERVATION | BAPI2093_RES_KEY-RESERV_NO | Number of the created reservation |

## Tables parameters

| Parameter | Type | Description | Required |
|---|---|---|---|
| RESERVATIONITEMS | BAPI2093_RES_ITEM | Reservation items | Yes |
| PROFITABILITYSEGMENT | BAPI_PROFITABILITY_SEGMENT | Profitability segment | Yes |
| RETURN | BAPIRET2 | Return messages | Yes |
| EXTENSIONIN | BAPIPAREX | Customer fields (inbound) | - |

## Call template (ABAP)

```abap
CALL FUNCTION 'BAPI_RESERVATION_CREATE1'
  EXPORTING
    reservationheader = lv_reservationheader
  IMPORTING
    reservation = lv_reservation
  TABLES
    reservationitems = lt_reservationitems
    profitabilitysegment = lt_profitabilitysegment
    return = lt_return
    extensionin = lt_extensionin.
```

## Related tables

RESB, RKPF

