
CALL FUNCTION 'CUCB_SET_CONFIGURATION'
EXPORTING
root_instance = i_root_instance
is_cbase_header = is_cbase_header
CHANGING
configuration = et_cfg
EXCEPTIONS
invalid_input = 1
invalid_instance = 2
instance_is_a_classification = 3
OTHERS = 4.
**** To get Installed Base (IBASE) against cuobj(Obj Number)
SELECT SINGLE * FROM ibin WHERE instance = i_root_instance.
IF sy-subrc = 0.
***Filling IBase details
is_cbase_header-ibase = ibin-ibase.
is_cbase_header-conf-cstatus = '1'.
ENDIF.
***Filling Characteristic Values for Update or Change.
es_cfg-instance = i_root_instance.
es_cfg-parent = i_root_instance.
es_cfg-root = i_root_instance.
** >>> general data SOC..
es_cfg-com-mlang = sy-langu.
es_cfg-com-objnr = ibin-objnr.
es_cfg-com-ibase = ibin-ibase.
es_cfg-com-amount = ibin-amount.
es_cfg-com-unit = ibin-unit.
es_cfg-com-datuv = ibin-datuv.
es_cfg-com-in_objnr = ibin-in_objnr.
es_cfg-com-objecttyp = ibin-objecttyp.
** >>> general data EOC..
** >>> configuration data instance SOC..
es_cfg-conf-cstatus = ibin-cstatus.
es_cfg-conf-cucocnt = ibin-cucocnt.
es_cfg-conf-klart = ibin-klart.
** >>> configuration data instance EOC..
** >>> Observer Data SOC...
es_cfg-type_of-object_type = 'MARA' "Object Table(Based On Scenario).
es_cfg-type_of-object_key = wa_resb-matnr.
** >>> Observer Data EOC...
es_cfg-ind-indcha = 'X'.
** >>> OWNER Data SOC...
es_cfg-owner-object_type = 'RESB' "(Based On Scenario).
CONCATENATE wa_resb-rsnum wa_resb-rspos INTO es_cfg-owner-object_key(Based On Scenario).
** >>> OWNER Data EOC...
**Need to Pass characteristic Value with instance .
wa_values-atinn = GV_atinn "(Internal characteristic)
wa_values-atwrt = GV_Value "(characteristic value).
wa_values-atcod = '1' "(1= Lower limit) (Check Domain Level and Pass values).
APPEND wa_values TO it_values.
CLEAR wa_values.
es_cfg-values = it_values.
APPEND es_cfg TO et_cfg.
CLEAR es_cfg .
**** Save multi-level configuration to one instance...
CALL FUNCTION 'CUCB_CONFIGURATION_TO_DB'
EXPORTING
root_instance = i_root_instance
root_object = root_object
iv_material = wa_resb-matnr
iv_location = wa_resb-lgort
IMPORTING
new_instance = new_instance
TABLES
exp_new_nested_cuobjs = exp_new_nested_cuobjs
EXCEPTIONS
invalid_instance = 1
invalid_root_instance = 2
no_changes = 3
already_registered_for_update = 4
instance_is_a_classification = 5
OTHERS = 6.
**** Commit Work...
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
wait = 'X'.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
3 | |
2 | |
2 | |
2 | |
2 | |
2 | |
1 | |
1 | |
1 |