Search This Blog

Thursday, May 29, 2008

Enable/Disable Concurrent program parameter based on Other Parameter

Based on a request, here is the details on how parameter can be enabled/disabled based another parameter value.
Below is the requirement
There are 2 valuesets parameter. If for parameter 1 user selects Yes then the other paramter should be enabled whereas if No is selected then the parameter should remain disabled. This can be achieved by using a hidden parameter as explained below.

Step1: Need 3 value sets for 3 parameter.
Value set1 = BOM_SRS_YES_NO (Oracle Defined)
Value Set2 = AMS_SRS_CHAR1 (Oracle Defined)
Value Set3 = SV_DEPENDENT_VS (User Defined)




Step2: Create Concurrent program as displayed in the screenshot below
Parameter1: Main Parameter

Parameter2: Hidden PArameter

Parameter3: Dependent Parameter

Step3: Assign concurrent program to a request group and test your program.

39 Comments:

Lakki Reddy Sreehari Reddy said...

Hi Suresh,
My requirment is, I am doing PO Report.Here i am passing 2 parameter.one is "PO Status" and another parameter name is "Text".

If i select PO satatus as "APPROVE", second paramert (Text)disabled.

If i select PO satatus as "IN PROCESS", second paramert (Parameter name is TEXT) is enabled and user will pass some free tect.

How i achieve this one.

Thank U,
Sreehari.

Suresh Vaishya said...

The example I have listed is very similar to what you need. Replace valueset for parameter 1 with the value set you are using to list approve and unapprove. The defualt sql statement used in parameter 2 also needs to be modified accordingly.
Let me know if you still have issue or have not understood on how to achieve this.

Lakki Reddy Sreehari Reddy said...

Hi Suresh,

I tried this.But i am not able to achieve this for APPROVE and IN PROCESS values.

Please tell me how to do this one.

Suresh Vaishya said...

Let me know how are you trying to achieve this. Give me the steps and I will try to help you out.

Vineet Parolia said...

Hi Suresh,

I am working on a older version of apps, 11.0.3, but I do have similar requirement. I want to enable/disable more than one parameters based on another parameter. Lets say I want to disable two parameters(From Year and To Year) based on a flag value as Y or N. Only one parameter(To Year) is being disabled, not the From Year.

Can you please help me in resolving this issue.

Thanks,
Vineet

Suresh Vaishya said...

If you are disabling a parameter using the concept of hidden parameter as explained in the post then same thing should be applied for both To and From year parameter and they should enable or disable together.

LEt me know if you still have any issues.

Vineet Parolia said...

Hi Suresh,

Thank you for your response. I have exactly done the same steps for the hidden parameter for disabling two parameters. Same condition is there against the value set for both the To and From year. Surprisingly, it is working for the To and not the From Year parameter.
Please tell me if there is any other way out.

Thanks,
Vineet

Unknown said...

it is working fine for me.
my requirement is if parameter 1 is "YES" or "ALL". the parameter 2 should go inactive.

if parameter 1 is "NO". the parameter 2 should come active and needs to give the LOV.

the concepts which you provided was helped alot.

thanks
keep posting

Suresh Vaishya said...

Glad to hear that the posts are helping.

Suresh

Anil Kuppa said...

Hi Suresh,
I have a similar requirement as posted in this blog. But I am unable to achieve this. The dependent parameter is not getting disabled but when I press Ctrl+L on that parameter it says "No list of Values found"

When the parameter should be enabled, it shows the list of parameters.

Please help

Anil Kuppa said...

hi!!
I achieved my requirement.
You need to add one important thing:
Only if you have null then it is disabled or else it doesn't get disabled.

raju said...

hi suresh
i have one requirement like the parameter1 value is incremental then parameter2(number) should enable and parameter3 should disable
if the parameter1 value is fulload then parameter2 should disable and parameter3 enable...

pls help me to get solution form this..

thanks
uma

Suresh Vaishya said...

Raju,
You can achieve your requirement by having one more dummy paramter.
Imagine the first parameter is the one which selects fullload or incremental, second parameter is a dummy parameter which stores incremental if that is selected. Third parameters value set will have $FLEX$ on the second parameters value set. Forth parameter will default to fullload if that is selected. fifth paramter will have a $FLEX$ value set on the forth parameter value set. Please let me know if you still have any questions or any problems.
Thanks,
Suresh

Unknown said...

Dear Suresh,

i have four parameters, like

emp name low
emp name high
emp no low
emp no high,

all the parameters are LOV's

my requirement is,
if i first enter the value in emp name low or high, then emp no low and emp no high will get disabled

or

if i enter the value in emp no parameters first then emp name parameters will get disabled.

how can i achieve this?

plz help me on this issue.. its urgent

Thanks and Regards,
Venkat

Chandra said...

Suresh,
This is nice article.
One Request..
In the screenshots, we can't see comple SQL statements. When ever there is such issues, please post the SQL statemnts separately, below the screenshots.

Thanks,

Suresh Vaishya said...

Thanks. Will remember and try to do that going forward.

Unknown said...

Hi Suresh, I have a requirement wherein a date parameter needs to be enables/disabled based on a another parameter's value. I will need to create a value set which is a table validation type value set for the date param, but what should i say in the table and column inputs of value set? There really is no LOV per se for the date param.
Need help urgently!
Sheena

Suresh Vaishya said...

Sheena,
Please refer to my post http://sureshvaishya.blogspot.com/search?q=date+lov where in I have a query to create date LOV. Create a view using this query and then a value set using this view. This value set can then be referenced by another table value set using :$FLEX$ to create dependency.
Hope this helps and works out for you.

Suresh

Anonymous said...

Thanks Suresh, That was very helpful.

Sheena

Krishna T said...

Hi Suresh,

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

Suresh Vaishya said...

Krishna,
I am not sure if you can achieve such requirement on None type of value set. Value set either have to be of type Table, Dependent or special.

Suresh

Anonymous said...

Hi Suresh,
This is a great post man and helps a lot.But can you please see to my following parameters and please advise a solution for that.

Take the following example :

Parameter 1 : Vendor Name
Parameter 2 : Preference
Parameter 3 : Email Address
Parameter 4 : FTP Address


The requirement is :

1. Enter the Vendor Name in Parameter1

2. Parameter2 will get populated automatically depending upon the preference for this Vendor in DFF and will be updatable.

3. If the value of the Preference parameter is Email or Both then this parameter will be enabled otherwise this will be disabled.

4. If the value of the Preference parameter is FTP or Both then this parameter will be enabled otherwise this will be disabled.


The problem is :

1. The value set on Parameter3 i.e. Email Address and Parameter i.e. FTP Address are of Independent Type and not of Table Type as we require free text in them and can't put an LOV on them.

2. All the solutions I see require table type value set on the parameters that needs to be enabled or disabled.( In our case Parameter3 & Parameter4 ).

Anonymous said...

Hi Suresh,

I have a liitle different requiremet. There are two date parameters associated with one concurrent progran - From Date & To Date. We want to make Both date fields disabled/greyed out. One condition is that both these parameters contain default values.
The problem i am facing is if i make these two date fields diabled, i'm not able to display default date values in these.

Can you please help me in this.

Thanks
SG

Sweetness79 said...

Suresh,
I have a requirement to limited the values of the second paramenter based on what is entered in the first parameter.
Parameter 1 - Date List of Values(using mtl_material_transations transaction_date)
Parameter 2 - Transaction Source
(using mtl_material_transactions transaction_source_name)
How can it get the values of Parameter 2 to display based on the date entered in Parameter 1.

shakya sen said...

Hi,

The example given above is really good. But when I try to use the same, it gives me the error -

APP-FND-00798: Invalid reference AMS_SRS_CHAR1 in value set attached to segment Item Status

Please check the WHERE clauses of your table validated value sets.

Can anyone please help? This is really very urgent.

Thanks in advance for any help.

Regards,
Shakya.

Sushant said...

Hi Suresh,
I have similar requirement, please help me out.
I have 2 parameter
1. Mode
2. Submission id

Parameter 1 'Mode' has 3 values
'Draft', 'Final','Re-ectract'
if i pass value Draft and Final then second parameter Submission id should be disable, only when i pass Mode value as 'Re-extract' then only Submission id parameter should enable.

Please give your important comments.

Regards
Sushant

Anonymous said...

Hi Suresh/everybody
I need to create two parameters
let's take A and B as a parameters
If user enters value in A then B should be disabled
If user enters the value in B then A should be disabled

Please provide it quickly Need to implement urgently.

ex:- suppose there are two parameters vendor_name and vendor_site_code and these two should be mandatory but there is a chance user may know only vendor_name or vendor_site_code in that case if he enters vendor_name in the mandatory field then vendor_site_code should be disabled even though it is mandatory parameter.If he selects vendor_site_code then vendor_name should be disabled.

Note:-these are not table value sets

Thanks

Anonymous said...

Hello,
I have a requirement where i have to enable/disable concurrent prg. parameters based on each other..Lets say, I have 2 concurrent parameters, one is: A and another is: B

both are free text parameters...

If User enters something in A, then B should be disabled.
If User enters something in B, then A should be disabled.

The idea is user can pass either of one parameters but not two. Can you pls provide some solution/info.

Thanks

Suresh Vaishya said...

This can be achieved by use of 2 hidden parameters.
Create a parameter that will accept the input vendor_name or vendor_site_code flag.
If user enters vendor_name, then hidden parameter1 will have a value and vendor name will be enabled.
If user enter vendor_site_code, then hidden paramter2 will have a value and vendor_site_code will be enabled.
So in all there will be 5 parameters as follows
1) vendor_name or code flag
2) enable vendor -- hidden
3) enable vendor_site_code -- hidden
4) vendor_name -- has to be a table value set
5) vendor_site_code -- has to be a table value set

Let me know if any confusion.
Regards,
Suresh

Anonymous said...

Thanks very much for your reply but could you please elaborate it because got some confusion how to do it.

Anonymous said...

Sorry Suresh,
I got the requirement a bit wrong here
Two Parameters should be mandatory but when the user select one then other should become optional and vice versa
Please give me the answer for this
If possible with out using the value sets

sap erp training said...

I have a requirement where i have to enable/disable concurrent prg. parameters based on each other..Lets say, I have 2 concurrent parameters, one is: A and another is: B

Anonymous said...

Hi,

I have requirement which will have 4 parameters.

If the first one is entered which is based on an LOV then all 3 three is non enterable

if 1st is not enetered then the 2 and 3rd are mandatory and they will also default to 'NO' and are updatable to 'YES'

and the 4th parameter is mandatory only if 3rd parameter is 'NO' else it will default to some other value.

relatively new to all this. Please help

Sathish said...

Hi...
Can you please help me to get this requirement.
i have two parameters like Project Number and Project Name.
If i enter project number in parameter1 corresponding project name should be populated automatically in the parameter2 or
if i enter project name in parameter2 corresponding project number should be populated in parameter1 that is project number.

Thanks in advance...

Ayan said...

Hi Suresh,
Can you please give example of dependent type and special type also. It will also help a lot.
Thanks.

....it's Samir said...
This comment has been removed by the author.
....it's Samir said...

Nice..quite a helping note for the freshers

Unknown said...

Hi Suresh,

I have a requirement where I have two parameters A and B which are table validated value sets. I want either one of the parameters to be mandatory. The user can populate both if he desires to but he cannot submit the request without passing any one parameter. How to achieve this.

Unknown said...

I want to create a concurrent program with 3 optional parameters.
If nothing is entered then the output should generate. If any one of the parameter is entered then the other two parameters should be mandatory.If i try to submit the program by entering any one or two parameter it should report an error.

Copyright (c) All rights reserved. Presented by Suresh Vaishya