Ansicht
Dokumentation

CFG_API_CREATE_CONFIG - Creates a configuration and assigns a configuration id

CFG_API_CREATE_CONFIG - Creates a configuration and assigns a configuration id

rdisp/max_wprun_time - Maximum work process run time   CL_GUI_FRONTEND_SERVICES - Frontend Services  
This documentation is copyright by SAP AG.
SAP E-Book

Functionality

*"----------------------------------------------------------------------

*"*"Local Interface:

*"  IMPORTING

*"     VALUE(EXT_CONFIG_ID) TYPE  COMT_CFGM_CONFIG_ID OPTIONAL

*"     VALUE(PRODUCT_ID) TYPE  COMT_CFGM_PRODUCT_ID OPTIONAL

*"     VALUE(PRODUCT_TYPE) TYPE  COMT_CFGM_PRODUCT_TYPE OPTIONAL

*"     VALUE(EXT_PRODUCT_ID) TYPE  COMT_CFGM_PRODUCT_ID OPTIONAL

*"     VALUE(EXT_PRODUCT_TYPE) TYPE  COMT_CFGM_PRODUCT_TYPE OPTIONAL

*"     VALUE(EXT_PRODUCT_LOGSYS) TYPE  LOGSYS OPTIONAL

*"     VALUE(KB_DATE) TYPE  COMT_CFGM_DATE OPTIONAL

*"     VALUE(KB_LOGSYS) TYPE  COMT_CFGD_KBLOGSYS OPTIONAL

*"     VALUE(KB_NAME) TYPE  COMT_CFGD_KBNAME OPTIONAL

*"     VALUE(KB_VERSION) TYPE  COMT_CFGD_KBVERSION OPTIONAL

*"     VALUE(KB_PROFILE) TYPE  COMT_CFGD_PROFNAME OPTIONAL

*"     VALUE(KB_ID) TYPE  COMT_CFGD_KBID OPTIONAL

*"     VALUE(EXT_CONFIG) TYPE  COMT_CFGM_CONFIG OPTIONAL

*"     VALUE(CONTEXT) TYPE  COMT_CFGM_CONTEXT_I OPTIONAL

*"     VALUE(USE_TRACE) TYPE  COMT_CFGM_BOOLEAN DEFAULT 'F'

*"  EXPORTING

*"     VALUE(CONFIG_ID) TYPE  COMT_CFGM_CONFIG_ID

*"     VALUE(RETURN_CODE) TYPE  COMT_CFGM_INTEGER

*"  EXCEPTIONS

*"      PARAMETER_EXCEPTION

*"      COMMAND_EXCEPTION

*"      EXCEPTION_CONFIG_EXISTS

*"----------------------------------------------------------------------

The function module creates a configuration and returns a corresponding CONFIG_ID. It is usually the first call in a configuration session. Multiple combinations of its input parameters are valid to create a configuration, while unsupported combinations will result in a thrown PARAMETER_EXCEPTION.

  • EXT_CONFIG_ID is an externally provided configuration ID with the format 'C' + DocumentGUID + '/' + ItemGUID. This functionality is used to create a configuration for a sales item.
  • PRODUCT_ID, PRODUCT_TYPE in combination with KB_LOGSYS and date are used for internal KB-determination if no KB is specified explicitly.
  • EXT_PRODUCT_ID, EXT_PRODUCT_TYPE, EXT_PRODUCT_LOGSYS are used to provide product information if the root-instance of the configuration and the product deviate as is true for product variants and individual objects.
  • KB_DATE used for the internal KB-determination if no KB is specified explicitely
  • KB_LOGSYS logical system of the knowledgebase
  • KB_NAME Name of the Knowledgebase
  • KB_VERSION Version of the Knowledgebase
  • KB_PROFILE the kb-profile to start the configuration. A kb_profile points to a product in the knowledgebase. Thus this information is alternative to productId and productType.
  • KB_ID internal id of the Knowledgebase on the database. Preferably use the triple (logsys, name, version) to identify a knowledgebase.
  • EXT_CONFIG a configuration in external format that is loaded
  • CONTEXT business context in form of property-value pairs that is applied for the root instance only.
  • KB_DATE the date for the knowledgebase determination in format YYYYMMDD

Supported combinations to identify the knowledgebase:

  1. kbid
  2. kb_logsys, kb_name, kb_version,
  3. product_id, product_type, kb_logsys, kb_date

The information is processed in the order shown above. KB_NAME, KB_VERSION, PRODUCT_ID and PRODUCT_TYPE are defaulted from an externally provided configuration (EXT_CONFIG) but are overwritten if the parameters are passed in explicitly.

The knowledgebase determination works in more detail as follows:

  1. if a kbid is given, the knowledgebase with the kbId is loaded. All other parameters are ignored if the knowledgebase exists on the DB. If this is not the case, the next set of search parameters is used.
  2. if the logical system, name and version are given, the Knowledgebase with the triple (KB_LOGSYS, KB_NAME, KB_VERSION) is used to find and load a knowledgebase. All other parameters are ignored if the knowledgebase exists on the DB. If this is not the case, the next set of search parameters is used. A Warning is written to the VMC-log if only KB_NAME and KB_VERSION are given. This is a deprecated way of determining the knowledgebase.
  3. If logical system, product name, product type, date and status are given a knowledgebase is searched for, that contains the product and a kb-profile to the product. The date is used to determine the most recent knowledgebase (with the greatest the fromDate less or equal to KB_DATE). The status is also taken into account as filter.

The product for which the configuration is created is either given directly as PRODUCT_ID and PRODUCT_TYPE or is indirectly identified via the KB_PROFILE. The KB_PROFILE points to a product inside the knowledgebase.

Notes

,,If the PRODUCT_TYPE is not provided it will be defaulted to MARA (Material)

,,Additional info regarding reference characteristics can be found at help.sap.com

Further information

Take a look at the function module CFG_API_GET_EXT_CONFIG to learn how to get the external representation of a configuration.





Parameters

CONFIG_ID
CONTEXT
EXT_CONFIG
EXT_CONFIG_ID
EXT_PRODUCT_ID
EXT_PRODUCT_LOGSYS
EXT_PRODUCT_TYPE
KB_DATE
KB_ID
KB_LOGSYS
KB_NAME
KB_PROFILE
KB_VERSION
PRODUCT_ID
PRODUCT_TYPE
RETURN_CODE
USE_TRACE

Exceptions

COMMAND_EXCEPTION
EXCEPTION_CONFIG_EXISTS
PARAMETER_EXCEPTION

Function Group

COM_CFG_API_ENGINE_COMMAND

General Material Data   Addresses (Business Address Services)  
This documentation is copyright by SAP AG.

Length: 8648 Date: 20240523 Time: 084037     sap01-206 ( 136 ms )