How to restrict To date parameter, based on From date parameter ? [message #450777] |
Fri, 09 April 2010 03:02 |
chandramatta
Messages: 15 Registered: January 2010
|
Junior Member |
|
|
Hi Guys,
I am looking for a feature to restrict my TO date parameter based on the From date parameter.
For ex:
If I enter From date as 08-APR-2010 then, my from date should be 08-MAY-2010. I.e from date + 30 days
- And I should not be able change my To date above 30 days. It should be always <= 30 days.
Is there a way to do this ?
Thanks,
Matt
|
|
|
|
|
|
|
|
|
Re: List Of Values & Value Set [message #515223 is a reply to message #514874] |
Fri, 08 July 2011 14:54 |
|
vamsi kasina
Messages: 2112 Registered: October 2003 Location: Cincinnati, OH
|
Senior Member |
|
|
Lets say if you are using the standard value set FND_STANDARD_DATE for the 'From Date'.
You can create the Special value set as follows and attach that to 'To Date'.
FND PLSQL "DECLARE
l_to_date DATE := fnd_date.displaydate_to_date(:!VALUE); -- Date in 'To Date' parameter.
l_from_date DATE := fnd_date.canonical_to_date(':$FLEX$.FND_STANDARD_DATE'); -- Date in 'From Date' parameter.
BEGIN
IF l_to_date IS NOT NULL
AND l_from_date IS NOT NULL
AND NOT l_to_date BETWEEN l_from_date AND l_from_date + 30 THEN
FND_MESSAGE.SET_NAME('FND','Select Value with in 30days');
-- Better to seed one message name instead of hard coding the text.
FND_MESSAGE.RAISE_ERROR;
END IF;
END;" Tested.
By
Vamsi
[Updated on: Fri, 08 July 2011 15:09] Report message to a moderator
|
|
|
|
|
|