SAP BAPI_CMS_SEC_CREATE Function Module for CREATE SECURITIES BAPI
BAPI_CMS_SEC_CREATE is a standard bapi cms sec 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 SECURITIES BAPI 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 bapi cms sec create FM, simply by entering the name BAPI_CMS_SEC_CREATE into the relevant SAP transaction such as SE37 or SE38.
Function Group: CMS_BUSISB103_BAPI
Program Name: SAPLCMS_BUSISB103_BAPI
Main Program: SAPLCMS_BUSISB103_BAPI
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Remote-Enabled
Update:

Function BAPI_CMS_SEC_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 'BAPI_CMS_SEC_CREATE'"CREATE SECURITIES BAPI.
EXPORTING
* PROCESSEXTENSION = "Flag: Execute Customer Extensions (BAdIs) in BAPI
* TESTRUN = "Switch to Simulation Session for Write BAPIs
* ADMIN_DATA = "BAPI : Organizational Units and Bank area.
* SECURITIES_ACCOUNT = "BAPI : Structure for Securities account
IMPORTING
SECURITIES_ACCOUNT_IDENTIFIER = "GET: Securities account identifier primary key
SECURITIES_ACCOUNT_KEYS = "BAPI : Securities semantic key
TABLES
* EXTENSIONIN = "Ref. structure for BAPI parameter ExtensionIn/ExtensionOut
* SYSTEM_STATUS = "System status
* POSITIONS = "BAPI : Structure for securities account position
* BUSINESS_PARTNERS = "BAPI : Structure for Business Partner Link details
* DOCUMENTS = "BAPI : Structure for Document Service Link details
* NOTES = "BAPI : Structure for Notes created on Movables
* EXTENSIONOUT = "Ref. structure for BAPI parameter ExtensionIn/ExtensionOut
* RETURN = "Return Parameter
IMPORTING Parameters details for BAPI_CMS_SEC_CREATE
PROCESSEXTENSION - Flag: Execute Customer Extensions (BAdIs) in BAPI
Data type: BAPI_CMS_STR_CENTRAL-PROCESSEXTENSIONOptional: Yes
Call by Reference: No ( called with pass by value option)
TESTRUN - Switch to Simulation Session for Write BAPIs
Data type: BAPI_CMS_STR_CENTRAL-TESTRUNOptional: Yes
Call by Reference: No ( called with pass by value option)
ADMIN_DATA - BAPI : Organizational Units and Bank area.
Data type: BAPICMS_STR_OMS_ORGUNIT_CRTOptional: Yes
Call by Reference: No ( called with pass by value option)
SECURITIES_ACCOUNT - BAPI : Structure for Securities account
Data type: BAPICMS_STR_SEC_ACC_CRTOptional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for BAPI_CMS_SEC_CREATE
SECURITIES_ACCOUNT_IDENTIFIER - GET: Securities account identifier primary key
Data type: BAPICMS_STR_SEC_IDENTIFIER_GET-SEC_ACC_IDENTIFIEROptional: No
Call by Reference: No ( called with pass by value option)
SECURITIES_ACCOUNT_KEYS - BAPI : Securities semantic key
Data type: BAPICMS_STR_SEC_ACC_SKY_CRTOptional: No
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for BAPI_CMS_SEC_CREATE
EXTENSIONIN - Ref. structure for BAPI parameter ExtensionIn/ExtensionOut
Data type: BAPIPAREXOptional: Yes
Call by Reference: Yes
SYSTEM_STATUS - System status
Data type: BAPICMS_STR_OMS_SYS_STAT_CRTOptional: Yes
Call by Reference: Yes
POSITIONS - BAPI : Structure for securities account position
Data type: BAPICMS_STR_SEC_ACC_POS_CRTOptional: Yes
Call by Reference: Yes
BUSINESS_PARTNERS - BAPI : Structure for Business Partner Link details
Data type: BAPICMS_STR_OMS_BP_CRTOptional: Yes
Call by Reference: Yes
DOCUMENTS - BAPI : Structure for Document Service Link details
Data type: BAPICMS_STR_OMS_DOC_CRTOptional: Yes
Call by Reference: Yes
NOTES - BAPI : Structure for Notes created on Movables
Data type: BAPICMS_STR_OMS_NOTES_CRTOptional: Yes
Call by Reference: Yes
EXTENSIONOUT - Ref. structure for BAPI parameter ExtensionIn/ExtensionOut
Data type: BAPIPAREXOptional: Yes
Call by Reference: Yes
RETURN - Return Parameter
Data type: BAPIRET2Optional: Yes
Call by Reference: Yes
Copy and paste ABAP code example for BAPI_CMS_SEC_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: | ||||
| lt_extensionin | TYPE STANDARD TABLE OF BAPIPAREX, " | |||
| lv_processextension | TYPE BAPI_CMS_STR_CENTRAL-PROCESSEXTENSION, " | |||
| lv_securities_account_identifier | TYPE BAPICMS_STR_SEC_IDENTIFIER_GET-SEC_ACC_IDENTIFIER, " | |||
| lv_testrun | TYPE BAPI_CMS_STR_CENTRAL-TESTRUN, " | |||
| lt_system_status | TYPE STANDARD TABLE OF BAPICMS_STR_OMS_SYS_STAT_CRT, " | |||
| lv_securities_account_keys | TYPE BAPICMS_STR_SEC_ACC_SKY_CRT, " | |||
| lt_positions | TYPE STANDARD TABLE OF BAPICMS_STR_SEC_ACC_POS_CRT, " | |||
| lv_admin_data | TYPE BAPICMS_STR_OMS_ORGUNIT_CRT, " | |||
| lt_business_partners | TYPE STANDARD TABLE OF BAPICMS_STR_OMS_BP_CRT, " | |||
| lv_securities_account | TYPE BAPICMS_STR_SEC_ACC_CRT, " | |||
| lt_documents | TYPE STANDARD TABLE OF BAPICMS_STR_OMS_DOC_CRT, " | |||
| lt_notes | TYPE STANDARD TABLE OF BAPICMS_STR_OMS_NOTES_CRT, " | |||
| lt_extensionout | TYPE STANDARD TABLE OF BAPIPAREX, " | |||
| lt_return | TYPE STANDARD TABLE OF BAPIRET2. " |
|   CALL FUNCTION 'BAPI_CMS_SEC_CREATE' "CREATE SECURITIES BAPI |
| EXPORTING | ||
| PROCESSEXTENSION | = lv_processextension | |
| TESTRUN | = lv_testrun | |
| ADMIN_DATA | = lv_admin_data | |
| SECURITIES_ACCOUNT | = lv_securities_account | |
| IMPORTING | ||
| SECURITIES_ACCOUNT_IDENTIFIER | = lv_securities_account_identifier | |
| SECURITIES_ACCOUNT_KEYS | = lv_securities_account_keys | |
| TABLES | ||
| EXTENSIONIN | = lt_extensionin | |
| SYSTEM_STATUS | = lt_system_status | |
| POSITIONS | = lt_positions | |
| BUSINESS_PARTNERS | = lt_business_partners | |
| DOCUMENTS | = lt_documents | |
| NOTES | = lt_notes | |
| EXTENSIONOUT | = lt_extensionout | |
| RETURN | = lt_return | |
| . " BAPI_CMS_SEC_CREATE | ||
ABAP code using 7.40 inline data declarations to call FM BAPI_CMS_SEC_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 PROCESSEXTENSION FROM BAPI_CMS_STR_CENTRAL INTO @DATA(ld_processextension). | ||||
| "SELECT single SEC_ACC_IDENTIFIER FROM BAPICMS_STR_SEC_IDENTIFIER_GET INTO @DATA(ld_securities_account_identifier). | ||||
| "SELECT single TESTRUN FROM BAPI_CMS_STR_CENTRAL INTO @DATA(ld_testrun). | ||||
Search for further information about these or an SAP related objects