# BAPI_REQUISITION_CHANGE — Change Purchase Requisition

> Changes purchase requisition items and their account assignment with the older interface, which compares an old and a new version of each item. It is used by custom programs that adjust quantities, dates or account assignment of existing requisitions. Read the current values with BAPI_REQUISITION_GETDETAIL, pass them as the old rows and the edited copy as the new rows, then commit with BAPI_TRANSACTION_COMMIT.

- 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-change/

## Importing parameters

| Parameter | Type | Description | Required |
|---|---|---|---|
| NUMBER | BAPIEBAN-PREQ_NO | Purchase requisition number | Yes |

## Tables parameters

| Parameter | Type | Description | Required |
|---|---|---|---|
| REQUISITION_ITEMS_OLD | BAPIEBANV | Items: old values | Yes |
| REQUISITION_ITEMS_NEW | BAPIEBANV | Items: new values | Yes |
| REQUISITION_ACCOUNT_OLD | BAPIEBKNV | Account assignment: old values | - |
| REQUISITION_ACCOUNT_NEW | BAPIEBKNV | Account assignment: new values | - |
| RETURN | BAPIRETURN | Return messages | - |

## Call template (ABAP)

```abap
CALL FUNCTION 'BAPI_REQUISITION_CHANGE'
  EXPORTING
    number = lv_number
  TABLES
    requisition_items_old = lt_requisition_items_old
    requisition_items_new = lt_requisition_items_new
    requisition_account_old = lt_requisition_account_old
    requisition_account_new = lt_requisition_account_new
    return = lt_return.
```

## Related tables

EBAN, EBKN

