Thursday, April 24, 2008

Special Validation type Valuesets

How do you validate the parameter value of a concurrent program submitted through SRS window?

This is one of the recent requirement i come across..after some research i came to know it can be done using special valueset.

1.create a valueset of specail validation type

2.create a validate Event.you can write the PLSQL COde to validate

FND PLSQL "declare
l_email VARCHAR2(2000) := :!VALUE;
BEGIN
IF NVL(UPPER(substr(l_email,-9,9)),'INVALID')<>'GMAIL.COM' THEN
fnd_message.set_name('FND','INVALID_EMAIL');
fnd_message.raise_error;
end if;
end;"

3.attach it to the parameter in ..you will get a warning while saving the program ..ignore it..


As far i checked it is validation only when you enter...

THis is another sample available in one of the forums..but didn't work for me..

FND PLSQL "declare
l_payroll VARCHAR2(20) := ':$FLEX$.VALSET_TST5';
l_input DATE := :!VALUE;
BEGIN
if l_payroll is null and l_input is not null then
fnd_message.set_name('XXPAY','ONLY_ENTER_DATE_WITH_PAYROLL');
fnd_message.raise_error;
end if;
end;"

Jus try to experiment around..this might meet your requirement....

6 comments:

Shivakumar K said...

HI Murthy,
I have used above code ,but it's not working for me.

Following is the code used :

FND PLSQL "declare
l_month VARCHAR2(2000) := :!VALUE;
BEGIN
IF l_month is null THEN
fnd_message.set_name('FND','INVALID Value');
fnd_message.raise_error;
end if;
end;"

Pls let me know if any thing wrong with this.

Regards,
Shivakumar K

Unknown said...
This comment has been removed by the author.
Unknown said...
This comment has been removed by the author.
Unknown said...
This comment has been removed by the author.
Unknown said...
This comment has been removed by the author.
Unknown said...


Regards
Sridevi Koduru (Senior Oracle Apps Trainer Oracleappstechnical.com)
LinkedIn profile - https://in.linkedin.com/in/sridevi-koduru-9b876a8b
Please Contact for One to One Online Training on Oracle Apps Technical, Financials, SCM, SQL, PL/SQL, D2K at sridevikoduru@oracleappstechnical.com | +91 - 9581017828.