SAP CFG_WRP_CREATE_CONFIG Function Module for Wrapper for CFG_API_CREATE_CONFIG









CFG_WRP_CREATE_CONFIG is a standard cfg wrp create config SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Wrapper for CFG_API_CREATE_CONFIG 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 cfg wrp create config FM, simply by entering the name CFG_WRP_CREATE_CONFIG into the relevant SAP transaction such as SE37 or SE38.

Function Group: COM_CFG_WRP
Program Name: SAPLCOM_CFG_WRP
Main Program: SAPLCOM_CFG_WRP
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:



Function CFG_WRP_CREATE_CONFIG 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 'CFG_WRP_CREATE_CONFIG'"Wrapper for CFG_API_CREATE_CONFIG
EXPORTING
* EXT_CONFIG_ID = "External Configuration Id
* KB_VERSION = "KB Version
* KB_PROFILE = "Profile name
* KB_ID = "Internal identifier of a knowledge base
* EXT_CONFIG = "External Interface Configuration
* CONTEXT = "Configuration Context
* USE_TRACE = 'F' "Use Trace (T=True, F=False, Blank=False)
* PRODUCT_ID = "Product Id
* PRODUCT_TYPE = "Product Type
* EXT_PRODUCT_ID = "External Product Id
* EXT_PRODUCT_TYPE = "External Product Type
* EXT_PRODUCT_LOGSYS = "External Logical system
* KB_DATE = "KB validity date (YYYYMMDD)
* KB_LOGSYS = "Logical System
* KB_NAME = "KB Name

IMPORTING
CONFIG_ID = "Configuration Identifier
RETURN_CODE = "0=OK, 1=Warning, 2=Error

EXCEPTIONS
PARAMETER_EXCEPTION = 1 COMMAND_EXCEPTION = 2 EXCEPTION_CONFIG_EXISTS = 3 OTHERS = 4
.



IMPORTING Parameters details for CFG_WRP_CREATE_CONFIG

EXT_CONFIG_ID - External Configuration Id

Data type: COMT_CFGM_CONFIG_ID
Optional: Yes
Call by Reference: Yes

KB_VERSION - KB Version

Data type: COMT_CFGD_KBVERSION
Optional: Yes
Call by Reference: Yes

KB_PROFILE - Profile name

Data type: COMT_CFGD_PROFNAME
Optional: Yes
Call by Reference: Yes

KB_ID - Internal identifier of a knowledge base

Data type: COMT_CFGD_KBID
Optional: Yes
Call by Reference: Yes

EXT_CONFIG - External Interface Configuration

Data type: COMT_CFGM_CONFIG
Optional: Yes
Call by Reference: Yes

CONTEXT - Configuration Context

Data type: COMT_CFGM_CONTEXT_I
Optional: Yes
Call by Reference: Yes

USE_TRACE - Use Trace (T=True, F=False, Blank=False)

Data type: COMT_CFGM_BOOLEAN
Default: 'F'
Optional: Yes
Call by Reference: Yes

PRODUCT_ID - Product Id

Data type: COMT_CFGM_PRODUCT_ID
Optional: Yes
Call by Reference: Yes

PRODUCT_TYPE - Product Type

Data type: COMT_CFGM_PRODUCT_TYPE
Optional: Yes
Call by Reference: Yes

EXT_PRODUCT_ID - External Product Id

Data type: COMT_CFGM_PRODUCT_ID
Optional: Yes
Call by Reference: Yes

EXT_PRODUCT_TYPE - External Product Type

Data type: COMT_CFGM_PRODUCT_TYPE
Optional: Yes
Call by Reference: Yes

EXT_PRODUCT_LOGSYS - External Logical system

Data type: LOGSYS
Optional: Yes
Call by Reference: Yes

KB_DATE - KB validity date (YYYYMMDD)

Data type: COMT_CFGM_DATE
Optional: Yes
Call by Reference: Yes

KB_LOGSYS - Logical System

Data type: COMT_CFGD_KBLOGSYS
Optional: Yes
Call by Reference: Yes

KB_NAME - KB Name

Data type: COMT_CFGD_KBNAME
Optional: Yes
Call by Reference: Yes

EXPORTING Parameters details for CFG_WRP_CREATE_CONFIG

CONFIG_ID - Configuration Identifier

Data type: COMT_CFGM_CONFIG_ID
Optional: No
Call by Reference: Yes

RETURN_CODE - 0=OK, 1=Warning, 2=Error

Data type: COMT_CFGM_INTEGER
Optional: No
Call by Reference: Yes

EXCEPTIONS details

PARAMETER_EXCEPTION - Problem in using an import parameter

Data type:
Optional: No
Call by Reference: Yes

COMMAND_EXCEPTION - Problem in executing the configuration command

Data type:
Optional: No
Call by Reference: Yes

EXCEPTION_CONFIG_EXISTS - Problem when configuration doesn't exist

Data type:
Optional: No
Call by Reference: Yes

OTHERS - Other exception

Data type:
Optional: No
Call by Reference: Yes

Copy and paste ABAP code example for CFG_WRP_CREATE_CONFIG 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_config_id  TYPE COMT_CFGM_CONFIG_ID, "   
lv_ext_config_id  TYPE COMT_CFGM_CONFIG_ID, "   
lv_parameter_exception  TYPE COMT_CFGM_CONFIG_ID, "   
lv_kb_version  TYPE COMT_CFGD_KBVERSION, "   
lv_kb_profile  TYPE COMT_CFGD_PROFNAME, "   
lv_kb_id  TYPE COMT_CFGD_KBID, "   
lv_ext_config  TYPE COMT_CFGM_CONFIG, "   
lv_context  TYPE COMT_CFGM_CONTEXT_I, "   
lv_use_trace  TYPE COMT_CFGM_BOOLEAN, "   'F'
lv_product_id  TYPE COMT_CFGM_PRODUCT_ID, "   
lv_return_code  TYPE COMT_CFGM_INTEGER, "   
lv_command_exception  TYPE COMT_CFGM_INTEGER, "   
lv_product_type  TYPE COMT_CFGM_PRODUCT_TYPE, "   
lv_exception_config_exists  TYPE COMT_CFGM_PRODUCT_TYPE, "   
lv_others  TYPE COMT_CFGM_PRODUCT_TYPE, "   
lv_ext_product_id  TYPE COMT_CFGM_PRODUCT_ID, "   
lv_ext_product_type  TYPE COMT_CFGM_PRODUCT_TYPE, "   
lv_ext_product_logsys  TYPE LOGSYS, "   
lv_kb_date  TYPE COMT_CFGM_DATE, "   
lv_kb_logsys  TYPE COMT_CFGD_KBLOGSYS, "   
lv_kb_name  TYPE COMT_CFGD_KBNAME. "   

  CALL FUNCTION 'CFG_WRP_CREATE_CONFIG'  "Wrapper for CFG_API_CREATE_CONFIG
    EXPORTING
         EXT_CONFIG_ID = lv_ext_config_id
         KB_VERSION = lv_kb_version
         KB_PROFILE = lv_kb_profile
         KB_ID = lv_kb_id
         EXT_CONFIG = lv_ext_config
         CONTEXT = lv_context
         USE_TRACE = lv_use_trace
         PRODUCT_ID = lv_product_id
         PRODUCT_TYPE = lv_product_type
         EXT_PRODUCT_ID = lv_ext_product_id
         EXT_PRODUCT_TYPE = lv_ext_product_type
         EXT_PRODUCT_LOGSYS = lv_ext_product_logsys
         KB_DATE = lv_kb_date
         KB_LOGSYS = lv_kb_logsys
         KB_NAME = lv_kb_name
    IMPORTING
         CONFIG_ID = lv_config_id
         RETURN_CODE = lv_return_code
    EXCEPTIONS
        PARAMETER_EXCEPTION = 1
        COMMAND_EXCEPTION = 2
        EXCEPTION_CONFIG_EXISTS = 3
        OTHERS = 4
. " CFG_WRP_CREATE_CONFIG




ABAP code using 7.40 inline data declarations to call FM CFG_WRP_CREATE_CONFIG

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.

 
 
 
 
 
 
 
 
DATA(ld_use_trace) = 'F'.
 
 
 
 
 
 
 
 
 
 
 
 
 


Search for further information about these or an SAP related objects



Comments on this SAP object

What made you want to lookup this SAP object? Please tell us what you were looking for and anything you would like to be included on this page!