SAP META_CTR_CREATE Function Module for Kontrakt anlegen
META_CTR_CREATE is a standard meta ctr 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 Kontrakt anlegen 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 meta ctr create FM, simply by entering the name META_CTR_CREATE into the relevant SAP transaction such as SE37 or SE38.
Function Group: BBP_BD_META_BAPIS_PART2
Program Name: SAPLBBP_BD_META_BAPIS_PART2
Main Program: SAPLBBP_BD_META_BAPIS_PART2
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function META_CTR_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 'META_CTR_CREATE'"Kontrakt anlegen.
EXPORTING
IV_LOGICAL_SYSTEM = "Logisches System
IV_SRC_GUID = "Globally Unique Identifier
IS_HEADER = "Schnittstelle Kopf-Daten Kontrakt GetDetail-Fall
IT_ITEMS = "Tabellentyp Positionsdaten
IT_ORG_DATA = "Tabellentyp Org-Daten
* IT_TEXT = "Langtexte
IT_PARTNER = "Geschäftspartner
* IT_ATTACH = "KW-Anlagen inkl. Dokument
* IT_STATUS = "Status
IMPORTING
EV_CONTRACT_NUMBER = "Vorgangsnummer
ET_MESSAGES = "Fehlermeldungen
TABLES
ET_CONTROL_RECORD = "Steuersatz für META-BAPI-Steuerung
IMPORTING Parameters details for META_CTR_CREATE
IV_LOGICAL_SYSTEM - Logisches System
Data type: LOGSYSOptional: No
Call by Reference: Yes
IV_SRC_GUID - Globally Unique Identifier
Data type: BBP_GUIDOptional: No
Call by Reference: Yes
IS_HEADER - Schnittstelle Kopf-Daten Kontrakt GetDetail-Fall
Data type: BBP_PDS_CTR_HEADER_DOptional: No
Call by Reference: No ( called with pass by value option)
IT_ITEMS - Tabellentyp Positionsdaten
Data type: BBPT_PD_CTR_ITEM_DOptional: No
Call by Reference: No ( called with pass by value option)
IT_ORG_DATA - Tabellentyp Org-Daten
Data type: BBPT_PDS_ORGOptional: No
Call by Reference: No ( called with pass by value option)
IT_TEXT - Langtexte
Data type: BBPT_PD_LONGTEXTOptional: Yes
Call by Reference: No ( called with pass by value option)
IT_PARTNER - Geschäftspartner
Data type: BBPT_PD_PARTNEROptional: No
Call by Reference: No ( called with pass by value option)
IT_ATTACH - KW-Anlagen inkl. Dokument
Data type: BBPT_PDS_ATT_TOptional: Yes
Call by Reference: No ( called with pass by value option)
IT_STATUS - Status
Data type: BBPT_PDS_STATUSOptional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for META_CTR_CREATE
EV_CONTRACT_NUMBER - Vorgangsnummer
Data type: CRMT_OBJECT_ID_DBOptional: No
Call by Reference: Yes
ET_MESSAGES - Fehlermeldungen
Data type: BBPT_PD_MESSAGESOptional: No
Call by Reference: Yes
TABLES Parameters details for META_CTR_CREATE
ET_CONTROL_RECORD - Steuersatz für META-BAPI-Steuerung
Data type: BBP_CONTROL_RECORDOptional: No
Call by Reference: Yes
Copy and paste ABAP code example for META_CTR_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_et_control_record | TYPE STANDARD TABLE OF BBP_CONTROL_RECORD, " | |||
| lv_iv_logical_system | TYPE LOGSYS, " | |||
| lv_ev_contract_number | TYPE CRMT_OBJECT_ID_DB, " | |||
| lv_et_messages | TYPE BBPT_PD_MESSAGES, " | |||
| lv_iv_src_guid | TYPE BBP_GUID, " | |||
| lv_is_header | TYPE BBP_PDS_CTR_HEADER_D, " | |||
| lv_it_items | TYPE BBPT_PD_CTR_ITEM_D, " | |||
| lv_it_org_data | TYPE BBPT_PDS_ORG, " | |||
| lv_it_text | TYPE BBPT_PD_LONGTEXT, " | |||
| lv_it_partner | TYPE BBPT_PD_PARTNER, " | |||
| lv_it_attach | TYPE BBPT_PDS_ATT_T, " | |||
| lv_it_status | TYPE BBPT_PDS_STATUS. " |
|   CALL FUNCTION 'META_CTR_CREATE' "Kontrakt anlegen |
| EXPORTING | ||
| IV_LOGICAL_SYSTEM | = lv_iv_logical_system | |
| IV_SRC_GUID | = lv_iv_src_guid | |
| IS_HEADER | = lv_is_header | |
| IT_ITEMS | = lv_it_items | |
| IT_ORG_DATA | = lv_it_org_data | |
| IT_TEXT | = lv_it_text | |
| IT_PARTNER | = lv_it_partner | |
| IT_ATTACH | = lv_it_attach | |
| IT_STATUS | = lv_it_status | |
| IMPORTING | ||
| EV_CONTRACT_NUMBER | = lv_ev_contract_number | |
| ET_MESSAGES | = lv_et_messages | |
| TABLES | ||
| ET_CONTROL_RECORD | = lt_et_control_record | |
| . " META_CTR_CREATE | ||
ABAP code using 7.40 inline data declarations to call FM META_CTR_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.Search for further information about these or an SAP related objects