Hi Durga Prasad,
Apologies for the method name being wrongly typed. Yes, it is DO_CONFIG_DETERMINATION which needs to be redefined.
The concept of Dynamic Configuration is a way of making the code work for multiple configurations for multiple business scenario. The coding however is pretty simple and straight forward.
Step 1. Create a Custom Table with the following fields :
STATUS ROLE_CONFIG_KEY COMP_USAGE OBJECT_TYPE OBJ_SUB_TYPE
maintain values here.
Step 2 : Create the Views with the Configuration Keys as Maintained in the Table.
Step 3: Redefine the DO_CONFIG_DETERMINATION and read the status from the Database table and set the Keys accordingly.
Step 4: (Optional) - You can read the database table in the method - WD_USAGE_INITIALIZE and keep the table buffered in order to fire multiple queries.
Advantages : The Functional Owner can configure the Views and can maintain the values in the Database Tables and then based on the maintained values and configuration the appropriate views will be set accordingly.
Sample Code:
Step1 & Step2 are simple as to create the table and maintain the values.
Step 3: Please find the code
data : lv_object_type TYPE bsp_dlc_object_type, "Object Type
lv_object_sub_type TYPE bsp_dlc_object_sub_type.
*- Write or Read the from the database table to get the Object keys
*- Select * from dbtab into table itab where status = XXXXXX
*- Set the Keys
lv_object_type = 'ZKEY1'. "Example
lv_object_sub_type = 'OBJ1'. "Example
*- Pass the keys to the configuration
me->set_config_keys(
EXPORTING
iv_object_type = lv_object_type
iv_object_sub_type = lv_object_sub_type
iv_propagate_2_children = abap_false
).
Hope this helps.
Many thanks in advance.
Best Regards,
Samantak.