SAP BCA_DIM_CONTRACTACCOUNT_CREATE Function Module for Create Contract Account
BCA_DIM_CONTRACTACCOUNT_CREATE is a standard bca dim contractaccount 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 Contract Account 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 bca dim contractaccount create FM, simply by entering the name BCA_DIM_CONTRACTACCOUNT_CREATE into the relevant SAP transaction such as SE37 or SE38.
Function Group: BCA_DIM_LOANS_RFC
Program Name: SAPLBCA_DIM_LOANS_RFC
Main Program: SAPLBCA_DIM_LOANS_RFC
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Remote-Enabled
Update:

Function BCA_DIM_CONTRACTACCOUNT_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 'BCA_DIM_CONTRACTACCOUNT_CREATE'"Create Contract Account.
EXPORTING
I_TAB_ACCT_DETAILS = "AM Clearing Account number
* I_TESTRUN = "Switch to Simulation Session for Write BAPIs
IMPORTING
E_CONTRACTACCOUNT = "Contract Account Number
TABLES
* I_TAB_EXTENSIONIN = "Customer Enhancements
* E_TAB_RETURN = "Return Parameter
EXCEPTIONS
INPUT_NOT_QUALIFIED = 1 CLEAR_ACCT_NOT_QUALIFIED = 2 FILL_CTRACPARTNERDETAIL_FAILED = 3 MAPPING_FAILED = 4 FAILED = 5
IMPORTING Parameters details for BCA_DIM_CONTRACTACCOUNT_CREATE
I_TAB_ACCT_DETAILS - AM Clearing Account number
Data type: BCA_TAB_DIM_ACCT_DETAILSOptional: No
Call by Reference: No ( called with pass by value option)
I_TESTRUN - Switch to Simulation Session for Write BAPIs
Data type: BAPICTRACAUX-TESTRUNOptional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for BCA_DIM_CONTRACTACCOUNT_CREATE
E_CONTRACTACCOUNT - Contract Account Number
Data type: BCA_TAB_DIM_CONT_ACCTOptional: No
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for BCA_DIM_CONTRACTACCOUNT_CREATE
I_TAB_EXTENSIONIN - Customer Enhancements
Data type: BAPIPAREXOptional: Yes
Call by Reference: Yes
E_TAB_RETURN - Return Parameter
Data type: BAPIRET2Optional: Yes
Call by Reference: Yes
EXCEPTIONS details
INPUT_NOT_QUALIFIED - Input not qualified
Data type:Optional: No
Call by Reference: Yes
CLEAR_ACCT_NOT_QUALIFIED - Clearing account not qualified.
Data type:Optional: No
Call by Reference: Yes
FILL_CTRACPARTNERDETAIL_FAILED - Filling contract partner detail failed( BADI-method)
Data type:Optional: No
Call by Reference: Yes
MAPPING_FAILED - Mapping record creation Failed.
Data type:Optional: No
Call by Reference: Yes
FAILED - Contract account creation failed.
Data type:Optional: No
Call by Reference: Yes
Copy and paste ABAP code example for BCA_DIM_CONTRACTACCOUNT_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_e_contractaccount | TYPE BCA_TAB_DIM_CONT_ACCT, " | |||
| lt_i_tab_extensionin | TYPE STANDARD TABLE OF BAPIPAREX, " | |||
| lv_i_tab_acct_details | TYPE BCA_TAB_DIM_ACCT_DETAILS, " | |||
| lv_input_not_qualified | TYPE BCA_TAB_DIM_ACCT_DETAILS, " | |||
| lv_i_testrun | TYPE BAPICTRACAUX-TESTRUN, " | |||
| lt_e_tab_return | TYPE STANDARD TABLE OF BAPIRET2, " | |||
| lv_clear_acct_not_qualified | TYPE BAPIRET2, " | |||
| lv_fill_ctracpartnerdetail_failed | TYPE BAPIRET2, " | |||
| lv_mapping_failed | TYPE BAPIRET2, " | |||
| lv_failed | TYPE BAPIRET2. " |
|   CALL FUNCTION 'BCA_DIM_CONTRACTACCOUNT_CREATE' "Create Contract Account |
| EXPORTING | ||
| I_TAB_ACCT_DETAILS | = lv_i_tab_acct_details | |
| I_TESTRUN | = lv_i_testrun | |
| IMPORTING | ||
| E_CONTRACTACCOUNT | = lv_e_contractaccount | |
| TABLES | ||
| I_TAB_EXTENSIONIN | = lt_i_tab_extensionin | |
| E_TAB_RETURN | = lt_e_tab_return | |
| EXCEPTIONS | ||
| INPUT_NOT_QUALIFIED = 1 | ||
| CLEAR_ACCT_NOT_QUALIFIED = 2 | ||
| FILL_CTRACPARTNERDETAIL_FAILED = 3 | ||
| MAPPING_FAILED = 4 | ||
| FAILED = 5 | ||
| . " BCA_DIM_CONTRACTACCOUNT_CREATE | ||
ABAP code using 7.40 inline data declarations to call FM BCA_DIM_CONTRACTACCOUNT_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 TESTRUN FROM BAPICTRACAUX INTO @DATA(ld_i_testrun). | ||||
Search for further information about these or an SAP related objects