Home » Applications » Oracle Fusion Apps & E-Business Suite » Suggestions to resolve issue reg scheduling a pl/sql program
Suggestions to resolve issue reg scheduling a pl/sql program [message #473315] Fri, 27 August 2010 06:26 Go to next message
sreedevi_83
Messages: 43
Registered: October 2005
Location: India
Member
Hi,

My requirement is to schedule a concurrent program which has a parameter
whose default value is being obtained by a sql statement.
When I schedule this program, the default value is correctly derived by
executing the sql statement only during my initial run.
But for my further runs of scheduled program, the sql statement is not
re-executing, instead the value obtained during my initial run is being
copied.

Any suggestions to resolve this issue please?

Thanks,
Sreedevi.
Re: Suggestions to resolve issue reg scheduling a pl/sql program [message #473319 is a reply to message #473315] Fri, 27 August 2010 06:43 Go to previous messageGo to next message
cookiemonster
Messages: 13920
Registered: September 2008
Location: Rainy Manchester
Senior Member
Fix your code?

Without knowing how the SQL statement is actually called we have no way of knowing what the problem is.
Re: Suggestions to resolve issue reg scheduling a pl/sql program [message #473320 is a reply to message #473315] Fri, 27 August 2010 06:45 Go to previous messageGo to next message
Alien
Messages: 292
Registered: June 1999
Senior Member
Hi,

the topic should be in 'Oracle Fusion Apps & E-Business Suite'.

You can either put the select inside the concurrent if it is a custom program. Or you have to write a script that will get the parameter value for you, and then calls fnd_request.submit_request to start the original program.

Regards,

Arian
Re: Suggestions to resolve issue reg scheduling a pl/sql program [message #473324 is a reply to message #473320] Fri, 27 August 2010 06:52 Go to previous messageGo to next message
sreedevi_83
Messages: 43
Registered: October 2005
Location: India
Member
Thanks for your suggestions..
Okay you mean to say we can write a wrapper program..like this below.. I tried this too.. but here in our schema, where I am writing this procedure, I am not having access to fnd_request .. it gives me error saying that fnd_request is not defined.. so this idea didnt work out for me Sad

create or replace procedure mispa_rundays (errbuf out varchar2, retcode out number) as
n_request_id number:=0;
n_rundays number:=0;
begin
SELECT ceil(sysdate -MIN(last_run_date) + 2) into n_rundays
FROM mispa.mispa_extract_control
WHERE lob = 'ConsSuppEdu';
n_request_id:= fnd_request.submit_request('CUSTPA','MISPA_GSI_TYPES_INCR', NULL, NULL,FALSE,'Y',n_rundays, 'Y', 'ConsSuppEdu');
end;
/

Re: Suggestions to resolve issue reg scheduling a pl/sql program [message #473329 is a reply to message #473324] Fri, 27 August 2010 07:02 Go to previous messageGo to next message
Alien
Messages: 292
Registered: June 1999
Senior Member
Hi,

but when you run it as a concurrent program, it should run under apps, so fnd_request will be available there.

Anyway, it looks like you're calling a custom program. So why not put select inside the program itself?

Regards,

Arian
Re: Suggestions to resolve issue reg scheduling a pl/sql program [message #473330 is a reply to message #473320] Fri, 27 August 2010 07:02 Go to previous messageGo to next message
Its_me_ved
Messages: 979
Registered: October 2009
Location: India
Senior Member
have a look @ dbms_scheduler/dbms_job or use cron job (unix)

Regards
Ved
Re: Suggestions to resolve issue reg scheduling a pl/sql program [message #473331 is a reply to message #473329] Fri, 27 August 2010 07:04 Go to previous messageGo to next message
sreedevi_83
Messages: 43
Registered: October 2005
Location: India
Member
I am giving grant to execute this procedure in apps by using grant command in my schema..
Ya we can include it in our program itself as you said, but our idea is not to touch the code and try to achieve it without any patching..
Re: Suggestions to resolve issue reg scheduling a pl/sql program [message #473334 is a reply to message #473331] Fri, 27 August 2010 07:21 Go to previous message
Alien
Messages: 292
Registered: June 1999
Senior Member
Hi,

so you put the code in a custom schema? You realize that is against the advice given by Oracle? The best thing to do is put custom packages and procedures in the APPS schema with names starting with XX.
Otherwise, I can only advise you to grant enough privileges to the custom schema to be able to run FND_REQUEST.

Regards,

Arian
Previous Topic: Inserting New Template
Next Topic: How to disable a package..
Goto Forum:
  


Current Time: Thu Apr 25 04:23:16 CDT 2024