Saturday 27 February 2021

Oracle Apps: How to set Concurrent Program Parameter Disabled / Readonly

This post is to show how can me make a concurrent program parameter disabled / readonly.

You might be wondering why do you want to make a concurrent program parameter readonly, when we could just set the display false for the parameter. But this is to fix the issues identified by my colleagues in the solution given in the below post. 

Oracle Apps : Selecting Multiple values for a parameter in Concurrent Program 

The issues identified on the above solution is

If the user removes the value from the Multiselect field manually, then user will not be able to select any more.

The reason is because once you modify the parameter value, then the default query will not be executed. The solution is to make the field disabled, so that user will not be able to clear the values manually. They will be forced to use the 'Clear' option in the original list.

Steps to make the field disabled/read only.

1.  Create a new valueset of type 'Special'. We just need to put some dummy PLSQL block for the Edit and Validate events.

Override the Edit event, this will make the field read only. You don't need to do write any logic in this, just add a dummy PLSQL block for this event.

Validate event user exit is mandatory for a special valueset, else you will get an error when submitting the concurrent program.  So just add a dummy PLSQL block for validate event as well.

Code used in both the events.

FND PLSQL   
 "  
  DECLARE  
   v_sel_fruit_list VARCHAR2(240):= :!VALUE;  
  BEGIN  
   NULL;  
  END;  
 "


2. Attach this valuset to the Multiselect parameter.

Now, when you submit the concurrent program, this parameter will be disabled. User will not be able to modify the values in this parameter directly. The value in this parameter will need to be updated by the first parameter.



To see how to use special valuset for validation on concurrent program parameter :




Feel free to point out if anything is missing/wrong in this blog.


No comments:

Post a Comment