SAP Function Modules

BAPI_RE_BU_CHANGE SAP Function module - Change Building







BAPI_RE_BU_CHANGE 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_RE_BU_CHANGE into the relevant SAP transaction such as SE37 or SE80.

Associated Function Group: REBD_BAPI_BUILDING
Released Date: 19.08.2005
Processing type: Remote-Enabled
remote enabled module settings


Pattern for FM BAPI_RE_BU_CHANGE - BAPI RE BU CHANGE





CALL FUNCTION 'BAPI_RE_BU_CHANGE' "Change Building
  EXPORTING
    compcode =                  " bapi_re_building_key-comp_code  Company Code
    businessentitynumber =      " bapi_re_building_key-business_entity  Number of Business Entity
    buildingnumber =            " bapi_re_building_key-building  Number of Building
*   building =                  " bapi_re_building_dat  Buildings
*   building_x =                " bapi_re_building_datx  Building Change
*   object_address =            " bapi_re_obj_address_dat  Address
*   object_address_x =          " bapi_re_obj_address_datx  Address Change
*   cosettle_param =            " bapi_re_cosettle_par_dat  CO Settlement Rule: Parameter
*   cosettle_param_x =          " bapi_re_cosettle_par_datx  CO Settlement Rule: Parameter - Data - Change
*   trans =                     " bapi_re_additional_fields-trans  Business Transaction
*   test_run = SPACE            " bapi_re_additional_fields-testrun  Simulation indicator
  TABLES
*   term_org_assignment =       " bapi_re_term_oa_datc  Org. Assignment
*   measurement =               " bapi_re_measurement_datc  Measurements
*   partner =                   " bapi_re_partner_datc  Partner
*   option_rate =               " bapi_re_option_rate_datc  Option Rates
*   cosettle_rule =             " bapi_re_cosettle_rl_datc  CO Settlement Rule: Allocation Rules
*   charact =                   " bapi_re_charact_datc  Fixtures and Fittings Characteristics
*   obj_assign =                " bapi_re_obj_assign_datc  Object Assignment
*   resubm_rule =               " bapi_re_resubm_rule_datc  Reminder Rules
*   resubm_date =               " bapi_re_resubm_date_datc  Reminder Dates
*   arch_rel =                  " bapi_re_arch_rel_datc  Architectural Linkage Objects
*   arch_relms =                " bapi_re_arch_relms_datc  Architectural Linkage Object Parts
*   status =                    " bapi_re_status_datc  Status
*   extension_in =              " bapiparex     Add. Data: Entry
    return =                    " bapiret2      Return Parameters
*   infrastructure =            " bapi_re_infra_datc  Infrastructure
    .  "  BAPI_RE_BU_CHANGE

ABAP code example for Function Module BAPI_RE_BU_CHANGE





The ABAP code below is a full code listing to execute function module BAPI_RE_BU_CHANGE 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:
it_term_org_assignment  TYPE STANDARD TABLE OF BAPI_RE_TERM_OA_DATC,"TABLES PARAM
wa_term_org_assignment  LIKE LINE OF it_term_org_assignment ,
it_measurement  TYPE STANDARD TABLE OF BAPI_RE_MEASUREMENT_DATC,"TABLES PARAM
wa_measurement  LIKE LINE OF it_measurement ,
it_partner  TYPE STANDARD TABLE OF BAPI_RE_PARTNER_DATC,"TABLES PARAM
wa_partner  LIKE LINE OF it_partner ,
it_option_rate  TYPE STANDARD TABLE OF BAPI_RE_OPTION_RATE_DATC,"TABLES PARAM
wa_option_rate  LIKE LINE OF it_option_rate ,
it_cosettle_rule  TYPE STANDARD TABLE OF BAPI_RE_COSETTLE_RL_DATC,"TABLES PARAM
wa_cosettle_rule  LIKE LINE OF it_cosettle_rule ,
it_charact  TYPE STANDARD TABLE OF BAPI_RE_CHARACT_DATC,"TABLES PARAM
wa_charact  LIKE LINE OF it_charact ,
it_obj_assign  TYPE STANDARD TABLE OF BAPI_RE_OBJ_ASSIGN_DATC,"TABLES PARAM
wa_obj_assign  LIKE LINE OF it_obj_assign ,
it_resubm_rule  TYPE STANDARD TABLE OF BAPI_RE_RESUBM_RULE_DATC,"TABLES PARAM
wa_resubm_rule  LIKE LINE OF it_resubm_rule ,
it_resubm_date  TYPE STANDARD TABLE OF BAPI_RE_RESUBM_DATE_DATC,"TABLES PARAM
wa_resubm_date  LIKE LINE OF it_resubm_date ,
it_arch_rel  TYPE STANDARD TABLE OF BAPI_RE_ARCH_REL_DATC,"TABLES PARAM
wa_arch_rel  LIKE LINE OF it_arch_rel ,
it_arch_relms  TYPE STANDARD TABLE OF BAPI_RE_ARCH_RELMS_DATC,"TABLES PARAM
wa_arch_relms  LIKE LINE OF it_arch_relms ,
it_status  TYPE STANDARD TABLE OF BAPI_RE_STATUS_DATC,"TABLES PARAM
wa_status  LIKE LINE OF it_status ,
it_extension_in  TYPE STANDARD TABLE OF BAPIPAREX,"TABLES PARAM
wa_extension_in  LIKE LINE OF it_extension_in ,
it_return  TYPE STANDARD TABLE OF BAPIRET2,"TABLES PARAM
wa_return  LIKE LINE OF it_return ,
it_infrastructure  TYPE STANDARD TABLE OF BAPI_RE_INFRA_DATC,"TABLES PARAM
wa_infrastructure  LIKE LINE OF it_infrastructure .


DATA(ld_compcode) = some text here

DATA(ld_businessentitynumber) = some text here

DATA(ld_buildingnumber) = some text here
DATA(ld_building) = 'Check type of data required'.
DATA(ld_building_x) = 'Check type of data required'.
DATA(ld_object_address) = 'Check type of data required'.
DATA(ld_object_address_x) = 'Check type of data required'.
DATA(ld_cosettle_param) = 'Check type of data required'.
DATA(ld_cosettle_param_x) = 'Check type of data required'.

DATA(ld_trans) = some text here

DATA(ld_test_run) = some text here

"populate fields of struture and append to itab
append wa_term_org_assignment to it_term_org_assignment.

"populate fields of struture and append to itab
append wa_measurement to it_measurement.

"populate fields of struture and append to itab
append wa_partner to it_partner.

"populate fields of struture and append to itab
append wa_option_rate to it_option_rate.

"populate fields of struture and append to itab
append wa_cosettle_rule to it_cosettle_rule.

"populate fields of struture and append to itab
append wa_charact to it_charact.

"populate fields of struture and append to itab
append wa_obj_assign to it_obj_assign.

"populate fields of struture and append to itab
append wa_resubm_rule to it_resubm_rule.

"populate fields of struture and append to itab
append wa_resubm_date to it_resubm_date.

"populate fields of struture and append to itab
append wa_arch_rel to it_arch_rel.

"populate fields of struture and append to itab
append wa_arch_relms to it_arch_relms.

"populate fields of struture and append to itab
append wa_status to it_status.

"populate fields of struture and append to itab
append wa_extension_in to it_extension_in.

"populate fields of struture and append to itab
append wa_return to it_return.

"populate fields of struture and append to itab
append wa_infrastructure to it_infrastructure. . CALL FUNCTION 'BAPI_RE_BU_CHANGE' EXPORTING compcode = ld_compcode businessentitynumber = ld_businessentitynumber buildingnumber = ld_buildingnumber * building = ld_building * building_x = ld_building_x * object_address = ld_object_address * object_address_x = ld_object_address_x * cosettle_param = ld_cosettle_param * cosettle_param_x = ld_cosettle_param_x * trans = ld_trans * test_run = ld_test_run TABLES * term_org_assignment = it_term_org_assignment * measurement = it_measurement * partner = it_partner * option_rate = it_option_rate * cosettle_rule = it_cosettle_rule * charact = it_charact * obj_assign = it_obj_assign * resubm_rule = it_resubm_rule * resubm_date = it_resubm_date * arch_rel = it_arch_rel * arch_relms = it_arch_relms * status = it_status * extension_in = it_extension_in return = it_return * infrastructure = it_infrastructure . " BAPI_RE_BU_CHANGE
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_compcode  TYPE BAPI_RE_BUILDING_KEY-COMP_CODE ,
it_term_org_assignment  TYPE STANDARD TABLE OF BAPI_RE_TERM_OA_DATC ,
wa_term_org_assignment  LIKE LINE OF it_term_org_assignment,
it_measurement  TYPE STANDARD TABLE OF BAPI_RE_MEASUREMENT_DATC ,
wa_measurement  LIKE LINE OF it_measurement,
ld_businessentitynumber  TYPE BAPI_RE_BUILDING_KEY-BUSINESS_ENTITY ,
it_partner  TYPE STANDARD TABLE OF BAPI_RE_PARTNER_DATC ,
wa_partner  LIKE LINE OF it_partner,
ld_buildingnumber  TYPE BAPI_RE_BUILDING_KEY-BUILDING ,
it_option_rate  TYPE STANDARD TABLE OF BAPI_RE_OPTION_RATE_DATC ,
wa_option_rate  LIKE LINE OF it_option_rate,
ld_building  TYPE BAPI_RE_BUILDING_DAT ,
ld_building_x  TYPE BAPI_RE_BUILDING_DATX ,
it_cosettle_rule  TYPE STANDARD TABLE OF BAPI_RE_COSETTLE_RL_DATC ,
wa_cosettle_rule  LIKE LINE OF it_cosettle_rule,
ld_object_address  TYPE BAPI_RE_OBJ_ADDRESS_DAT ,
it_charact  TYPE STANDARD TABLE OF BAPI_RE_CHARACT_DATC ,
wa_charact  LIKE LINE OF it_charact,
ld_object_address_x  TYPE BAPI_RE_OBJ_ADDRESS_DATX ,
it_obj_assign  TYPE STANDARD TABLE OF BAPI_RE_OBJ_ASSIGN_DATC ,
wa_obj_assign  LIKE LINE OF it_obj_assign,
ld_cosettle_param  TYPE BAPI_RE_COSETTLE_PAR_DAT ,
it_resubm_rule  TYPE STANDARD TABLE OF BAPI_RE_RESUBM_RULE_DATC ,
wa_resubm_rule  LIKE LINE OF it_resubm_rule,
ld_cosettle_param_x  TYPE BAPI_RE_COSETTLE_PAR_DATX ,
it_resubm_date  TYPE STANDARD TABLE OF BAPI_RE_RESUBM_DATE_DATC ,
wa_resubm_date  LIKE LINE OF it_resubm_date,
ld_trans  TYPE BAPI_RE_ADDITIONAL_FIELDS-TRANS ,
it_arch_rel  TYPE STANDARD TABLE OF BAPI_RE_ARCH_REL_DATC ,
wa_arch_rel  LIKE LINE OF it_arch_rel,
ld_test_run  TYPE BAPI_RE_ADDITIONAL_FIELDS-TESTRUN ,
it_arch_relms  TYPE STANDARD TABLE OF BAPI_RE_ARCH_RELMS_DATC ,
wa_arch_relms  LIKE LINE OF it_arch_relms,
it_status  TYPE STANDARD TABLE OF BAPI_RE_STATUS_DATC ,
wa_status  LIKE LINE OF it_status,
it_extension_in  TYPE STANDARD TABLE OF BAPIPAREX ,
wa_extension_in  LIKE LINE OF it_extension_in,
it_return  TYPE STANDARD TABLE OF BAPIRET2 ,
wa_return  LIKE LINE OF it_return,
it_infrastructure  TYPE STANDARD TABLE OF BAPI_RE_INFRA_DATC ,
wa_infrastructure  LIKE LINE OF it_infrastructure.


ld_compcode = some text here

"populate fields of struture and append to itab
append wa_term_org_assignment to it_term_org_assignment.

"populate fields of struture and append to itab
append wa_measurement to it_measurement.

ld_businessentitynumber = some text here

"populate fields of struture and append to itab
append wa_partner to it_partner.

ld_buildingnumber = some text here

"populate fields of struture and append to itab
append wa_option_rate to it_option_rate.
ld_building = 'Check type of data required'.
ld_building_x = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_cosettle_rule to it_cosettle_rule.
ld_object_address = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_charact to it_charact.
ld_object_address_x = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_obj_assign to it_obj_assign.
ld_cosettle_param = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_resubm_rule to it_resubm_rule.
ld_cosettle_param_x = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_resubm_date to it_resubm_date.

ld_trans = some text here

"populate fields of struture and append to itab
append wa_arch_rel to it_arch_rel.

ld_test_run = some text here

"populate fields of struture and append to itab
append wa_arch_relms to it_arch_relms.

"populate fields of struture and append to itab
append wa_status to it_status.

"populate fields of struture and append to itab
append wa_extension_in to it_extension_in.

"populate fields of struture and append to itab
append wa_return to it_return.

"populate fields of struture and append to itab
append wa_infrastructure to it_infrastructure.

SAP Documentation for FM BAPI_RE_BU_CHANGE


Use this BAPI to changer the data of a building in the system.
See the parameter documentation for an explanation of the other ...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_RE_BU_CHANGE or its description.