SAP API_RE_CN_CREATE Function Module for Create Real Estate Contract
API_RE_CN_CREATE is a standard api re cn create SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Create Real Estate Contract processing and below is the pattern details for this FM, showing its interface including any import and export parameters, exceptions etc. there is also a full "cut and paste" ABAP pattern code example, along with implementation ABAP coding, documentation and contribution comments specific to this or related objects.
See here to view full function module documentation and code listing for api re cn create FM, simply by entering the name API_RE_CN_CREATE into the relevant SAP transaction such as SE37 or SE38.
Function Group: RECN_API_CONTRACT
Program Name: SAPLRECN_API_CONTRACT
Main Program: SAPLRECN_API_CONTRACT
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function API_RE_CN_CREATE pattern details
In-order to call this FM within your sap programs, simply using the below ABAP pattern details to trigger the function call...or see the full ABAP code listing at the end of this article. You can simply cut and paste this code into your ABAP progrom as it is, including variable declarations.CALL FUNCTION 'API_RE_CN_CREATE'"Create Real Estate Contract.
EXPORTING
IS_CONTRACT = "Real Estate Contract
* IT_TERM_PAYMENT_SPLIT = "Split for Posting Rules
* IT_TERM_RHYTHM = "Frequency Terms
* IT_TERM_WITHHOLDING_TAX = "Withholding Tax Term
* IT_TERM_WITHHOLDING_TAX_ITEM = "Withholding Tax Item - Internal
* IT_TERM_ADJUSTMENT = "Adjustment Terms
* IT_TERM_SR_REPORTING = "Reporting Rules
* IT_TERM_SR_SALES = "Sales Rules
* IT_TERM_SR_PEAK_SALES = "Peak Sales Rules
* IT_TERM_SR_RHYTHM = "Sales Frequencies
* IT_ACT_DEPOSIT = "
* IS_TERM_RENEWAL = "Renewal Term
* IT_PARTNER = "Partner
* IT_OPTION_RATE = "Option Rates
* IS_COSETTLE_PARAM = "CO Settlement Rule: Parameter - Internal
* IT_COSETTLE_RULE = "CO Settlement Rule: Alloc. Rules - Internal
* IT_OBJECT_REL = "
* IT_MEAS_CN = "Contract Measurements of RE Contract - Internal
* IT_CONDITION = "Conditions
* IT_RESUBM_RULE = "Reminder Rules
* IT_STATUS = "Status
* IS_CI_DATA = "Data of CI Include
* IT_TERM_RENEWAL_RULE = "Individual Renewal Rules
* IT_EXT_DATA = "Enhancements: Data
* ID_TRANS = "Business Transaction
* IF_TEST_RUN = ' ' "Simulation Mode
* IF_MSGLIST_INSTEAD_OF_EXC = ' ' "
* IF_DELIVER_INST = ' ' "
* IO_MSGLIST = "
* IS_TERM_NOTICE = "Notice Term
* IT_TERM_NOTICE_OBJ = "Notice Terms for Objects
* IT_TERM_NOTICE_RULE = "Individual Notice Rules
* IT_TERM_OBJECT_REL = "Objects Assigned to Terms
* IT_TERM_ORG_ASSIGNMENT = "Organizational Assignments
* IT_TERM_PAYMENT = "Posting Terms
IMPORTING
ED_BUKRS = "Company Code
ED_RECNNR = "Contract Number
EF_STORED = "Data has been changed
EO_CONTRACT = "
EXCEPTIONS
ERROR = 1
IMPORTING Parameters details for API_RE_CN_CREATE
IS_CONTRACT - Real Estate Contract
Data type: BAPI_RE_CONTRACT_INTOptional: No
Call by Reference: Yes
IT_TERM_PAYMENT_SPLIT - Split for Posting Rules
Data type: BAPI_RE_T_TERM_PYSPLIT_INTOptional: Yes
Call by Reference: Yes
IT_TERM_RHYTHM - Frequency Terms
Data type: BAPI_RE_T_TERM_RH_INTOptional: Yes
Call by Reference: Yes
IT_TERM_WITHHOLDING_TAX - Withholding Tax Term
Data type: BAPI_RE_T_TERM_WT_INTOptional: Yes
Call by Reference: Yes
IT_TERM_WITHHOLDING_TAX_ITEM - Withholding Tax Item - Internal
Data type: BAPI_RE_T_TERM_WT_ITEM_INTOptional: Yes
Call by Reference: Yes
IT_TERM_ADJUSTMENT - Adjustment Terms
Data type: BAPI_RE_T_TERM_AJ_INTOptional: Yes
Call by Reference: Yes
IT_TERM_SR_REPORTING - Reporting Rules
Data type: BAPI_RE_T_TERM_SR_REP_INTOptional: Yes
Call by Reference: Yes
IT_TERM_SR_SALES - Sales Rules
Data type: BAPI_RE_T_TERM_SR_SL_INTOptional: Yes
Call by Reference: Yes
IT_TERM_SR_PEAK_SALES - Peak Sales Rules
Data type: BAPI_RE_T_TERM_SR_PS_INTOptional: Yes
Call by Reference: Yes
IT_TERM_SR_RHYTHM - Sales Frequencies
Data type: BAPI_RE_T_TERM_SR_RH_INTOptional: Yes
Call by Reference: Yes
IT_ACT_DEPOSIT -
Data type: BAPI_RE_T_ACT_DEPOSIT_INTOptional: Yes
Call by Reference: Yes
IS_TERM_RENEWAL - Renewal Term
Data type: BAPI_RE_TERM_RN_INTOptional: Yes
Call by Reference: Yes
IT_PARTNER - Partner
Data type: BAPI_RE_T_PARTNER_INTOptional: Yes
Call by Reference: Yes
IT_OPTION_RATE - Option Rates
Data type: BAPI_RE_T_OPTION_RATE_INTOptional: Yes
Call by Reference: Yes
IS_COSETTLE_PARAM - CO Settlement Rule: Parameter - Internal
Data type: BAPI_RE_COSETTLE_PAR_INTOptional: Yes
Call by Reference: Yes
IT_COSETTLE_RULE - CO Settlement Rule: Alloc. Rules - Internal
Data type: BAPI_RE_T_COSETTLE_RL_INTOptional: Yes
Call by Reference: Yes
IT_OBJECT_REL -
Data type: BAPI_RE_T_OBJECT_REL_INTOptional: Yes
Call by Reference: Yes
IT_MEAS_CN - Contract Measurements of RE Contract - Internal
Data type: BAPI_RE_T_MEAS_CN_INTOptional: Yes
Call by Reference: Yes
IT_CONDITION - Conditions
Data type: BAPI_RE_T_CONDITION_INTOptional: Yes
Call by Reference: Yes
IT_RESUBM_RULE - Reminder Rules
Data type: BAPI_RE_T_RESUBM_RULE_INTOptional: Yes
Call by Reference: Yes
IT_STATUS - Status
Data type: BAPI_RE_T_STATUS_INTOptional: Yes
Call by Reference: Yes
IS_CI_DATA - Data of CI Include
Data type: RECN_CONTRACT_CIOptional: Yes
Call by Reference: Yes
IT_TERM_RENEWAL_RULE - Individual Renewal Rules
Data type: BAPI_RE_T_TERM_RN_RULE_INTOptional: Yes
Call by Reference: Yes
IT_EXT_DATA - Enhancements: Data
Data type: RE_T_EXT_DATAOptional: Yes
Call by Reference: Yes
ID_TRANS - Business Transaction
Data type: BAPI_RE_ADDITIONAL_FIELDS-TRANSOptional: Yes
Call by Reference: Yes
IF_TEST_RUN - Simulation Mode
Data type: BAPI_RE_ADDITIONAL_FIELDS-TESTRUNDefault: ' '
Optional: Yes
Call by Reference: Yes
IF_MSGLIST_INSTEAD_OF_EXC -
Data type: RECABOOLDefault: ' '
Optional: Yes
Call by Reference: Yes
IF_DELIVER_INST -
Data type: RECABOOLDefault: ' '
Optional: Yes
Call by Reference: Yes
IO_MSGLIST -
Data type: OBJECTOptional: Yes
Call by Reference: Yes
IS_TERM_NOTICE - Notice Term
Data type: BAPI_RE_TERM_NT_INTOptional: Yes
Call by Reference: Yes
IT_TERM_NOTICE_OBJ - Notice Terms for Objects
Data type: BAPI_RE_T_TERM_NT_OBJ_INTOptional: Yes
Call by Reference: Yes
IT_TERM_NOTICE_RULE - Individual Notice Rules
Data type: BAPI_RE_T_TERM_NT_RULE_INTOptional: Yes
Call by Reference: Yes
IT_TERM_OBJECT_REL - Objects Assigned to Terms
Data type: BAPI_RE_T_TERM_OBJREL_INTOptional: Yes
Call by Reference: Yes
IT_TERM_ORG_ASSIGNMENT - Organizational Assignments
Data type: BAPI_RE_T_TERM_OA_INTOptional: Yes
Call by Reference: Yes
IT_TERM_PAYMENT - Posting Terms
Data type: BAPI_RE_T_TERM_PY_INTOptional: Yes
Call by Reference: Yes
EXPORTING Parameters details for API_RE_CN_CREATE
ED_BUKRS - Company Code
Data type: BAPI_RE_CONTRACT_INTK-BUKRSOptional: No
Call by Reference: Yes
ED_RECNNR - Contract Number
Data type: BAPI_RE_CONTRACT_INTK-RECNNROptional: No
Call by Reference: Yes
EF_STORED - Data has been changed
Data type: RECABOOLOptional: No
Call by Reference: Yes
EO_CONTRACT -
Data type: IF_RECN_CONTRACTOptional: No
Call by Reference: Yes
EXCEPTIONS details
ERROR - Error During Creation
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for API_RE_CN_CREATE Function Module
The ABAP code below is a full code listing to execute function module POPUP_TO_CONFIRM including all data declarations. The code uses the original data declarations rather than 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 newer method of declaring data variables on the fly. 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), which i why i have stuck to the origianl for this example.| DATA: | ||||
| lv_error | TYPE STRING, " | |||
| lv_ed_bukrs | TYPE BAPI_RE_CONTRACT_INTK-BUKRS, " | |||
| lv_is_contract | TYPE BAPI_RE_CONTRACT_INT, " | |||
| lv_it_term_payment_split | TYPE BAPI_RE_T_TERM_PYSPLIT_INT, " | |||
| lv_it_term_rhythm | TYPE BAPI_RE_T_TERM_RH_INT, " | |||
| lv_it_term_withholding_tax | TYPE BAPI_RE_T_TERM_WT_INT, " | |||
| lv_it_term_withholding_tax_item | TYPE BAPI_RE_T_TERM_WT_ITEM_INT, " | |||
| lv_it_term_adjustment | TYPE BAPI_RE_T_TERM_AJ_INT, " | |||
| lv_it_term_sr_reporting | TYPE BAPI_RE_T_TERM_SR_REP_INT, " | |||
| lv_it_term_sr_sales | TYPE BAPI_RE_T_TERM_SR_SL_INT, " | |||
| lv_it_term_sr_peak_sales | TYPE BAPI_RE_T_TERM_SR_PS_INT, " | |||
| lv_it_term_sr_rhythm | TYPE BAPI_RE_T_TERM_SR_RH_INT, " | |||
| lv_it_act_deposit | TYPE BAPI_RE_T_ACT_DEPOSIT_INT, " | |||
| lv_ed_recnnr | TYPE BAPI_RE_CONTRACT_INTK-RECNNR, " | |||
| lv_is_term_renewal | TYPE BAPI_RE_TERM_RN_INT, " | |||
| lv_it_partner | TYPE BAPI_RE_T_PARTNER_INT, " | |||
| lv_it_option_rate | TYPE BAPI_RE_T_OPTION_RATE_INT, " | |||
| lv_is_cosettle_param | TYPE BAPI_RE_COSETTLE_PAR_INT, " | |||
| lv_it_cosettle_rule | TYPE BAPI_RE_T_COSETTLE_RL_INT, " | |||
| lv_it_object_rel | TYPE BAPI_RE_T_OBJECT_REL_INT, " | |||
| lv_it_meas_cn | TYPE BAPI_RE_T_MEAS_CN_INT, " | |||
| lv_it_condition | TYPE BAPI_RE_T_CONDITION_INT, " | |||
| lv_it_resubm_rule | TYPE BAPI_RE_T_RESUBM_RULE_INT, " | |||
| lv_it_status | TYPE BAPI_RE_T_STATUS_INT, " | |||
| lv_is_ci_data | TYPE RECN_CONTRACT_CI, " | |||
| lv_ef_stored | TYPE RECABOOL, " | |||
| lv_it_term_renewal_rule | TYPE BAPI_RE_T_TERM_RN_RULE_INT, " | |||
| lv_it_ext_data | TYPE RE_T_EXT_DATA, " | |||
| lv_id_trans | TYPE BAPI_RE_ADDITIONAL_FIELDS-TRANS, " | |||
| lv_if_test_run | TYPE BAPI_RE_ADDITIONAL_FIELDS-TESTRUN, " ' ' | |||
| lv_if_msglist_instead_of_exc | TYPE RECABOOL, " ' ' | |||
| lv_if_deliver_inst | TYPE RECABOOL, " ' ' | |||
| lv_io_msglist | TYPE OBJECT, " | |||
| lv_eo_contract | TYPE IF_RECN_CONTRACT, " | |||
| lv_is_term_notice | TYPE BAPI_RE_TERM_NT_INT, " | |||
| lv_it_term_notice_obj | TYPE BAPI_RE_T_TERM_NT_OBJ_INT, " | |||
| lv_it_term_notice_rule | TYPE BAPI_RE_T_TERM_NT_RULE_INT, " | |||
| lv_it_term_object_rel | TYPE BAPI_RE_T_TERM_OBJREL_INT, " | |||
| lv_it_term_org_assignment | TYPE BAPI_RE_T_TERM_OA_INT, " | |||
| lv_it_term_payment | TYPE BAPI_RE_T_TERM_PY_INT. " |
|   CALL FUNCTION 'API_RE_CN_CREATE' "Create Real Estate Contract |
| EXPORTING | ||
| IS_CONTRACT | = lv_is_contract | |
| IT_TERM_PAYMENT_SPLIT | = lv_it_term_payment_split | |
| IT_TERM_RHYTHM | = lv_it_term_rhythm | |
| IT_TERM_WITHHOLDING_TAX | = lv_it_term_withholding_tax | |
| IT_TERM_WITHHOLDING_TAX_ITEM | = lv_it_term_withholding_tax_item | |
| IT_TERM_ADJUSTMENT | = lv_it_term_adjustment | |
| IT_TERM_SR_REPORTING | = lv_it_term_sr_reporting | |
| IT_TERM_SR_SALES | = lv_it_term_sr_sales | |
| IT_TERM_SR_PEAK_SALES | = lv_it_term_sr_peak_sales | |
| IT_TERM_SR_RHYTHM | = lv_it_term_sr_rhythm | |
| IT_ACT_DEPOSIT | = lv_it_act_deposit | |
| IS_TERM_RENEWAL | = lv_is_term_renewal | |
| IT_PARTNER | = lv_it_partner | |
| IT_OPTION_RATE | = lv_it_option_rate | |
| IS_COSETTLE_PARAM | = lv_is_cosettle_param | |
| IT_COSETTLE_RULE | = lv_it_cosettle_rule | |
| IT_OBJECT_REL | = lv_it_object_rel | |
| IT_MEAS_CN | = lv_it_meas_cn | |
| IT_CONDITION | = lv_it_condition | |
| IT_RESUBM_RULE | = lv_it_resubm_rule | |
| IT_STATUS | = lv_it_status | |
| IS_CI_DATA | = lv_is_ci_data | |
| IT_TERM_RENEWAL_RULE | = lv_it_term_renewal_rule | |
| IT_EXT_DATA | = lv_it_ext_data | |
| ID_TRANS | = lv_id_trans | |
| IF_TEST_RUN | = lv_if_test_run | |
| IF_MSGLIST_INSTEAD_OF_EXC | = lv_if_msglist_instead_of_exc | |
| IF_DELIVER_INST | = lv_if_deliver_inst | |
| IO_MSGLIST | = lv_io_msglist | |
| IS_TERM_NOTICE | = lv_is_term_notice | |
| IT_TERM_NOTICE_OBJ | = lv_it_term_notice_obj | |
| IT_TERM_NOTICE_RULE | = lv_it_term_notice_rule | |
| IT_TERM_OBJECT_REL | = lv_it_term_object_rel | |
| IT_TERM_ORG_ASSIGNMENT | = lv_it_term_org_assignment | |
| IT_TERM_PAYMENT | = lv_it_term_payment | |
| IMPORTING | ||
| ED_BUKRS | = lv_ed_bukrs | |
| ED_RECNNR | = lv_ed_recnnr | |
| EF_STORED | = lv_ef_stored | |
| EO_CONTRACT | = lv_eo_contract | |
| EXCEPTIONS | ||
| ERROR = 1 | ||
| . " API_RE_CN_CREATE | ||
ABAP code using 7.40 inline data declarations to call FM API_RE_CN_CREATE
The below ABAP code uses the newer in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. Please note some of the newer syntax below, such as the @DATA is not available until 4.70 EHP 8.| "SELECT single BUKRS FROM BAPI_RE_CONTRACT_INTK INTO @DATA(ld_ed_bukrs). | ||||
| "SELECT single RECNNR FROM BAPI_RE_CONTRACT_INTK INTO @DATA(ld_ed_recnnr). | ||||
| "SELECT single TRANS FROM BAPI_RE_ADDITIONAL_FIELDS INTO @DATA(ld_id_trans). | ||||
| "SELECT single TESTRUN FROM BAPI_RE_ADDITIONAL_FIELDS INTO @DATA(ld_if_test_run). | ||||
| DATA(ld_if_test_run) | = ' '. | |||
| DATA(ld_if_msglist_instead_of_exc) | = ' '. | |||
| DATA(ld_if_deliver_inst) | = ' '. | |||
Search for further information about these or an SAP related objects