SAP Function Modules

BAPI_FIXEDASSET_CREATE1 SAP Function module - Creates an Asset







BAPI_FIXEDASSET_CREATE1 is a standard SAP function module available within R/3 SAP systems depending on your version and release level. Below is the pattern details for this FM showing its interface including any import and export parameters, exceptions etc as well as any documentation contributions (Comments) specific to the object.

See here to view full function module documentation and code listing, simply by entering the name BAPI_FIXEDASSET_CREATE1 into the relevant SAP transaction such as SE37 or SE80.

Associated Function Group: 1022
Released Date: 19.03.1999
Processing type: Remote-Enabled
remote enabled module settings


Pattern for FM BAPI_FIXEDASSET_CREATE1 - BAPI FIXEDASSET CREATE1





CALL FUNCTION 'BAPI_FIXEDASSET_CREATE1' "Creates an Asset
  EXPORTING
    key =                       " bapi1022_key  Key of Asset Being Created
*   reference =                 " bapi1022_reference  Reference for Creating Using Reference
*   createsubnumber =           " bapi1022_misc-xsubno  Create Asset Subnumber?
*   postcap =                   " bapi1022_misc-postcap  Post-capitalization of asset
*   creategroupasset =          " bapi1022_misc-xanlgr  Indicator: Asset is a group asset
*   testrun =                   " bapi1022_misc-testrun  Test Run
*   generaldata =               " bapi1022_feglg001  General Data
*   generaldatax =              " bapi1022_feglg001x  Change Parameters for General Data
*   inventory =                 " bapi1022_feglg011  Inventory
*   inventoryx =                " bapi1022_feglg011x  Change Parameters for Inventory
*   postinginformation =        " bapi1022_feglg002  Posting Information
*   postinginformationx =       " bapi1022_feglg002x  Change Parameters for Posting Information
*   timedependentdata =         " bapi1022_feglg003  Time-Dependent Data
*   timedependentdatax =        " bapi1022_feglg003x  Change Parameters for Time-Dependent Data
*   allocations =               " bapi1022_feglg004  Allocations
*   allocationsx =              " bapi1022_feglg004x  Change Parameters for Allocations
*   origin =                    " bapi1022_feglg009  Origin
*   originx =                   " bapi1022_feglg009x  Change Parameters for Origin
*   investacctassignmnt =       " bapi1022_feglg010  Account Assignment for Investment
*   investacctassignmntx =      " bapi1022_feglg010x  Change Parameters for Investment Account Assignments
*   networthvaluation =         " bapi1022_feglg006  Net Worth Valuation
*   networthvaluationx =        " bapi1022_feglg006x  Change Parameters for Net Worth Valuation
*   realestate =                " bapi1022_feglg007  Real Estate and Similar Rights
*   realestatex =               " bapi1022_feglg007x  Change Parameters for Real Estate
*   insurance =                 " bapi1022_feglg008  Insurance
*   insurancex =                " bapi1022_feglg008x  Change Parameters for Insurance
*   leasing =                   " bapi1022_feglg005  Leasing
*   leasingx =                  " bapi1022_feglg005x  Change Parameters for Leasing
  IMPORTING
    companycode =               " bapi1022_1-comp_code  Company Code of Asset Created
    asset =                     " bapi1022_1-assetmaino  Main Number of Asset Created
    subnumber =                 " bapi1022_1-assetsubno  Subnumber of Created Asset
    assetcreated =              " bapi1022_reference  Asset Created
    return =                    " bapiret2      Information about Errors which Occurred
* TABLES
*   depreciationareas =         " bapi1022_dep_areas  Depreciation Areas
*   depreciationareasx =        " bapi1022_dep_areasx  Change Parameters for Depreciation Areas
*   investment_support =        " bapi1022_inv_support  Investment Support Key
*   extensionin =               " bapiparex     Customer Enhancements
    .  "  BAPI_FIXEDASSET_CREATE1

ABAP code example for Function Module BAPI_FIXEDASSET_CREATE1





The ABAP code below is a full code listing to execute function module BAPI_FIXEDASSET_CREATE1 including all data declarations. The code uses the latest in-line data DECLARATION SYNTAX but I have included an ABAP code snippet at the end to show how declarations would look using the original method of declaring data variables up front. This will allow you to compare and fully understand the new inline method. Please note some of the newer syntax such as the @DATA is not available until a later 4.70 service pack (SP8).

DATA:
ld_companycode  TYPE BAPI1022_1-COMP_CODE ,
ld_asset  TYPE BAPI1022_1-ASSETMAINO ,
ld_subnumber  TYPE BAPI1022_1-ASSETSUBNO ,
ld_assetcreated  TYPE BAPI1022_REFERENCE ,
ld_return  TYPE BAPIRET2 ,
it_depreciationareas  TYPE STANDARD TABLE OF BAPI1022_DEP_AREAS,"TABLES PARAM
wa_depreciationareas  LIKE LINE OF it_depreciationareas ,
it_depreciationareasx  TYPE STANDARD TABLE OF BAPI1022_DEP_AREASX,"TABLES PARAM
wa_depreciationareasx  LIKE LINE OF it_depreciationareasx ,
it_investment_support  TYPE STANDARD TABLE OF BAPI1022_INV_SUPPORT,"TABLES PARAM
wa_investment_support  LIKE LINE OF it_investment_support ,
it_extensionin  TYPE STANDARD TABLE OF BAPIPAREX,"TABLES PARAM
wa_extensionin  LIKE LINE OF it_extensionin .

DATA(ld_key) = 'Check type of data required'.
DATA(ld_reference) = 'Check type of data required'.

DATA(ld_createsubnumber) = some text here

DATA(ld_postcap) = some text here

DATA(ld_creategroupasset) = some text here

DATA(ld_testrun) = some text here
DATA(ld_generaldata) = 'Check type of data required'.
DATA(ld_generaldatax) = 'Check type of data required'.
DATA(ld_inventory) = 'Check type of data required'.
DATA(ld_inventoryx) = 'Check type of data required'.
DATA(ld_postinginformation) = 'Check type of data required'.
DATA(ld_postinginformationx) = 'Check type of data required'.
DATA(ld_timedependentdata) = 'Check type of data required'.
DATA(ld_timedependentdatax) = 'Check type of data required'.
DATA(ld_allocations) = 'Check type of data required'.
DATA(ld_allocationsx) = 'Check type of data required'.
DATA(ld_origin) = 'Check type of data required'.
DATA(ld_originx) = 'Check type of data required'.
DATA(ld_investacctassignmnt) = 'Check type of data required'.
DATA(ld_investacctassignmntx) = 'Check type of data required'.
DATA(ld_networthvaluation) = 'Check type of data required'.
DATA(ld_networthvaluationx) = 'Check type of data required'.
DATA(ld_realestate) = 'Check type of data required'.
DATA(ld_realestatex) = 'Check type of data required'.
DATA(ld_insurance) = 'Check type of data required'.
DATA(ld_insurancex) = 'Check type of data required'.
DATA(ld_leasing) = 'Check type of data required'.
DATA(ld_leasingx) = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_depreciationareas to it_depreciationareas.

"populate fields of struture and append to itab
append wa_depreciationareasx to it_depreciationareasx.

"populate fields of struture and append to itab
append wa_investment_support to it_investment_support.

"populate fields of struture and append to itab
append wa_extensionin to it_extensionin. . CALL FUNCTION 'BAPI_FIXEDASSET_CREATE1' EXPORTING key = ld_key * reference = ld_reference * createsubnumber = ld_createsubnumber * postcap = ld_postcap * creategroupasset = ld_creategroupasset * testrun = ld_testrun * generaldata = ld_generaldata * generaldatax = ld_generaldatax * inventory = ld_inventory * inventoryx = ld_inventoryx * postinginformation = ld_postinginformation * postinginformationx = ld_postinginformationx * timedependentdata = ld_timedependentdata * timedependentdatax = ld_timedependentdatax * allocations = ld_allocations * allocationsx = ld_allocationsx * origin = ld_origin * originx = ld_originx * investacctassignmnt = ld_investacctassignmnt * investacctassignmntx = ld_investacctassignmntx * networthvaluation = ld_networthvaluation * networthvaluationx = ld_networthvaluationx * realestate = ld_realestate * realestatex = ld_realestatex * insurance = ld_insurance * insurancex = ld_insurancex * leasing = ld_leasing * leasingx = ld_leasingx IMPORTING companycode = ld_companycode asset = ld_asset subnumber = ld_subnumber assetcreated = ld_assetcreated return = ld_return * TABLES * depreciationareas = it_depreciationareas * depreciationareasx = it_depreciationareasx * investment_support = it_investment_support * extensionin = it_extensionin . " BAPI_FIXEDASSET_CREATE1
IF SY-SUBRC EQ 0. "All OK ENDIF.







ABAP code to compare 7.40 inline data declaration with original syntax

The below ABAP code uses the older none in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. It may also be useful if you are using an older version of SAP as some of the newer syntax above, such as the @DATA is not available until 4.70 EHP 8.

DATA:
ld_companycode  TYPE BAPI1022_1-COMP_CODE ,
ld_key  TYPE BAPI1022_KEY ,
it_depreciationareas  TYPE STANDARD TABLE OF BAPI1022_DEP_AREAS ,
wa_depreciationareas  LIKE LINE OF it_depreciationareas,
ld_asset  TYPE BAPI1022_1-ASSETMAINO ,
ld_reference  TYPE BAPI1022_REFERENCE ,
it_depreciationareasx  TYPE STANDARD TABLE OF BAPI1022_DEP_AREASX ,
wa_depreciationareasx  LIKE LINE OF it_depreciationareasx,
ld_subnumber  TYPE BAPI1022_1-ASSETSUBNO ,
ld_createsubnumber  TYPE BAPI1022_MISC-XSUBNO ,
it_investment_support  TYPE STANDARD TABLE OF BAPI1022_INV_SUPPORT ,
wa_investment_support  LIKE LINE OF it_investment_support,
ld_assetcreated  TYPE BAPI1022_REFERENCE ,
ld_postcap  TYPE BAPI1022_MISC-POSTCAP ,
it_extensionin  TYPE STANDARD TABLE OF BAPIPAREX ,
wa_extensionin  LIKE LINE OF it_extensionin,
ld_return  TYPE BAPIRET2 ,
ld_creategroupasset  TYPE BAPI1022_MISC-XANLGR ,
ld_testrun  TYPE BAPI1022_MISC-TESTRUN ,
ld_generaldata  TYPE BAPI1022_FEGLG001 ,
ld_generaldatax  TYPE BAPI1022_FEGLG001X ,
ld_inventory  TYPE BAPI1022_FEGLG011 ,
ld_inventoryx  TYPE BAPI1022_FEGLG011X ,
ld_postinginformation  TYPE BAPI1022_FEGLG002 ,
ld_postinginformationx  TYPE BAPI1022_FEGLG002X ,
ld_timedependentdata  TYPE BAPI1022_FEGLG003 ,
ld_timedependentdatax  TYPE BAPI1022_FEGLG003X ,
ld_allocations  TYPE BAPI1022_FEGLG004 ,
ld_allocationsx  TYPE BAPI1022_FEGLG004X ,
ld_origin  TYPE BAPI1022_FEGLG009 ,
ld_originx  TYPE BAPI1022_FEGLG009X ,
ld_investacctassignmnt  TYPE BAPI1022_FEGLG010 ,
ld_investacctassignmntx  TYPE BAPI1022_FEGLG010X ,
ld_networthvaluation  TYPE BAPI1022_FEGLG006 ,
ld_networthvaluationx  TYPE BAPI1022_FEGLG006X ,
ld_realestate  TYPE BAPI1022_FEGLG007 ,
ld_realestatex  TYPE BAPI1022_FEGLG007X ,
ld_insurance  TYPE BAPI1022_FEGLG008 ,
ld_insurancex  TYPE BAPI1022_FEGLG008X ,
ld_leasing  TYPE BAPI1022_FEGLG005 ,
ld_leasingx  TYPE BAPI1022_FEGLG005X .

ld_key = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_depreciationareas to it_depreciationareas.
ld_reference = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_depreciationareasx to it_depreciationareasx.

ld_createsubnumber = some text here

"populate fields of struture and append to itab
append wa_investment_support to it_investment_support.

ld_postcap = some text here

"populate fields of struture and append to itab
append wa_extensionin to it_extensionin.

ld_creategroupasset = some text here

ld_testrun = some text here
ld_generaldata = 'Check type of data required'.
ld_generaldatax = 'Check type of data required'.
ld_inventory = 'Check type of data required'.
ld_inventoryx = 'Check type of data required'.
ld_postinginformation = 'Check type of data required'.
ld_postinginformationx = 'Check type of data required'.
ld_timedependentdata = 'Check type of data required'.
ld_timedependentdatax = 'Check type of data required'.
ld_allocations = 'Check type of data required'.
ld_allocationsx = 'Check type of data required'.
ld_origin = 'Check type of data required'.
ld_originx = 'Check type of data required'.
ld_investacctassignmnt = 'Check type of data required'.
ld_investacctassignmntx = 'Check type of data required'.
ld_networthvaluation = 'Check type of data required'.
ld_networthvaluationx = 'Check type of data required'.
ld_realestate = 'Check type of data required'.
ld_realestatex = 'Check type of data required'.
ld_insurance = 'Check type of data required'.
ld_insurancex = 'Check type of data required'.
ld_leasing = 'Check type of data required'.
ld_leasingx = 'Check type of data required'.

SAP Documentation for FM BAPI_FIXEDASSET_CREATE1


You can use this method to create asset master records.

EXAMPLE ...See here for full SAP fm documentation







Contribute (Add Comments)

Please help keep this info upto date and use the comments section below to add useful hints, tips and information specific to this SAP function. This will then be available for you and other users to easily find by simply searching on the object name BAPI_FIXEDASSET_CREATE1 or its description.