Monday, 15 June 2020

Oracle Apps: How to create validation for a date parameter using a value set for Oracle Concurrent Program

One of my colleague was looking for a solution to restrict a date parameter on a concurrent program not to allow future dates.This post is to just show how to do that as it could help someone else as well.

Step 1. 
Create a Special Value set as below



Format Type     : Standard Date
Validation Type : Special
 Event                : Validate
 
FND PLSQL "
DECLARE
  v_date DATE:= :!VALUE;
BEGIN
  IF v_date > SYSDATE THEN
    FND_MESSAGE.SET_NAME('FND','FND_GENERIC_MESSAGE');
    FND_MESSAGE.SET_TOKEN('MESSAGE','Please choose current or past date.');
    FND_MESSAGE.RAISE_ERROR;
  END IF;
END;
"
 
Step 2.
Attach this value set to the Concurrent Program Parameter.



Now try to enter a future date parameter while submitting the concurrent program.






Feel free to point out if anything is wrong/missing in this post


8 comments: