You are on page 1of 26

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.

<!--[if !supportLists]-->a. <!--[endif]-->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.

<!--[if !supportLists]-->b. <!--[endif]-->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.

<!--[if !supportLists]-->a. <!--[endif]-->I would define a parameter that provides the driving
value(this creates the dependency). This is driven by value set “A”

<!--[if !supportLists]-->b. <!--[endif]-->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.

<!--[if !supportLists]-->c. <!--[endif]-->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.

<!--[if !vml]-->
<!--[endif]-->

Enter the possible values for the value set.


<!--[if !vml]--><!--[endif]-->

<!--[if !vml]--> <!--[if !vml]-->


<!--[endif]--><!--[endif]-->

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


parameter
<!--[if !vml]-->
<!--[endif]-->

Enter the possible values for the value set.


<!--[if !vml]-->
<!--[endif]-->

XX_CUSTOM_INV_ORGANIZATIONS – Value set for the Inventory Organization parameter


<!--[if !vml]-->
<!--[endif]-->

XX_CUSTOM_VENDOR_LIST – Value set for Vendor parameter


<!--[if !vml]-->
<!--[endif]-->
<!--[if !vml]-->
<!--[endif]-->
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

Set as favorite
Bookmark
Email This
Hits: 2872

Comments (21)
Subscribe to this comment's feed
...
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: +0
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: +0
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

Write comment

You might also like