BAPI_CD_ACCOUNT_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_CD_ACCOUNT_CREATE1 into the relevant SAP transaction such as SE37 or SE80.
Associated Function Group:
FSCDMAD_CA_BAPI
Released Date:
21.08.2007
Processing type: Remote-Enabled
CALL FUNCTION 'BAPI_CD_ACCOUNT_CREATE1' "Create FS-CD Contract Account
EXPORTING
accountdata = " bapicd_account Contract Account Data
accountdatax = " bapicd_accountx Change Structure for Contract Account Data
* testrun = " bapi_cd_account_control-testrun Switch to Simulation Mode for Write BAPIs
* writechangedocuments = 'X' " bapi_cd_account_control-writechangedocuments Indicator: Write Change Document
* nodata = '/' " bapi_cd_account_control-nodata NODATA Indicator
IMPORTING
accountnumber = " bapicd_account-cont_acct Contract Account Number Used to Create the Account
TABLES
accountpartner = " bapicd_account_part Account Partner Data
accountpartnerx = " bapicd_account_partx Change Structure for Account Partner Data
* accountpartnercorr = " bapicd_account_part_corr Correspondence Data for Contract Account
* accountpartnercorrx = " bapicd_account_part_corrx Change Structure for Correspondence Data
* accountpartnerlock = " bapicd_account_part_lock Lock Data for Contract Account
* accountpartnerlockx = " bapicd_account_part_lockx Change Structure for Lock Data
* accountpartnerchgdisc = " bapicd_account_part_chgdisc Individual Surcharges and Discounts for Contract Account-Partner Relationship
* accountpartnerchgdiscx = " bapicd_account_part_chgdiscx Change Structure for Ind. Surcharges and Discounts for Contract Acct Part. Rel.
* accounttax = " bapicd_account_tax Data for Taxes for Contract Account
* accounttaxx = " bapicd_account_taxx Change Structure for Taxes
* return = " bapiret2 Returns
* extensionin = " bapiparex Customer Enhancements (ExtensionIn)
. " BAPI_CD_ACCOUNT_CREATE1
The ABAP code below is a full code listing to execute function module BAPI_CD_ACCOUNT_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).
| ld_accountnumber | TYPE BAPICD_ACCOUNT-CONT_ACCT , |
| it_accountpartner | TYPE STANDARD TABLE OF BAPICD_ACCOUNT_PART,"TABLES PARAM |
| wa_accountpartner | LIKE LINE OF it_accountpartner , |
| it_accountpartnerx | TYPE STANDARD TABLE OF BAPICD_ACCOUNT_PARTX,"TABLES PARAM |
| wa_accountpartnerx | LIKE LINE OF it_accountpartnerx , |
| it_accountpartnercorr | TYPE STANDARD TABLE OF BAPICD_ACCOUNT_PART_CORR,"TABLES PARAM |
| wa_accountpartnercorr | LIKE LINE OF it_accountpartnercorr , |
| it_accountpartnercorrx | TYPE STANDARD TABLE OF BAPICD_ACCOUNT_PART_CORRX,"TABLES PARAM |
| wa_accountpartnercorrx | LIKE LINE OF it_accountpartnercorrx , |
| it_accountpartnerlock | TYPE STANDARD TABLE OF BAPICD_ACCOUNT_PART_LOCK,"TABLES PARAM |
| wa_accountpartnerlock | LIKE LINE OF it_accountpartnerlock , |
| it_accountpartnerlockx | TYPE STANDARD TABLE OF BAPICD_ACCOUNT_PART_LOCKX,"TABLES PARAM |
| wa_accountpartnerlockx | LIKE LINE OF it_accountpartnerlockx , |
| it_accountpartnerchgdisc | TYPE STANDARD TABLE OF BAPICD_ACCOUNT_PART_CHGDISC,"TABLES PARAM |
| wa_accountpartnerchgdisc | LIKE LINE OF it_accountpartnerchgdisc , |
| it_accountpartnerchgdiscx | TYPE STANDARD TABLE OF BAPICD_ACCOUNT_PART_CHGDISCX,"TABLES PARAM |
| wa_accountpartnerchgdiscx | LIKE LINE OF it_accountpartnerchgdiscx , |
| it_accounttax | TYPE STANDARD TABLE OF BAPICD_ACCOUNT_TAX,"TABLES PARAM |
| wa_accounttax | LIKE LINE OF it_accounttax , |
| it_accounttaxx | TYPE STANDARD TABLE OF BAPICD_ACCOUNT_TAXX,"TABLES PARAM |
| wa_accounttaxx | LIKE LINE OF it_accounttaxx , |
| it_return | TYPE STANDARD TABLE OF BAPIRET2,"TABLES PARAM |
| wa_return | LIKE LINE OF it_return , |
| it_extensionin | TYPE STANDARD TABLE OF BAPIPAREX,"TABLES PARAM |
| wa_extensionin | LIKE LINE OF it_extensionin . |
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_accountnumber | TYPE BAPICD_ACCOUNT-CONT_ACCT , |
| ld_accountdata | TYPE BAPICD_ACCOUNT , |
| it_accountpartner | TYPE STANDARD TABLE OF BAPICD_ACCOUNT_PART , |
| wa_accountpartner | LIKE LINE OF it_accountpartner, |
| ld_accountdatax | TYPE BAPICD_ACCOUNTX , |
| it_accountpartnerx | TYPE STANDARD TABLE OF BAPICD_ACCOUNT_PARTX , |
| wa_accountpartnerx | LIKE LINE OF it_accountpartnerx, |
| ld_testrun | TYPE BAPI_CD_ACCOUNT_CONTROL-TESTRUN , |
| it_accountpartnercorr | TYPE STANDARD TABLE OF BAPICD_ACCOUNT_PART_CORR , |
| wa_accountpartnercorr | LIKE LINE OF it_accountpartnercorr, |
| ld_writechangedocuments | TYPE BAPI_CD_ACCOUNT_CONTROL-WRITECHANGEDOCUMENTS , |
| it_accountpartnercorrx | TYPE STANDARD TABLE OF BAPICD_ACCOUNT_PART_CORRX , |
| wa_accountpartnercorrx | LIKE LINE OF it_accountpartnercorrx, |
| ld_nodata | TYPE BAPI_CD_ACCOUNT_CONTROL-NODATA , |
| it_accountpartnerlock | TYPE STANDARD TABLE OF BAPICD_ACCOUNT_PART_LOCK , |
| wa_accountpartnerlock | LIKE LINE OF it_accountpartnerlock, |
| it_accountpartnerlockx | TYPE STANDARD TABLE OF BAPICD_ACCOUNT_PART_LOCKX , |
| wa_accountpartnerlockx | LIKE LINE OF it_accountpartnerlockx, |
| it_accountpartnerchgdisc | TYPE STANDARD TABLE OF BAPICD_ACCOUNT_PART_CHGDISC , |
| wa_accountpartnerchgdisc | LIKE LINE OF it_accountpartnerchgdisc, |
| it_accountpartnerchgdiscx | TYPE STANDARD TABLE OF BAPICD_ACCOUNT_PART_CHGDISCX , |
| wa_accountpartnerchgdiscx | LIKE LINE OF it_accountpartnerchgdiscx, |
| it_accounttax | TYPE STANDARD TABLE OF BAPICD_ACCOUNT_TAX , |
| wa_accounttax | LIKE LINE OF it_accounttax, |
| it_accounttaxx | TYPE STANDARD TABLE OF BAPICD_ACCOUNT_TAXX , |
| wa_accounttaxx | LIKE LINE OF it_accounttaxx, |
| it_return | TYPE STANDARD TABLE OF BAPIRET2 , |
| wa_return | LIKE LINE OF it_return, |
| it_extensionin | TYPE STANDARD TABLE OF BAPIPAREX , |
| wa_extensionin | LIKE LINE OF it_extensionin. |
EXAMPLE
...See here for full SAP fm documentation
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_CD_ACCOUNT_CREATE1 or its description.
BAPI_CD_ACCOUNT_CREATE1 - Create FS-CD Contract Account BAPI_CD_ACCOUNT_CREATE - OBSOLETE: Use BAPI_CD_ACCOUNT_CREATE1 BAPI_CD_ACCOUNT_CHANGE1 - Change FS-CD Contract Account BAPI_CD_ACCOUNT_CHANGE - OBSOLETE: Use BAPI_CD_ACCOUNT_CHANGE1 BAPI_CCODE_GET_LASTDAY_FYEAR - For Company Code: Last Day of Fiscal Year BAPI_CCODE_GET_FIRSTDAY_PERIOD - For Company Code: First Day of Period