Connecting Tech Pros Worldwide Forums | Help | Site Map

submit request with parameters

Familiar Sight
 
Join Date: Jun 2007
Posts: 151
#1: Apr 27 '09
Hi


I have a procedure that i need to schedule to run. I created a concurrent program for that. But the procedure has four parameters. I need to call this concurrent program from one more procedure where the values are retrieved.

Expand|Select|Wrap|Line Numbers
  1. create or replace procedure cbtt_update(fromname IN Varchar2, sender IN varchar2, begindate IN date, enddate IN varchar2)
  2. is
  3. begin
  4. ..............
  5.  
  6. Business logic
  7. ...........
  8.  
  9. end cbtt_update
I created a concurrent program cbttupdate for the above code. Now i have one more procedure which calls this concurrent program and also the parent procedure for getting the parameter values.

Expand|Select|Wrap|Line Numbers
  1. create or replace procedure cbtt_getvalues()
  2. is
  3. fromname varchar2(100);
  4. sender varchar2(100);
  5. begindate date;
  6. enddate date;
  7. conreqid number :=0;
  8. begin
  9.  
  10. select creator_id,selector,begin_date,end_date into fromname,sender,begindate,enddate from table where..................
  11.  
  12. concreqid :=  fnd_request.submit_request ('FND',cbttupdate,'',SYSDATE,FALSE,CHR (0));
  13.  
  14. end cbtt_getvalues;
Now the above request wil just cal the procedure. Where should i add the parameters. Is this the right way to call.

concreqid := fnd_request.submit_request ('FND',cbttupdate,'',SYSDATE,FALSE,CHR (0),fromname,sender,begindate,enddate);

vamsi

debasisdas's Avatar
Moderator
 
Join Date: Dec 2006
Location: Bangalore ,India
Posts: 7,514
#2: Apr 27 '09

re: submit request with parameters


If you want to schedule it then use DBMS_JOB for the purpose.
Familiar Sight
 
Join Date: Jun 2007
Posts: 151
#3: Apr 28 '09

re: submit request with parameters


Thanks Debasisdas,

DBMS_JOB worked for me.

thanks alot

vamsi
Familiar Sight
 
Join Date: Jun 2007
Posts: 151
#4: Apr 28 '09

re: submit request with parameters


hi debasisdas

suddenly when i changd scheduled one more procedure i get this error

PLS-00222: no function with the name cbtt_reminder exists in this scope. The procedure is compiled.]


vamsi
Familiar Sight
 
Join Date: Jun 2007
Posts: 151
#5: Apr 28 '09

re: submit request with parameters


This is my code:

Quote:
dbms_job.submit(job => jobid, what =>cbtt_reminder(fromname,toname,begindate),next_da te => begin_date);
I am calling this in my first procedure.

vamsi
Reply