# BAPI_REQUISITION_CREATE — Create Purchase Requisition

> Creates a purchase requisition from item, account assignment and text tables using the older requisition interface. Many existing upload programs and interfaces still call it, although BAPI_PR_CREATE is the newer alternative. Fill the material number in internal format (conversion exit for leading zeros), check RETURN and call BAPI_TRANSACTION_COMMIT after a successful run.

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

## Importing parameters

| Parameter | Type | Description | Required |
|---|---|---|---|
| SKIP_ITEMS_WITH_ERROR | BAPIMMPARA-SELECTION | Skip faulty items | - |
| AUTOMATIC_SOURCE | BAPIMMPARA-SELECTION | Automatic source determination | - |

## Exporting parameters

| Parameter | Type | Description |
|---|---|---|
| NUMBER | BAPIEBANC-PREQ_NO | Number of the created purchase requisition |

## Tables parameters

| Parameter | Type | Description | Required |
|---|---|---|---|
| REQUISITION_ITEMS | BAPIEBANC | Item data | Yes |
| REQUISITION_ACCOUNT_ASSIGNMENT | BAPIEBKN | Account assignment data | - |
| REQUISITION_ITEM_TEXT | BAPIEBANTX | Item texts | - |
| REQUISITION_ADDRDELIVERY | BAPIMERQADDRDELIVERY | Delivery address | - |
| RETURN | BAPIRETURN | Return messages | - |
| EXTENSIONIN | BAPIPAREX | Customer fields (inbound) | - |

## Call template (ABAP)

```abap
CALL FUNCTION 'BAPI_REQUISITION_CREATE'
  IMPORTING
    number = lv_number
  TABLES
    requisition_items = lt_requisition_items
    requisition_account_assignment = lt_requisition_account_assignment
    requisition_item_text = lt_requisition_item_text
    requisition_addrdelivery = lt_requisition_addrdelivery
    return = lt_return
    extensionin = lt_extensionin.
```

## Related tables

EBAN, EBKN

