Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

CU41- CREATE CONFIGURATION PROFILE

Former Member
0 Kudos

hi, is there a function to create a profile?

thanks!

1 ACCEPTED SOLUTION

Former Member
0 Kudos

check this

FU CAMA_CON_PROFILE_MAINTAIN
Functionality
You can use this API to create, change, and delete a configuration profile.

Create
When creating, the following parameters must be defined:
Object type
Structure CON_OBJECT_KEY to identify the configurable object
Here, you specify the key fields and field values of a configurable object.

Change
When changing, the following parameters must be defined:
Object type
Structure CON_OBJECT_KEY to identify the configurable object
The attributes that are to be changed

Delete
When deleting, the following parameters must be defined:
Object type
Structure CON_OBJECT_KEY to identify the configurable object
Deletion indicator
Example
*======================================================================= 
* Create configuration profile
*=======================================================================

data:  T_OBJECT_KEY like object_key occurs 0 with header line,
                                                                                T_ATTRIB     like cpro_attr  occurs 0 with header line.

* Initialize API calls
  call function 'CALO_INIT_API' ...

* Assign configuration profile to material1
  T_OBJECT_KEY-KEY_FELD                                                                                = 'MATNR'.                 "Key column
  T_OBJECT_KEY-KPARA_VALU                                                                                = 'MATERIAL1'.             "Key value
  append T_OBJECT_KEY.

* Basic data
  T_ATTRIB-C_PROFILE                                                                                = 'CONPROFILE1'.                "Profile name
  T_ATTRIB-CLASSTYPE                                                                                = '300'.                                                                                "Class      type
  append T_ATTRIB.

* Create configuration profile 
  call function 'CAMA_CON_PROFILE_MAINTAIN'
     exporting
                                                                                object_type               = 'MARA'         "Object table
     tables
                                                                                con_object_key                    = T_OBJECT_KEY
                                                                                con_pro_attributes                  = T_ATTRIB
                                                                                con_pro_dependency_data        =      T_DEP_DATA
          con_pro_dependency_descr             = T_DEP_DESCR
          con_pro_dependency_order             = T_DEP_ORDER
          con_pro_dependency_source      =     T_DEP_SOURCE
                                                                                con_pro_dependency_doc                = T_DEP_DOC
          con_pro_dependency_prec_data   = T_DEP_PREC_DATA
          con_pro_dependency_prec_descr  = T_DEP_PREC_DESCR
          con_pro_dependency_prec_order  = T_DEP_PREC_ORDER
          con_pro_dependency_prec_source = T_DEP_PREC_SOURCE
          con_pro_dependency_prec_doc    =               T_DEP_PREC_DOC
     exceptions
                                                                                error                     = 1
                                                                             others                    =     2.

*=======================================================================
Notes
Initialization module CALO_INIT_API must be called once before other APIs.

When you create a configuration profile, status "In Preparation" is assigned as standard, provided that the object has not yet been assigned to a class type. You cannot set status "Released" until the assignment to a class has been defined. You create this assignment by using the APIs for classification.

Individual configuration profile records can be deleted by using the FLDELETE indicator. In table CON_PRO_ATTRIBUTES, the class type, the class, and any organizational areas must be specified.

You can also assign object dependencies to a configuration profile. To do this, enter the configuration profile to which you want to assign a dependency in the relevant tables.
Parameters
OBJECT_TYPE
CHANGE_NO
FLDELETE
INTERNAL_FORMAT
CON_OBJECT_KEY
CON_PRO_ATTRIBUTES
CON_PRO_DEPENDENCY_DATA
CON_PRO_DEPENDENCY_DESCR
CON_PRO_DEPENDENCY_ORDER
CON_PRO_DEPENDENCY_SOURCE
CON_PRO_DEPENDENCY_DOC
CON_PRO_DEPENDENCY_PREC_DATA
CON_PRO_DEPENDENCY_PREC_DESCR
CON_PRO_DEPENDENCY_PREC_ORDER
CON_PRO_DEPENDENCY_PREC_SOURCE
CON_PRO_DEPENDENCY_PREC_DOC

Exceptions
ERROR

Function Group
CAMA

Regards

Prabhu

2 REPLIES 2

Former Member
0 Kudos

check this

FU CAMA_CON_PROFILE_MAINTAIN
Functionality
You can use this API to create, change, and delete a configuration profile.

Create
When creating, the following parameters must be defined:
Object type
Structure CON_OBJECT_KEY to identify the configurable object
Here, you specify the key fields and field values of a configurable object.

Change
When changing, the following parameters must be defined:
Object type
Structure CON_OBJECT_KEY to identify the configurable object
The attributes that are to be changed

Delete
When deleting, the following parameters must be defined:
Object type
Structure CON_OBJECT_KEY to identify the configurable object
Deletion indicator
Example
*======================================================================= 
* Create configuration profile
*=======================================================================

data:  T_OBJECT_KEY like object_key occurs 0 with header line,
                                                                                T_ATTRIB     like cpro_attr  occurs 0 with header line.

* Initialize API calls
  call function 'CALO_INIT_API' ...

* Assign configuration profile to material1
  T_OBJECT_KEY-KEY_FELD                                                                                = 'MATNR'.                 "Key column
  T_OBJECT_KEY-KPARA_VALU                                                                                = 'MATERIAL1'.             "Key value
  append T_OBJECT_KEY.

* Basic data
  T_ATTRIB-C_PROFILE                                                                                = 'CONPROFILE1'.                "Profile name
  T_ATTRIB-CLASSTYPE                                                                                = '300'.                                                                                "Class      type
  append T_ATTRIB.

* Create configuration profile 
  call function 'CAMA_CON_PROFILE_MAINTAIN'
     exporting
                                                                                object_type               = 'MARA'         "Object table
     tables
                                                                                con_object_key                    = T_OBJECT_KEY
                                                                                con_pro_attributes                  = T_ATTRIB
                                                                                con_pro_dependency_data        =      T_DEP_DATA
          con_pro_dependency_descr             = T_DEP_DESCR
          con_pro_dependency_order             = T_DEP_ORDER
          con_pro_dependency_source      =     T_DEP_SOURCE
                                                                                con_pro_dependency_doc                = T_DEP_DOC
          con_pro_dependency_prec_data   = T_DEP_PREC_DATA
          con_pro_dependency_prec_descr  = T_DEP_PREC_DESCR
          con_pro_dependency_prec_order  = T_DEP_PREC_ORDER
          con_pro_dependency_prec_source = T_DEP_PREC_SOURCE
          con_pro_dependency_prec_doc    =               T_DEP_PREC_DOC
     exceptions
                                                                                error                     = 1
                                                                             others                    =     2.

*=======================================================================
Notes
Initialization module CALO_INIT_API must be called once before other APIs.

When you create a configuration profile, status "In Preparation" is assigned as standard, provided that the object has not yet been assigned to a class type. You cannot set status "Released" until the assignment to a class has been defined. You create this assignment by using the APIs for classification.

Individual configuration profile records can be deleted by using the FLDELETE indicator. In table CON_PRO_ATTRIBUTES, the class type, the class, and any organizational areas must be specified.

You can also assign object dependencies to a configuration profile. To do this, enter the configuration profile to which you want to assign a dependency in the relevant tables.
Parameters
OBJECT_TYPE
CHANGE_NO
FLDELETE
INTERNAL_FORMAT
CON_OBJECT_KEY
CON_PRO_ATTRIBUTES
CON_PRO_DEPENDENCY_DATA
CON_PRO_DEPENDENCY_DESCR
CON_PRO_DEPENDENCY_ORDER
CON_PRO_DEPENDENCY_SOURCE
CON_PRO_DEPENDENCY_DOC
CON_PRO_DEPENDENCY_PREC_DATA
CON_PRO_DEPENDENCY_PREC_DESCR
CON_PRO_DEPENDENCY_PREC_ORDER
CON_PRO_DEPENDENCY_PREC_SOURCE
CON_PRO_DEPENDENCY_PREC_DOC

Exceptions
ERROR

Function Group
CAMA

Regards

Prabhu

0 Kudos

Hello, Prabhu Peram.

Topic: I can't get status "Released"!!!!

You said:"You cannot set status "Released" until the assignment to a class has been defined."

Yes, it is so. I can't set the status "Released" using this function module. The status is either "In preparation" or '"Locked". After this I call the function module BAPI_OBJCL_CREATE to assign characteristics of the class to the configurable material. But the status stays the same "In preparation".

Of course, if I go to CU42, delete just created "problem" profile and create a new one manually ( setting priority, prof.name and class type), the status is set to "Released".

Do you know how to solve this problem. I mean how to get status "Released".

Thank you very much in advance.