Enabling and Disabling a Parameter of a Concurrent Program at Runtime

Enabling and Disabling a Parameter of a Concurrent Program at Runtime

Recently during one of my development task there was a request for having the Functionality to Enable or Disable the parameter of a Concurrent Program at runtime, this could be very easily achieved.

Here is my blog post for the readers if anyone wants to use the same functionality in future.

Now to begin with, Before actually defining the Concurrent Program (CP) let us first define the Value sets that would be used for the parameters of the CP.

Suppose for instance we have a Independent Value set say “XX_DUMMY_INV_RPT_TYP” which has two values “Detail” and “Summary

Now if the Value Detail is selected then the Parameter1 should be enabled if Summary then Parameter2 should be enabled.

IMG_VALUESET

For the Parameter1 the Value set “XX_DUMMY_PARAM1” is defined as below:

Based on the value in the where clause say “:$FLEX$.Dummy_Par1=’Y’” the parameter field is Enabled or Disabled , if Y then its enabled else disabled.

IMG_VALUESET_1

Similarly for the Parameter2 value set “XX_DUMMY_PARAM2” is defined as below:

IMG_VALUESET_2

Now we define the Executable:

Executable Short Name: XX_DUMMY_EXEC

IMG_EXECUTABLE

Defining the CP and Adding the below list of parameters to it

IMG_CP_PARAMS_1

Set the Default Value for Dummy_Par1 as “select decode(:$FLEX$.Type,’Detail’,’Y’,null) from dual” and ensure to uncheck the Display checkbox.

IMG_CP_PARAMS_2

Set the Default Value for Dummy_Par2 as “select decode(:$FLEX$.Type,’Summary’,’Y’,null) from dual” and ensure to uncheck the Display checkbox.

Run the CP “Dummy Program for Disabling a Parameter at Runtime

If we selected Detail for the Parameter “TYPE“, PARAMETER1 would be Enabled and PARAMETER2 would be Disabled and if Summary is selected then PARAMETER2 is be Enabled and PARAMETER1 would be Disabled this is shown as below:

IMG_CP_PARAMS_3

Thank You….!!!!

Please feel free to post your comments……

 

 

 

Advertisements

Comments are closed.

%d bloggers like this: