SAP Function CFG_API_CREATE_INSTANCE - Create Instance

Parameter Reference Type Length Default Optional Text
CONFIG_ID COMT_CFGM_CONFIG_ID g 8 Configuration Identifier
DECOMP_POS_NR COMT_CFGD_ITPOS C 4 Item position
PARENT_INST_ID COMT_CFGD_INSTID C 8 Internal identifier of a Instance

Parameter Reference Type Length Text
INST_ID COMT_CFGD_INSTID C 8 Internal identifier of a Instance

Functionality
This function module can be used to create an instance within amultilevel configuration.
You just have to specify the according configuration via CONFIG_ID andthe instance whose child you want to create via PARENT_INST_ID. Thechild itself is identified by the DECOMP_POS_NR.
The configurator checks if the item can be created and returns theINST_ID of the new created instance.
The ID of the new instance can be then used in further commands to gettheir characteristics, informations, to create their children etc.
Possible causes for denial of the creation are usually:

  • The position number is not valid

  • The parent instance has no child instances as subcomponents (check if
  • the bill of material was is part of the knowledgebase, this depends onthe use type and knowledgebase settings)
    • The instance for the specified DECOMP_POS_NR is already created



    • If the command was not successful no INST_ID is returned.

      Notes
      DECOMP_POS_NR is the position number of the childinstance within themodelled bill of material of the parent instance.