# BAPI_FUNCLOC_CREATE — Create Functional Location

> Creates a functional location from its label (EXTERNAL_NUMBER) with general and location-specific data. It is used to build plant structures during migration, usually top-down so that superior locations exist first. The label must fit the structure indicator; check RETURN and call BAPI_TRANSACTION_COMMIT.

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

## Importing parameters

| Parameter | Type | Description | Required |
|---|---|---|---|
| EXTERNAL_NUMBER | BAPI_ITOB_PARMS-FUNCLOC | Functional location label | Yes |
| LABELING_SYSTEM | BAPI_ITOB_PARMS-LABEL_SYST | Labeling system | - |
| DATA_GENERAL | BAPI_ITOB | General data | Yes |
| DATA_SPECIFIC | BAPI_ITOB_FL_ONLY | Functional location-specific data | Yes |
| AUTOMATIC_INSTALL | BAPIFLAG-BAPIFLAG | Install automatically in superior location | - |

## Exporting parameters

| Parameter | Type | Description |
|---|---|---|
| FUNCTLOCATION | BAPI_ITOB_PARMS-FUNCLOC_INT | Created functional location (internal number) |
| DATA_GENERAL_EXP | BAPI_ITOB | General data (result) |
| DATA_SPECIFIC_EXP | BAPI_ITOB_FL_ONLY | Specific data (result) |
| RETURN | BAPIRET2 | Return message |

## Tables parameters

| Parameter | Type | Description | Required |
|---|---|---|---|
| EXTENSIONIN | BAPIPAREX | Customer extension (input) | - |
| EXTENSIONOUT | BAPIPAREX | Customer extension (output) | - |

## Call template (ABAP)

```abap
CALL FUNCTION 'BAPI_FUNCLOC_CREATE'
  EXPORTING
    external_number = lv_external_number
    data_general = lv_data_general
    data_specific = lv_data_specific
  IMPORTING
    functlocation = lv_functlocation
    data_general_exp = lv_data_general_exp
    data_specific_exp = lv_data_specific_exp
    return = lv_return
  TABLES
    extensionin = lt_extensionin
    extensionout = lt_extensionout.
```

## Related tables

IFLOT, IFLOTX, ILOA

