0% found this document useful (0 votes)
134 views5 pages

Special Value Set Restrict Date To Field

This document contains PL/SQL code to validate date input parameters. It first checks if the date input is more than 3 months from the current date, and raises an error if so. It then checks if the date is greater than the current sysdate, and raises an error if that's the case as well. The code is validating that any date parameters are within 3 months of the current date and less than the current date.

Uploaded by

Surendra Babu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
134 views5 pages

Special Value Set Restrict Date To Field

This document contains PL/SQL code to validate date input parameters. It first checks if the date input is more than 3 months from the current date, and raises an error if so. It then checks if the date is greater than the current sysdate, and raises an error if that's the case as well. The code is validating that any date parameters are within 3 months of the current date and less than the current date.

Uploaded by

Surendra Babu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 5

SELECTfnd_date.

date_to_chardate(TO_DATE(ADD_MONTHS(LAST_DAY(TRUNC(SYSDATE)),
2)+1,'DDMMRRRR'))FROMdual
FND PLSQL " DECLARE

l_count NUMBER := 0;
l_value date := :!value ;

BEGIN

SELECT trunc(l_value - to_date(':$FLEX$.FND_STANDARD_DATE','YYYY/MM/DD HH24:MI:SS'))

INTO l_count

FROM dual;

IF l_count > 92 THEN

fnd_message.set_name( 'FND', 'FND_GENERIC_MESSAGE') ;

fnd_message.set_token( 'MESSAGE', 'You can run report max for 3 months period. Please change from
date and to date.' );

fnd_message.raise_error ;

END IF;

END;"
FND PLSQL " DECLARE
l_date DATE := :!value;
BEGIN
IF l_date > SYSDATE
THEN
fnd_message.set_name( 'FND', 'FND_GENERIC_MESSAGE') ;
fnd_message.set_token( 'MESSAGE', 'Date should be sysdate or less than sysdate.' );
fnd_message.raise_error ;
END IF;
END;"

You might also like