Home » Applications » Oracle Fusion Apps & E-Business Suite » Concurrent Program Parameter Validation (Oracle Application R12 )
Concurrent Program Parameter Validation [message #517899] Fri, 29 July 2011 05:07 Go to next message
aiyaz_ma
Messages: 56
Registered: May 2009
Location: Hyderabad
Member

Hi All,

Oracle Apps R12

I have created a concurrent program for an XML report with 12 parameters in it. The user has to enter at least one parameter if he don't enter any parameter it should get an error message that " Please enter at least one parameter".

Please give me some help regarding this how to acheive this. I am breaking my head from last 2 days. Please give me some examples based on this.

Waiting for replies.....

Thanks and Regards
Aiyaz.
Re: Concurrent Program Parameter Validation [message #518024 is a reply to message #517899] Sun, 31 July 2011 13:00 Go to previous messageGo to next message
AlexAnd
Messages: 18
Registered: March 2010
Junior Member
try follow

Create a hidden parameter, p_flag.
Default type should be set as SQL statement and Default value will be
"SELECT 1 FROM DUAL WHERE (:$FLEX$.p_1:NULL IS NOT NULL or :$FLEX$.p_2:NULL IS NOT NULL)"

The required flag to be set as Yes and Display as No
Re: Concurrent Program Parameter Validation [message #518141 is a reply to message #518024] Mon, 01 August 2011 11:14 Go to previous messageGo to next message
aiyaz_ma
Messages: 56
Registered: May 2009
Location: Hyderabad
Member

Thanks Alex....


But i need to stop the user at the parameter form with a user custome message. Can you please help me in that.

Thanks in advance...

Regards,
Aiyaz
Re: Concurrent Program Parameter Validation [message #518146 is a reply to message #518141] Mon, 01 August 2011 12:11 Go to previous messageGo to next message
AlexAnd
Messages: 18
Registered: March 2010
Junior Member
try add Special value set

FND PLSQL "DECLARE
    l_par1 varchar2(100) := :$FLEX$.p_1; 
    l_par2 varchar2(100) := :$FLEX$.p_2;
BEGIN
    IF l_par1 IS NULL AND l_par12 IS NULL 
    THEN
        FND_MESSAGE.SET_NAME('FND','You must select p_1 or p_2');
        FND_MESSAGE.RAISE_ERROR;
    END IF;
END;"


any sample http://www.orafaq.com/forum/mv/msg/156652/515236#msg_515236
Re: Concurrent Program Parameter Validation [message #518149 is a reply to message #518146] Mon, 01 August 2011 12:53 Go to previous messageGo to next message
aiyaz_ma
Messages: 56
Registered: May 2009
Location: Hyderabad
Member

Can you please let know to which parameter i have to give the special value set.

I have 12 parameters with no mandatory feild.

Created 2 dummy parameters with no display. For Dummy 1 i have put the default as sql query. with a query SELECT 1 FROM DUAL WHERE (:$FLEX$.p_1:NULL IS NOT NULL or :$FLEX$.p_2:NULL IS NOT NULL)....

And in the dummy 2 i have created the second parameter with special value set. with the following code

FND PLSQL "DECLARE
l_par1 varchar2(100) := :$FLEX$.p_1;
l_par2 varchar2(100) := :$FLEX$.p_2;
BEGIN
IF l_par1 IS NULL AND l_par12 IS NULL
THEN
FND_MESSAGE.SET_NAME('FND','You must select p_1 or p_2');
FND_MESSAGE.RAISE_ERROR;
END IF;
END;"

Can you please explain with this example its not working for me.


Re: Concurrent Program Parameter Validation [message #518151 is a reply to message #518149] Mon, 01 August 2011 13:29 Go to previous messageGo to next message
vamsi kasina
Messages: 2112
Registered: October 2003
Location: Cincinnati, OH
Senior Member
Quote:
Create a hidden parameter, p_flag.
@aiyaz_ma, AlexAnd is asking you to create a NEW dummy parameter [13th].Quote:
I have 12 parameters with no mandatory feild.
l_par1 varchar2(100) := :$FLEX$.p_1;
l_par2 varchar2(100) := :$FLEX$.p_2;
You need to get all 12 parameter values inside the special value set.
And compare and give the error message.
You may use quotes ('') as mentioned in the above link.

@AlexAnd, I got the exact same idea. But you are first one to post. Wink

By
Vamsi
Re: Concurrent Program Parameter Validation [message #518166 is a reply to message #518151] Mon, 01 August 2011 22:27 Go to previous messageGo to next message
aiyaz_ma
Messages: 56
Registered: May 2009
Location: Hyderabad
Member

Thanks Vamsi...

As you said i have created a 13th parameter with a special value set with the following code :

FND PLSQL "DECLARE
l_par1 varchar2(100) := :$FLEX$.PARTY_UK_V;
l_par2 varchar2(100) := :$FLEX$.PARTY_LEGACY_NUM_V;
l_par3 varchar2(100) := :$FLEX$.PARTY_NAME_V;
l_par4 varchar2(100) := :$FLEX$.PARTY_TAX_ID_V;
l_par5 varchar2(100) := :$FLEX$.PARTY_ADDR_V;
l_par6 varchar2(100) := :$FLEX$.PARTY_ADDR_V;
l_par7 varchar2(100) := :$FLEX$.PARTY_ADDR_V;
l_par8 varchar2(100) := :$FLEX$.PARTY_ADDR_V;
l_par9 varchar2(100) := :$FLEX$.PARTY_CITY_V;
l_par10 varchar2(100) := :$FLEX$.PARTY_COUNTY_V;
l_par11 varchar2(100) := :$FLEX$.PARTY_STATE_V;
l_par12 varchar2(100) := :$FLEX$.PARTY_ROLE_V;
BEGIN
IF l_par1 IS NULL AND l_par2 IS NULL AND l_par3 IS NULL AND l_par4 IS NULL AND l_par5 IS NULL AND l_par6 IS NULL AND l_par7 IS NULL AND l_par8 IS NULL AND l_par9 IS NULL AND l_par10 IS NULL AND l_par11 IS NULL AND l_par12 IS NULL
THEN
FND_MESSAGE.SET_NAME('FND','You must Enter Atleast One Parameter');
FND_MESSAGE.RAISE_ERROR;
END IF;
END;"


with the Event as " VALIDATE ".

But when i run the request message is not populating at the parameter.

Please correct me if i am going wrong.

Regards,
Aiyaz
Re: Concurrent Program Parameter Validation [message #518272 is a reply to message #518166] Tue, 02 August 2011 13:11 Go to previous messageGo to next message
vamsi kasina
Messages: 2112
Registered: October 2003
Location: Cincinnati, OH
Senior Member
What exactly has happened when you don't enter a single parameter and click on OK in the parameter window?
Then clicking on Submit button?
What is the exact release version of R12?

By
Vamsi
Re: Concurrent Program Parameter Validation [message #518290 is a reply to message #518272] Tue, 02 August 2011 22:38 Go to previous messageGo to next message
aiyaz_ma
Messages: 56
Registered: May 2009
Location: Hyderabad
Member

Vamsi

I am using R12 12.1.2 release version .

when i don't enter a single parameter and click on OK in the parameter window. Its directly going to the parent window with out populating the message. and It also allows to submit the request also.

Please help me to figure it out what exactly the issue is with.


Thanks
Aiyaz
Re: Concurrent Program Parameter Validation [message #518322 is a reply to message #518290] Wed, 03 August 2011 02:55 Go to previous messageGo to next message
aiyaz_ma
Messages: 56
Registered: May 2009
Location: Hyderabad
Member

I forget to check this earlier...

But think this is the culprit. Please find the attached screen shot. which is invoking when i tried to save the parameters after attaching the special value set.

Hope this will get us where i am getting wrong.

Thanks
Aiyaz
  • Attachment: error.GIF
    (Size: 48.28KB, Downloaded 1615 times)
Re: Concurrent Program Parameter Validation [message #518898 is a reply to message #518322] Mon, 08 August 2011 06:01 Go to previous messageGo to next message
aiyaz_ma
Messages: 56
Registered: May 2009
Location: Hyderabad
Member

Any one here to help me out from this ?
Re: Concurrent Program Parameter Validation [message #521756 is a reply to message #518898] Thu, 01 September 2011 14:53 Go to previous message
vamsi kasina
Messages: 2112
Registered: October 2003
Location: Cincinnati, OH
Senior Member
The mentioned one in the attachment is just a warning message.
Whenever we use any Pair / Special value set, we will get that.
This is only allowed in Forms / CPs, NOT for OAF pages. You can ignore it.

One thing I can say that you always need to use :NULL when this parameter should be enabled.
So, it should be :$FLEX$.PARTY_UK_V:NULL
As it simply replace the value there, you need to have single quotes around it due to NULL values.
l_par1 varchar2(100) := ':$FLEX$.PARTY_UK_V:NULL'; 
l_par2 varchar2(100) := ':$FLEX$.PARTY_LEGACY_NUM_V:NULL';
Then only we will get the values as
l_par1 varchar2(100) := ''; 
l_par2 varchar2(100) := '';
Otherwise, it would be
l_par1 varchar2(100) := ; 
l_par2 varchar2(100) := ;
Anyway I also tried. But no clue why that is not working.
I doubt "Validate" event will work only when the user tabs out from the field.
As it is hidden (non-displayed), the validation might not be happening.
You may log an SR with Oracle Support to crosscheck.

By
Vamsi
Previous Topic: PO Personliaztion
Next Topic: BOM_BO_PUB.process_bom processes first bom and errors out every run
Goto Forum:
  


Current Time: Mon Dec 23 09:11:55 CST 2024