Apps To Fusion

.......Our Journey from Apps To Fusion

 
  • Increase font size
  • Default font size
  • Decrease font size



Enabling/disabling concurrent program parameters

E-mail
User Rating: / 6
PoorBest 

Step-by-Step: Enabling/disabling concurrent program parameters dyncamically

Find out how to enable/disable concurrent program parameters conditionally/dynamically.

by Arun Sista

This article is a simple step by step guide on controlling concurrent program parameters by enabling/disabling them based on values in other parameters. This article is for use of anyone who wishes to develop a new concurrent program/modify an existing one and wants to introduce new behavior to concurrent program parameters.

Background / Overview

I decided to write this based on some of my experience at Oracle where I had to research this fairly simple programming technique and given the lack of documentation ended up spending a fair bit of time on it initially.

This article contains a detailed explanation in text as well as an audio visual with a demo on the topic.

Scenario:

Let us assume that we are trying to create a concurrent program X_CUSTOM_TEST_CONC_PROGRAM that has 3 parameters.

The first parameter is called Requisition Type and the values are controlled by a pre-defined value set by the name PO_SRS_REQUISITION_TYPE. The values in this parameter can be INTERNAL/PURCHASE.

The second parameter is called Inventory Organization and is dependent on Requisition Type and would be enabled if the value in Requisition Type is ‘INTERNAL’

The third parameter is called Supplier and is dependent on Requisition Type and would be enabled if the value of the Requisition Type is ‘PURCHASE’

Step 1: Preliminary Setup/Knowledge

Understanding on creation of concurrent programs and concurrent program parameters and value sets for concurrent program parameters is expected.

Concept:

We would use dependent value sets to enable / disable parameters. The idea is simple and straight forward. You can have a value set A” that drives a parameter. And another value set “B” that drives the second parameter. If I want to introduce a condition such that “B” does not get enabled till I enter a value in “A” I would have to make “B” as a dependent value set on “A”.

There are two ways to do this.

a. For table based value sets you need to put in a condition in the where clause that has a reference to the driving value set. i.e in our case if B is a table based value set it would need to reference A in the where clause in the following manner: and :$FLEX$.A = ‘<some value>’. This would ensure that the value set of B does not get initialized till the value set for A returns a value this in turn keeps the parameter for B disabled.

b. You can create a normal dependent value sets and define dependencies on other value sets.

So how would we approach our problem where we want to enable/disable values based on another parameter.

a. I would define a parameter that provides the driving value(this creates the dependency). This is driven by value set “A”

b. I would create a dummy parameter based on a value set that returns Y or Null. I would default the value in this dummy parameter such that it returns Y for the positive condition and null for the negative condition.

c. I would create the third parameter which is the dependent parameter and I would insert a clause such in it’s value set that it is dependent on the dummy parameter. What happens because of this is that the dummy parameter returns ‘Y’ when the condition matches thus enabling the value set associated with the dummy parameter and in turn enabling the value set for this dependent parameter. However if the condition fails the dummy parameter returns null thus disabling the value set and parameter for the dependent parameter

Step 2: Create value sets

Create value sets for all the parameters including the dummy parameters. In our case we would create the following value sets in this given order to take care of dependencies:

PO_SRS_REQUISITION_TYPE – Value set for the Requisition type

 

 

 

XX_CUSTOM_ENABLE_SUPPLIER - Value set to enable/disable the Supplier parameter.


Enter the possible values for the value set.


XX_CUSTOM_ENABLE_INV_ORG – Value set to control enabling/disabling the Inv org parameter

Enter the possible values for the value set.

XX_CUSTOM_INV_ORGANIZATIONS – Value set for the Inventory Organization parameter

XX_CUSTOM_VENDOR_LIST – Value set for Vendor parameter

Step 3: We would define the concurrent program itself. And add parameters to it with default values.

Create the concurrent program by the name XX_CUSTOM_TEST_CONC_PROGRAM

Define the concurrent program parameters:

  1. Creat the parameter for Requisition Type and enter the Value Set as : PO_SRS_REQUISITION_TYPE
  2. Create a dummy parameter Inv Org enable with value set XX_CUSTOM_ENABLE_INV_ORG. Set the default type to SQL Statement and set the default value to select decode(:$FLEX$. PO_SRS_REQUISITION_TYPE,'INTERNAL',’Y’,NULL) from dual. Set the displayed value to false by un checking the check box.
  3. Create a dummy parameter Supplier Enable with value set XX_CUSTOM_ENABLE_SUPPLIER. Set the default type to SQLStatement and set the default value to select decode(:$FLEX$. PO_SRS_REQUISITION_TYPE,'PURCHASE',’Y’,NULL) from dual. Set the displayed value to false by un checking the check box.
  4. Create a parameter for Inventory Organization and assign the value set XX_CUSTOM_INV_ORGANIZATIONS
  5. Create a parameter for Supplier and assign the value set XX_CUSTOM_ENABLE_SUPPLIER.

Add concurrent program to request group and run:

  1. Switch to the sysadmin responsibility and add your concurrent program to the All Reports request group for purchasing.
  2. Navigate to Purchasing Responsibility and run the concurrent program and see the results for yourself.

Video Demo
Click here to see video demo that explains the concepts for dynamically changing concurrent programs

Click here to see audio visual demo/example of how this can be done

Comments (31)add
...
written by Anil Passi , April 12, 2008
Hi Arun

Very well written article, well done

Cheers
Anil
report abuse
vote down
vote up
Votes: +0
...
written by prasadcp , April 19, 2008
Arun
Very well written article , i was thinking do we need the translatable independant value set , instead of that a simple character value set , will it not suffice the purpose ?

Thanks
Prasad CP
report abuse
vote down
vote up
Votes: +0
...
written by Arun Sista , April 20, 2008
Hi Prasad,

Thanks for pointing this out. I agree with u 100%. I should have done it that way. I thought I had mentioned this point on the article. I suppose I missed it.

Thanks,
Arun.
report abuse
vote down
vote up
Votes: +0
...
written by Shireen , April 21, 2008
Hi Arun,

Very nice article. I have one point , we can also check :$FLEX$. PO_SRS_REQUISITION_TYPE='INTERNAL' in the where clause of value set XX_CUSTOM_INV_ORGANIZATIONS and check $FLEX$. PO_SRS_REQUISITION_TYPE='PURCHASE' in the where clause of XX_CUSTOM_ENABLE_SUPPLIER, if we don't want to create dummy value sets.

Please correct me if I am wrong.

Thanks a lot for the article!
Regards,
Shireen
report abuse
vote down
vote up
Votes: +0
...
written by Shireen , April 21, 2008
Hi Arun,

In the above question, we have to check :$FLEX$. PARAMETER_NAME(for value set PO_SRS_REQUISITION_TYPE) instead of $FLEX$. PO_SRS_REQUISITION_TYPE.

Thanks and Regards,
Shireen
report abuse
vote down
vote up
Votes: +0
...
written by Arun Sista , April 21, 2008
Hi Shireen,

As for your first question.. the method you suggested would not work. Once you enter a value for requisition type both the value sets that are dependent on it would get enabled. Just that one of them would return no rows. My idea is to enable/disable the value set. You can try it out and you would see the difference.

Secondly the demo works with the samples I have given. I have never tried $FLEX.PARAMETER_NAME. Can you please share details of this with us.

Thanks,
Arun.

report abuse
vote down
vote up
Votes: +0
...
written by Shireen , April 21, 2008
Hi Arun,

Yes, I tried it as u suggested. Once I enter the requisition type both parameters gets enabled and one of them returns no rows. So, for enabling disabling value set your solution will work.

Thanks a lot for your suggestion.

Regards,
Shireen
report abuse
vote down
vote up
Votes: +0
Is it mandatory to use value sets of table type
written by wahed , April 22, 2008
Hi Arun,

Thanks for the wonderfull article.

Is it mandatory to use value sets of table type. Can't we achieve this without using them? I need to use date as a parameter in one of my programs. How can i do this?

Thanks in advance.

Wah.
report abuse
vote down
vote up
Votes: +0
...
written by Arun Sista , April 23, 2008
Hi Wah,

As I mentioned in the article you don't have to make your validation set a table validation set. You can make it a dependent value set. You can do this by setting the ValidationType to Dependent. In the edit information section select the driving value set name which would enable ur dependent value set.

Hope this helps.

Thanks,
Arun.
report abuse
vote down
vote up
Votes: +1
I CAN'T SEE THE COMPLETE VISUAL DEMO....IT IS NOT DOWNLOADED PROPERLY.
written by BINAYAK , April 28, 2008
HI ARUN,

I CAN'T SEE THE COMPLETE VISUAL DEMO....IT IS NOT DOWNLOADED PROPERLY.

SO, PL SUGGEST SOME WAY THAT I CAN SEE THE FULL DEMO.

I HAVE ALREADY IMPLEMENTED ALL THE VALUSET, BUT DUE TO SOME PROBLEM, I NEED TO SEE THE VISUAL DEMO.


THANKS

BIN
report abuse
vote down
vote up
Votes: +0
Re: I CAN'T SEE THE COMPLETE VISUAL DEMO....IT IS NOT DOWNLOADED PROPERLY.
written by Arun Sista , April 28, 2008
Hi Binayak,

I am not sure why you are unable to download the whole audio visual. Can you explain the problem to me.. I can then try helping u debug the problem.

Thanks,
Arun.
report abuse
vote down
vote up
Votes: +0
...
written by sajith_nambiar , April 30, 2008
Great wok!! The video file got stuck in the middle, anyway the things documented on the page was good. It is very useful for us, if the video file is downloadable.
report abuse
vote down
vote up
Votes: +0
...
written by Arun Sista , April 30, 2008
Hey guys sorry about that. I have uploaded the files again. Can you please try viewing the files.

Thanks,
Arun.
report abuse
vote down
vote up
Votes: +0
...
written by Vish Santhakumar , May 17, 2008
Very well written. Excellent article
report abuse
vote down
vote up
Votes: +0
Concurrent Program Parameter
written by Rahul0407 , May 21, 2008
Hi,

Lookin some solution for this type of requirement

I have 1 parmeter for my concurrent and at the run time I will get the alue of parameter through the form and after that i want user should not be able to make any hnage on that , means it should e disabled or greyed out.

Is this possblle if yes then can you guide me in doing that
report abuse
vote down
vote up
Votes: -1
Re: Concurrent Program Parameter
written by Arun Sista , May 21, 2008
Hi Rahul,

This should possible. What you would need to do is introduce a new dummy parameter ahead of the concurrent program parameter that you populate. Populate it with a value of NULL when you are invoking it from the FORM and value of CONCURRENT when you invoke it from the concurrent program(default value). Make the other parameter dependent on this dummy field. It should solve your problem.

Please do let me know the results/share the outcome.

Regards,
Arun.
report abuse
vote down
vote up
Votes: +0
...
written by ShineSS , June 04, 2008
Hi Arun,

Is it possible to delete am already created Valueset? If so, please mention how to do that.

Thanks in advance.
report abuse
vote down
vote up
Votes: +1
Interview
written by vanita , June 05, 2008
Hey can u help me with a few tips and important FAQs to face an interivew in GL and AP....also if you can give me some projects and resumes for reference, that would be great.

Thanks in advance.
report abuse
vote down
vote up
Votes: -2
Dynamic LOV's
written by hkona , June 13, 2008
Arun,
Thanks for the wonderful article.I need help with my business requirement.Instead of disabling Input parameters,I should pass the Input of one parameter to the next one.Based on the value entered in Project LOV,I need to display only those tasks that are related to that Project.Would appreciate any help in this regard.Thanks again.

Harsha.
report abuse
vote down
vote up
Votes: +0
...
written by Arun Sista , June 22, 2008
Hi Harsha,

This is used in enabling/disabling as well.. U need to use :$FLEX$. .. This can be accessed in table based validations.. Please refer to the screenshots above ...
report abuse
vote down
vote up
Votes: +0
CP's
written by Manpreet , June 29, 2008
Hi Arun,

Thats an amazing article being covered on concurrent programs.
Thanks, keep up the good work

Manpreet
report abuse
vote down
vote up
Votes: +0
Null parameter
written by Niamh , April 14, 2009
Your article is excellant - I do however have one question. I am trying to enable or disable a parameter based on the rule, that if a date is entered into the parameter reference by valueset XX_FROM_DATE then the XX_FROM_PERIODS is enabled.

However in my test paramter XX_ENABLE_PERIODS I have the following sql statement select decode(:$FLEX$.XX_FROM_DATE,NULL,'Y','N') from dual

If I enter a date into XX_FROM_DATE then XX_ENABLED_PERIODS is set to 'N'. However if I leave XX_FROM_DATE empty (it is a none required field and I need to leave it as such). The the select decode (or even NVL )statement does not work. It does not enter a 'Y' into the parameter referenced by XX_ENABLED_PERIODS . Do you know why the decode or NVL does not work in this circumstance?
report abuse
vote down
vote up
Votes: +1
Enabling a Date parameter
written by SS1234567 , May 18, 2009
Hi Arun,

I need to enable a date parameter based on the value of another parameter. How can I achieve this?

Thanks,
Sunil
report abuse
vote down
vote up
Votes: +0
...
written by KrishnaKishoreT , August 03, 2009
Hi Arun,

I have a requirement wherein the parameter that I need to enable/disable dynamically is not a field with an LOV. I have a 'justification' parameter and it needs to be enabled for request type 'CAR' and disabled for request type 'RTS'.

I need to enable or disable the 'Justification' parameter based on the Request Type selected by the user.

In addition, I need the 'justification' parameter as a mandatory parameter if the request type is 'CAR'.

Please let me know how this can be acheived.

Thanks,
Krishna
report abuse
vote down
vote up
Votes: +0
...
written by RajeshMV , February 24, 2010
Hi Arun
What if i want the parameter to be enabled by default and needs to get disabled if the top parameter is selected.
report abuse
vote down
vote up
Votes: +0
Urgent Help Needed!
written by Div , February 11, 2011
Hi Arun,
I have a requirement to enable or disable( greyed out) concurrent parameter. The user enters some value in Concurrent Parameter 1 (CP1) and tabs out, then the Concurrent Parameter 2 (CP2) should get disabled. The moment he deletes this value in CP1 and tabs out, then CP2 should be enabled again and vice versa like if the user enters value in CP2 and tabs out, CP1 should become disabled and when he deletes the value from CP2, CP1 should become enable back.

Thanks for your help Anil in advance!


report abuse
vote down
vote up
Votes: +1
Required/non required parameters
written by bobix , March 08, 2011
Hi Arun,

You told us how to enable/disable some parameters, but I would like to set some parameters as required or non-required depending of the value of another parameter.

For example: I have a filter-like LOV parameter with the values: "order number" and "order date". There are another 4 parameters: "order number low", "order number high", "order date low" and "order date high".

The required behaviour:
- if the filter like LOV has the value "order number" then the 2 order number parameters should be required, and the 2 order date parameters shoud be optional (not disabled).
- if the filter like LOV has the value "order date" then the 2 order date parameters should be required, and the 2 order number parameters shoud be optional (not disabled).

I would like to ask, if this is possible to realize?!

Thanks very much in advance!
report abuse
vote down
vote up
Votes: +1
ghd australia
written by ghd australia , August 29, 2011
If you have not yet tried pink GHD straightener, it's time to own one and feel the difference it can make to your personality. These are just brilliant and fabulous ghd straighteners pink. They are most iconic and can provide you with a new feeling and enhance confidence.
report abuse
vote down
vote up
Votes: +0
www.luhuanhuan.wordpress.com
written by o , September 01, 2011
smilies/tongue.gif smilies/tongue.gifHaha stupid me, I read the 3rd part first.
report abuse
vote down
vote up
Votes: +0
Required for Non table Parameters
written by Kamesh Akundi , November 21, 2011
Hi Arun,

My requirement is as follows: Based upon parameter A, Parameter B should enable. However, Parameter B is a free text. Please let me know how to handle in this scenario.

However, I followed the above one, but it didn't work.

Kamesh
report abuse
vote down
vote up
Votes: +2
One of the best Article on Value set
written by Deepak Padhy , December 01, 2011
Hi,

Thanks for sharing and explaining such a valuable article on value set. Looking forward for such kind of more videos.

Thanks
Deepak
report abuse
vote down
vote up
Votes: +0
Write comment
quote
bold
italicize
underline
strike
url
image
quote
quote
smile
wink
laugh
grin
angry
sad
shocked
cool
tongue
kiss
cry
smaller | bigger

security image
Write the displayed characters


busy
Last Updated ( Wednesday, 30 April 2008 06:24 )  

Search apps2fusion