# BAPI_FIXEDASSET_CREATE1 — Create Fixed Asset

> Creates an asset master record (main number or subnumber) with general, posting, time-dependent and depreciation area data, like transaction AS01. It is the standard choice for asset master data migration and for interfaces that create assets from investment or procurement systems. Fill each data structure together with its …X flag structure, use TESTRUN for a simulation and call BAPI_TRANSACTION_COMMIT after a successful run.

- Modules: FI
- Type: BAPI
- Function group: 1022
- Remote-enabled (RFC): Yes
- S/4HANA status: Used the same way in S/4HANA
- URL: https://nekuhub.com/en/functions/bapi-fixedasset-create1/

## Importing parameters

| Parameter | Type | Description | Required |
|---|---|---|---|
| KEY | BAPI1022_KEY | Key of the asset to create | Yes |
| REFERENCE | BAPI1022_REFERENCE | Reference asset for copying | - |
| CREATESUBNUMBER | BAPI1022_MISC-XSUBNO | Create asset subnumber | - |
| CREATEGROUPASSET | BAPI1022_MISC-XANLGR | Asset is a group asset | - |
| TESTRUN | BAPI1022_MISC-TESTRUN | Test run (no update) | - |
| GENERALDATA | BAPI1022_FEGLG001 | General data | - |
| GENERALDATAX | BAPI1022_FEGLG001X | Change flags for general data | - |
| POSTINGINFORMATION | BAPI1022_FEGLG002 | Posting information | - |
| POSTINGINFORMATIONX | BAPI1022_FEGLG002X | Change flags for posting information | - |
| TIMEDEPENDENTDATA | BAPI1022_FEGLG003 | Time-dependent data | - |
| TIMEDEPENDENTDATAX | BAPI1022_FEGLG003X | Change flags for time-dependent data | - |
| ALLOCATIONS | BAPI1022_FEGLG004 | Allocations | - |
| ALLOCATIONSX | BAPI1022_FEGLG004X | Change flags for allocations | - |
| ORIGIN | BAPI1022_FEGLG009 | Origin data | - |
| ORIGINX | BAPI1022_FEGLG009X | Change flags for origin data | - |
| INVENTORY | BAPI1022_FEGLG011 | Inventory data | - |
| INVENTORYX | BAPI1022_FEGLG011X | Change flags for inventory data | - |

## Exporting parameters

| Parameter | Type | Description |
|---|---|---|
| COMPANYCODE | BAPI1022_1-COMP_CODE | Company code of the created asset |
| ASSET | BAPI1022_1-ASSETMAINO | Main number of the created asset |
| SUBNUMBER | BAPI1022_1-ASSETSUBNO | Subnumber of the created asset |
| ASSETCREATED | BAPI1022_REFERENCE | Asset created |
| RETURN | BAPIRET2 | Return messages |

## Tables parameters

| Parameter | Type | Description | Required |
|---|---|---|---|
| DEPRECIATIONAREAS | BAPI1022_DEP_AREAS | Depreciation areas | - |
| DEPRECIATIONAREASX | BAPI1022_DEP_AREASX | Change flags for depreciation areas | - |
| EXTENSIONIN | BAPIPAREX | Customer enhancements | - |

## Call template (ABAP)

```abap
CALL FUNCTION 'BAPI_FIXEDASSET_CREATE1'
  EXPORTING
    key = lv_key
  IMPORTING
    companycode = lv_companycode
    asset = lv_asset
    subnumber = lv_subnumber
    assetcreated = lv_assetcreated
    return = lv_return
  TABLES
    depreciationareas = lt_depreciationareas
    depreciationareasx = lt_depreciationareasx
    extensionin = lt_extensionin.
```

## Related tables

ANLA, ANLB, ANLZ

