Pages

Recently Viewed

Sunday, January 1, 2012

Concurrent Program Parameter Validation


Requirement – Input should be in specific format for one parameter. Let’s say we have one free text parameter (email) which must be ended with “@OLearning.com” .
It should not accept if email is not having @OLearning.com at end

How to Achieve -
Create one value set of validation type = Special 

Press Edit Information and than Select event = Validate
Write validation logic in Function section

FND PLSQL "DECLARE
lv_str varchar2(100) := :!VALUE;
lv_com varchar2(20);
lv_standard varchar2(100) :='@OLearning.com';
BEGIN
IF (lv_str IS NOT NULL) THEN
 Select substr(lv_str,instr(lv_str,'@'
,1),length(lv_str)) INTO
lv_com from dual;
       IF lv_com<>lv_standard  THEN
                 fnd_message.
set_name('XXXXX','@OLearning is Required');
           fnd_message.raise_error;
   END IF;
END IF;
END;"
                Go to concurrent program definition page
                Press parameter button
                Create parameter for email address and associate above created value set (OLearning_VS)
                Save the program

Validation –
Go to  respective responsibility
Run the concurrent program
Pass the email parameter = sandeep@gmail.com and tab out
               
Pass the email parameter = sandeep@OLearning.com   and tab out
               

1 comment: