SAP SMC_SUPPLIER_CREATE_MD Function Module for Creates a Supplier (optionally plus Contact Persons) for Leading ERP
SMC_SUPPLIER_CREATE_MD is a standard smc supplier create md SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Creates a Supplier (optionally plus Contact Persons) for Leading ERP 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 smc supplier create md FM, simply by entering the name SMC_SUPPLIER_CREATE_MD into the relevant SAP transaction such as SE37 or SE38.
Function Group: ERP_SMC_BUPA_INTEGR_MD
Program Name: SAPLERP_SMC_BUPA_INTEGR_MD
Main Program: SAPLERP_SMC_BUPA_INTEGR_MD
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Remote-Enabled
Update:

Function SMC_SUPPLIER_CREATE_MD 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 'SMC_SUPPLIER_CREATE_MD'"Creates a Supplier (optionally plus Contact Persons) for Leading ERP.
EXPORTING
IV_SOURCE_LOGSYS = "Logical System
* IT_CONTACT_IDS = "Table of Contact Person Keys
* IV_SUPPLIER_NUMBER = "Key: Supplier ID
IV_SUPPLIER_GUID = "Key: Supplier GUID
* IV_VENDOR_NUMBER = "Account Number of Vendor or Creditor
IV_ACCOUNT_GROUP = "Vendor Account Group
* IS_DATA = "General BP Data, Independent of Business Partner Category
IS_DATA_ORGAN = "SAP BP: BAPI Structure for Organization Data
* IS_SUPPLIER_ADDRESS = "BAPIBUS1006_ADDRESS with Address GUID-KEY
* IS_CONTROL_DATA = "Suppliers Control and Information Data
IMPORTING
ES_SUPPLIER_CREATED = "Return-Structure of a Supplier Creation Request
ET_EXISTING_SUPPLIER = "List of Duplicates found for the supplier to be created
ET_SUP_ADDR_CREATED = "TType for Address Mapping
ET_EXISTING_ADDRESSES = "TType for Address Mapping
ET_CONTACTS_CREATED = "Return Table of a Contact Creation Requests
TABLES
* IT_SUPPLIER_PHONE = "BAPIADTEL plus Address GUID-Key
* IT_SUPPLIER_PURCHDATA = "Purchasing Data, Transfer Structure
* IT_SUPPLIER_MAPPING = "Mapping: used for duplicate check only
* IT_CONTACT_DATA = "BAPIBUS1006_CENTRAL plus Contact Person GUID-Key
* IT_CONTACT_DATA_PERSON = "BAPIBUS1006_CENTRAL_PERSON plus Contact GUID-Key
* IT_REL_ADDRESS = "BAPIBUS1006002_ADDRESS plus Contact and Address GUID-Key
* IT_CONTACT_PHONE = "BAPIADTEL plus Contact Person GUID-Key
* IT_CONTACT_FAX = "BAPIADFAX plus Contact Person GUID-Key
* IT_CONTACT_EMAIL = "BAPIADSMTP plus Contact Person GUID-Key
* IT_CONTACT_MAPPING = "Mapping: used for duplicate check only
* IT_TABLE_OF_CONTENT = "Structure table of content
* IT_SUPPLIER_FAX = "BAPIADFAX plus Address GUID-Key
* IT_DATA_CONTAINER = "Structure data container
* ET_EXISTING_CONTACTS = "Info about the already existing contact persons
* ET_RETURN = "Return Parameter
* IT_SUPPLIER_EMAIL = "BAPIADSMTP plus Address GUID-Key
* IT_SUPPLIER_WEBADDR = "SMC_S_WEBADDR plus Address GUID-Key
* IT_SUPPLIER_IDENTIFICATION = "SAP BP: BAPI Structure for ID Number Details
* IT_SUPPLIER_BANKDATA = "SAP BP: BAPI Structure for Bank Details Data
* IT_SUPPLIER_TAXDATA = "BAPI Structure Data Part VAT Identification Number
* IT_SUPPLIER_INDUSTRIES = "SAP BP: BAPI Structure for Industries
* IT_SUPPLIER_QMSYSTEMS = "Quality Management Systems
IMPORTING Parameters details for SMC_SUPPLIER_CREATE_MD
IV_SOURCE_LOGSYS - Logical System
Data type: LOGSYSOptional: No
Call by Reference: No ( called with pass by value option)
IT_CONTACT_IDS - Table of Contact Person Keys
Data type: SMC_T_CONTACT_S_KEYSOptional: Yes
Call by Reference: No ( called with pass by value option)
IV_SUPPLIER_NUMBER - Key: Supplier ID
Data type: SMC_SUPPLIER_ID_KEYOptional: Yes
Call by Reference: No ( called with pass by value option)
IV_SUPPLIER_GUID - Key: Supplier GUID
Data type: SMC_SUPPLIER_GUID_KEYOptional: No
Call by Reference: No ( called with pass by value option)
IV_VENDOR_NUMBER - Account Number of Vendor or Creditor
Data type: LIFNROptional: Yes
Call by Reference: No ( called with pass by value option)
IV_ACCOUNT_GROUP - Vendor Account Group
Data type: KTOKKOptional: No
Call by Reference: No ( called with pass by value option)
IS_DATA - General BP Data, Independent of Business Partner Category
Data type: BAPIBUS1006_CENTRALOptional: Yes
Call by Reference: No ( called with pass by value option)
IS_DATA_ORGAN - SAP BP: BAPI Structure for Organization Data
Data type: BAPIBUS1006_CENTRAL_ORGANOptional: No
Call by Reference: No ( called with pass by value option)
IS_SUPPLIER_ADDRESS - BAPIBUS1006_ADDRESS with Address GUID-KEY
Data type: SMC_S_BB1006_ADDR_A_KEYOptional: Yes
Call by Reference: No ( called with pass by value option)
IS_CONTROL_DATA - Suppliers Control and Information Data
Data type: SMC_S_CONTROL_INFOOptional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for SMC_SUPPLIER_CREATE_MD
ES_SUPPLIER_CREATED - Return-Structure of a Supplier Creation Request
Data type: SMC_S_SUPPLIER_CREATEDOptional: No
Call by Reference: No ( called with pass by value option)
ET_EXISTING_SUPPLIER - List of Duplicates found for the supplier to be created
Data type: SMC_T_SUPPLIER_MAPPINGOptional: No
Call by Reference: No ( called with pass by value option)
ET_SUP_ADDR_CREATED - TType for Address Mapping
Data type: SMC_T_SUP_ADDR_CREATEDOptional: No
Call by Reference: No ( called with pass by value option)
ET_EXISTING_ADDRESSES - TType for Address Mapping
Data type: SMC_T_SUP_ADDR_MAPPINGOptional: No
Call by Reference: No ( called with pass by value option)
ET_CONTACTS_CREATED - Return Table of a Contact Creation Requests
Data type: SMC_T_CONTACT_CREATEDOptional: No
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for SMC_SUPPLIER_CREATE_MD
IT_SUPPLIER_PHONE - BAPIADTEL plus Address GUID-Key
Data type: SMC_S_BADTEL_A_KEYOptional: Yes
Call by Reference: No ( called with pass by value option)
IT_SUPPLIER_PURCHDATA - Purchasing Data, Transfer Structure
Data type: SMC_S_PURCHDATAOptional: Yes
Call by Reference: No ( called with pass by value option)
IT_SUPPLIER_MAPPING - Mapping: used for duplicate check only
Data type: SMC_S_SUPPLIER_MAPPINGOptional: Yes
Call by Reference: No ( called with pass by value option)
IT_CONTACT_DATA - BAPIBUS1006_CENTRAL plus Contact Person GUID-Key
Data type: SMC_S_BB1006_CENT_C_KEYOptional: Yes
Call by Reference: No ( called with pass by value option)
IT_CONTACT_DATA_PERSON - BAPIBUS1006_CENTRAL_PERSON plus Contact GUID-Key
Data type: SMC_S_BB1006_PERS_C_KEYOptional: Yes
Call by Reference: No ( called with pass by value option)
IT_REL_ADDRESS - BAPIBUS1006002_ADDRESS plus Contact and Address GUID-Key
Data type: SMC_S_BB10062_ADDR_CA_KEYOptional: Yes
Call by Reference: No ( called with pass by value option)
IT_CONTACT_PHONE - BAPIADTEL plus Contact Person GUID-Key
Data type: SMC_S_BADTEL_C_KEYOptional: Yes
Call by Reference: No ( called with pass by value option)
IT_CONTACT_FAX - BAPIADFAX plus Contact Person GUID-Key
Data type: SMC_S_BADFAX_C_KEYOptional: Yes
Call by Reference: No ( called with pass by value option)
IT_CONTACT_EMAIL - BAPIADSMTP plus Contact Person GUID-Key
Data type: SMC_S_BADSMTP_C_KEYOptional: Yes
Call by Reference: No ( called with pass by value option)
IT_CONTACT_MAPPING - Mapping: used for duplicate check only
Data type: SMC_S_CONTACT_MAPPINGOptional: Yes
Call by Reference: No ( called with pass by value option)
IT_TABLE_OF_CONTENT - Structure table of content
Data type: SMC_S_TOCOptional: Yes
Call by Reference: No ( called with pass by value option)
IT_SUPPLIER_FAX - BAPIADFAX plus Address GUID-Key
Data type: SMC_S_BADFAX_A_KEYOptional: Yes
Call by Reference: No ( called with pass by value option)
IT_DATA_CONTAINER - Structure data container
Data type: SMC_S_DATA_CONTAINEROptional: Yes
Call by Reference: No ( called with pass by value option)
ET_EXISTING_CONTACTS - Info about the already existing contact persons
Data type: SMC_S_CONTACT_MAPPINGOptional: Yes
Call by Reference: No ( called with pass by value option)
ET_RETURN - Return Parameter
Data type: BAPIRET2Optional: Yes
Call by Reference: No ( called with pass by value option)
IT_SUPPLIER_EMAIL - BAPIADSMTP plus Address GUID-Key
Data type: SMC_S_BADSMTP_A_KEYOptional: Yes
Call by Reference: No ( called with pass by value option)
IT_SUPPLIER_WEBADDR - SMC_S_WEBADDR plus Address GUID-Key
Data type: SMC_S_WEBADDR_A_KEYOptional: Yes
Call by Reference: No ( called with pass by value option)
IT_SUPPLIER_IDENTIFICATION - SAP BP: BAPI Structure for ID Number Details
Data type: BAPIBUS1006_ID_DETAILSOptional: Yes
Call by Reference: No ( called with pass by value option)
IT_SUPPLIER_BANKDATA - SAP BP: BAPI Structure for Bank Details Data
Data type: BAPIBUS1006_BANKDETAILSOptional: Yes
Call by Reference: No ( called with pass by value option)
IT_SUPPLIER_TAXDATA - BAPI Structure Data Part VAT Identification Number
Data type: BAPIBUS1006TAXOptional: Yes
Call by Reference: No ( called with pass by value option)
IT_SUPPLIER_INDUSTRIES - SAP BP: BAPI Structure for Industries
Data type: BAPIBUS1006_INDUSTRYSECTOROptional: Yes
Call by Reference: No ( called with pass by value option)
IT_SUPPLIER_QMSYSTEMS - Quality Management Systems
Data type: SMC_S_QMSYSTEMOptional: Yes
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for SMC_SUPPLIER_CREATE_MD 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_iv_source_logsys | TYPE LOGSYS, " | |||
| lt_it_supplier_phone | TYPE STANDARD TABLE OF SMC_S_BADTEL_A_KEY, " | |||
| lv_es_supplier_created | TYPE SMC_S_SUPPLIER_CREATED, " | |||
| lv_it_contact_ids | TYPE SMC_T_CONTACT_S_KEYS, " | |||
| lt_it_supplier_purchdata | TYPE STANDARD TABLE OF SMC_S_PURCHDATA, " | |||
| lt_it_supplier_mapping | TYPE STANDARD TABLE OF SMC_S_SUPPLIER_MAPPING, " | |||
| lt_it_contact_data | TYPE STANDARD TABLE OF SMC_S_BB1006_CENT_C_KEY, " | |||
| lt_it_contact_data_person | TYPE STANDARD TABLE OF SMC_S_BB1006_PERS_C_KEY, " | |||
| lt_it_rel_address | TYPE STANDARD TABLE OF SMC_S_BB10062_ADDR_CA_KEY, " | |||
| lt_it_contact_phone | TYPE STANDARD TABLE OF SMC_S_BADTEL_C_KEY, " | |||
| lt_it_contact_fax | TYPE STANDARD TABLE OF SMC_S_BADFAX_C_KEY, " | |||
| lt_it_contact_email | TYPE STANDARD TABLE OF SMC_S_BADSMTP_C_KEY, " | |||
| lt_it_contact_mapping | TYPE STANDARD TABLE OF SMC_S_CONTACT_MAPPING, " | |||
| lt_it_table_of_content | TYPE STANDARD TABLE OF SMC_S_TOC, " | |||
| lt_it_supplier_fax | TYPE STANDARD TABLE OF SMC_S_BADFAX_A_KEY, " | |||
| lv_iv_supplier_number | TYPE SMC_SUPPLIER_ID_KEY, " | |||
| lv_et_existing_supplier | TYPE SMC_T_SUPPLIER_MAPPING, " | |||
| lt_it_data_container | TYPE STANDARD TABLE OF SMC_S_DATA_CONTAINER, " | |||
| lt_et_existing_contacts | TYPE STANDARD TABLE OF SMC_S_CONTACT_MAPPING, " | |||
| lt_et_return | TYPE STANDARD TABLE OF BAPIRET2, " | |||
| lv_iv_supplier_guid | TYPE SMC_SUPPLIER_GUID_KEY, " | |||
| lt_it_supplier_email | TYPE STANDARD TABLE OF SMC_S_BADSMTP_A_KEY, " | |||
| lv_et_sup_addr_created | TYPE SMC_T_SUP_ADDR_CREATED, " | |||
| lv_iv_vendor_number | TYPE LIFNR, " | |||
| lt_it_supplier_webaddr | TYPE STANDARD TABLE OF SMC_S_WEBADDR_A_KEY, " | |||
| lv_et_existing_addresses | TYPE SMC_T_SUP_ADDR_MAPPING, " | |||
| lv_iv_account_group | TYPE KTOKK, " | |||
| lv_et_contacts_created | TYPE SMC_T_CONTACT_CREATED, " | |||
| lt_it_supplier_identification | TYPE STANDARD TABLE OF BAPIBUS1006_ID_DETAILS, " | |||
| lv_is_data | TYPE BAPIBUS1006_CENTRAL, " | |||
| lt_it_supplier_bankdata | TYPE STANDARD TABLE OF BAPIBUS1006_BANKDETAILS, " | |||
| lv_is_data_organ | TYPE BAPIBUS1006_CENTRAL_ORGAN, " | |||
| lt_it_supplier_taxdata | TYPE STANDARD TABLE OF BAPIBUS1006TAX, " | |||
| lv_is_supplier_address | TYPE SMC_S_BB1006_ADDR_A_KEY, " | |||
| lt_it_supplier_industries | TYPE STANDARD TABLE OF BAPIBUS1006_INDUSTRYSECTOR, " | |||
| lv_is_control_data | TYPE SMC_S_CONTROL_INFO, " | |||
| lt_it_supplier_qmsystems | TYPE STANDARD TABLE OF SMC_S_QMSYSTEM. " |
|   CALL FUNCTION 'SMC_SUPPLIER_CREATE_MD' "Creates a Supplier (optionally plus Contact Persons) for Leading ERP |
| EXPORTING | ||
| IV_SOURCE_LOGSYS | = lv_iv_source_logsys | |
| IT_CONTACT_IDS | = lv_it_contact_ids | |
| IV_SUPPLIER_NUMBER | = lv_iv_supplier_number | |
| IV_SUPPLIER_GUID | = lv_iv_supplier_guid | |
| IV_VENDOR_NUMBER | = lv_iv_vendor_number | |
| IV_ACCOUNT_GROUP | = lv_iv_account_group | |
| IS_DATA | = lv_is_data | |
| IS_DATA_ORGAN | = lv_is_data_organ | |
| IS_SUPPLIER_ADDRESS | = lv_is_supplier_address | |
| IS_CONTROL_DATA | = lv_is_control_data | |
| IMPORTING | ||
| ES_SUPPLIER_CREATED | = lv_es_supplier_created | |
| ET_EXISTING_SUPPLIER | = lv_et_existing_supplier | |
| ET_SUP_ADDR_CREATED | = lv_et_sup_addr_created | |
| ET_EXISTING_ADDRESSES | = lv_et_existing_addresses | |
| ET_CONTACTS_CREATED | = lv_et_contacts_created | |
| TABLES | ||
| IT_SUPPLIER_PHONE | = lt_it_supplier_phone | |
| IT_SUPPLIER_PURCHDATA | = lt_it_supplier_purchdata | |
| IT_SUPPLIER_MAPPING | = lt_it_supplier_mapping | |
| IT_CONTACT_DATA | = lt_it_contact_data | |
| IT_CONTACT_DATA_PERSON | = lt_it_contact_data_person | |
| IT_REL_ADDRESS | = lt_it_rel_address | |
| IT_CONTACT_PHONE | = lt_it_contact_phone | |
| IT_CONTACT_FAX | = lt_it_contact_fax | |
| IT_CONTACT_EMAIL | = lt_it_contact_email | |
| IT_CONTACT_MAPPING | = lt_it_contact_mapping | |
| IT_TABLE_OF_CONTENT | = lt_it_table_of_content | |
| IT_SUPPLIER_FAX | = lt_it_supplier_fax | |
| IT_DATA_CONTAINER | = lt_it_data_container | |
| ET_EXISTING_CONTACTS | = lt_et_existing_contacts | |
| ET_RETURN | = lt_et_return | |
| IT_SUPPLIER_EMAIL | = lt_it_supplier_email | |
| IT_SUPPLIER_WEBADDR | = lt_it_supplier_webaddr | |
| IT_SUPPLIER_IDENTIFICATION | = lt_it_supplier_identification | |
| IT_SUPPLIER_BANKDATA | = lt_it_supplier_bankdata | |
| IT_SUPPLIER_TAXDATA | = lt_it_supplier_taxdata | |
| IT_SUPPLIER_INDUSTRIES | = lt_it_supplier_industries | |
| IT_SUPPLIER_QMSYSTEMS | = lt_it_supplier_qmsystems | |
| . " SMC_SUPPLIER_CREATE_MD | ||
ABAP code using 7.40 inline data declarations to call FM SMC_SUPPLIER_CREATE_MD
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