# BAPI_BUPA_ROLE_ADD_2 — Add Business Partner Role

> Adds a business partner role (for example FLCU01 customer, FLVN01 vendor or a custom role) to an existing business partner with an optional validity period. It is used after BAPI_BUPA_CREATE_FROM_DATA in partner migrations and interfaces. Pass BUSINESSPARTNERROLE and the validity dates, check RETURN and call BAPI_TRANSACTION_COMMIT; role-specific data such as company code data is maintained with other APIs.

- Modules: CA
- Type: BAPI
- Function group: BUBA_3
- Remote-enabled (RFC): Yes
- S/4HANA status: Used the same way in S/4HANA
- URL: https://nekuhub.com/en/functions/bapi-bupa-role-add-2/

## Importing parameters

| Parameter | Type | Description | Required |
|---|---|---|---|
| BUSINESSPARTNER | BAPIBUS1006_HEAD-BPARTNER | Business partner number | Yes |
| BUSINESSPARTNERROLECATEGORY | BAPIBUS1006_BPROLES-PARTNERROLECATEGORY | Business partner role category | - |
| ALL_BUSINESSPARTNERROLES | BAPIBUS1006_X-MARK | Add all roles of the category | - |
| BUSINESSPARTNERROLE | BAPIBUS1006_BPROLES-PARTNERROLE | Business partner role | - |
| DIFFERENTIATIONTYPEVALUE | BAPIBUS1006_BPROLES-DIFFTYPEVALUE | Differentiation type value | - |
| VALIDFROMDATE | BAPIBUS1006_BPROLE_VALIDITY-BPROLEVALIDFROM | Valid from | - |
| VALIDUNTILDATE | BAPIBUS1006_BPROLE_VALIDITY-BPROLEVALIDTO | Valid to | - |

## Tables parameters

| Parameter | Type | Description | Required |
|---|---|---|---|
| RETURN | BAPIRET2 | Return messages | - |

## Call template (ABAP)

```abap
CALL FUNCTION 'BAPI_BUPA_ROLE_ADD_2'
  EXPORTING
    businesspartner = lv_businesspartner
  TABLES
    return = lt_return.
```

## Related tables

BUT100

