# BAPI_REQUIREMENTS_CREATE — Create Planned Independent Requirements

> Creates planned independent requirements for a material, plant, requirements type and version, with schedule lines, like MD61. It is the standard way to load demand plans or sales forecasts from Excel or a planning tool. The BAPI has its own DO_COMMIT switch, so decide whether it commits or your program calls BAPI_TRANSACTION_COMMIT, and check the RETURN table.

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

## Importing parameters

| Parameter | Type | Description | Required |
|---|---|---|---|
| REQUIREMENTS_ITEM | BAPISITEMR | Requirement item data | Yes |
| DO_COMMIT | BAPISPARAM-DO_COMMIT | Commit inside the BAPI | - |
| UPDATE_MODE | BAPISPARAM-UPDATE_MODE | Update mode | - |

## Exporting parameters

| Parameter | Type | Description |
|---|---|---|
| MATERIAL | BAPISITEMR-MATERIAL | Material number |
| MATERIAL_EVG | BAPIMGVMATNR | Long material number (external) |
| MATERIAL_LONG | BAPISITEMR-MATERIAL_LONG | Material number (long) |
| MRP_AREA | BAPISITEMR-MRP_AREA | MRP area |
| PLANT | BAPISITEMR-PLANT | Plant |
| REQMTSPLANNUMBER | BAPISITEMR-REQ_NUMBER | Requirements plan number |
| REQUIREMENTSTYPE | BAPISITEMR-REQU_TYPE | Requirements type |
| REQ_PLAN_ID_EXT | BAPISITEMR-REQ_PLAN_ID_EXT | External requirements plan ID |
| REQ_SEGMENT | BAPISITEMR-REQ_SEGMENT | Requirement segment |
| VERSION | BAPISITEMR-VERSION | Version |

## Tables parameters

| Parameter | Type | Description | Required |
|---|---|---|---|
| REQUIREMENTS_SCHEDULE_IN | BAPISSHDIN | Schedule lines | Yes |
| REQUIREMENTS_CHAR_IN | BAPISCHARR | Configuration (characteristic) data | - |
| RETURN | BAPIRETURN1 | Return messages | Yes |

## Call template (ABAP)

```abap
CALL FUNCTION 'BAPI_REQUIREMENTS_CREATE'
  EXPORTING
    requirements_item = lv_requirements_item
  IMPORTING
    material = lv_material
    material_evg = lv_material_evg
    material_long = lv_material_long
    mrp_area = lv_mrp_area
    plant = lv_plant
    reqmtsplannumber = lv_reqmtsplannumber
    requirementstype = lv_requirementstype
    req_plan_id_ext = lv_req_plan_id_ext
    req_segment = lv_req_segment
    version = lv_version
  TABLES
    requirements_schedule_in = lt_requirements_schedule_in
    requirements_char_in = lt_requirements_char_in
    return = lt_return.
```

## Related tables

PBED, PBIM

