Submit Request via SQL Developer [message #567520] |
Wed, 03 October 2012 02:01 |
skimmer333
Messages: 23 Registered: August 2010 Location: Adelaide, Australia
|
Junior Member |
|
|
Hi all,
I'm using the below code in SQL Developer, trying to submit a request:
Declare
vRequest_id NUMBER;
BEGIN
Fnd_Global.apps_initialize(9205,20639,200);
vrequest_id := FND_REQUEST.SUBMIT_REQUEST('SQLAP'
,'APXGDGDL'
,'Both'
,'03-OCT-2012');
COMMIT;
END;
However, when i check the fnd_concurent_request table, nothing is there.
I'm a bit confused, as I just used the following code in SQL Developer and it worked:
Declare
L_NUMBER number;
BEGIN
L_NUMBER := WF_ROLE_HIERARCHY.AddRelationship('UMX|XXR|GLFSA_RADG_BA','FND_RESP|SQLAP|XXR_GL_JNL_ADMIN|STANDARD');
END;
Is it due to the different types of packages im using? i.e. public/private? or is there an api i can use in SQL Developer to submit the request?
Cheers,
RH.
|
|
|
Re: Submit Request via SQL Developer [message #567522 is a reply to message #567520] |
Wed, 03 October 2012 02:08 |
John Watson
Messages: 8964 Registered: January 2010 Location: Global Village
|
Senior Member |
|
|
You need to check what fnd_request.submit_request returns. Did you get a request id number, or a zero?
And, by the way, the fourth parameter must be a date. You are giving it a string.
|
|
|
Re: Submit Request via SQL Developer [message #567636 is a reply to message #567522] |
Wed, 03 October 2012 19:16 |
skimmer333
Messages: 23 Registered: August 2010 Location: Adelaide, Australia
|
Junior Member |
|
|
Hi,
I've changed the code to that of below. However i am still not seeing a return number. I've opened the log window, but nothing is there.
Does the code need to be in a package? The code above (WF_ROLE_HIERARCHY) wasn't in a package, and ran successfully.
Cheers.
Declare
vRequest_id NUMBER;
BEGIN
Fnd_Global.apps_initialize(9250,20639,200);
vrequest_id := FND_REQUEST.SUBMIT_REQUEST('SQLAP'
,'APXGDGDL'
,'Distribution Set Listing'
,NULL
,FALSE
,'Both'
,'03-OCT-2012');
if vrequest_id> 0 then
dbms_output.put_line('Request submitted successfully');
else
dbms_output.put_line('Request submission failure');
end if;
end;
/
|
|
|
|
Re: Submit Request via SQL Developer [message #567638 is a reply to message #567637] |
Wed, 03 October 2012 19:44 |
skimmer333
Messages: 23 Registered: August 2010 Location: Adelaide, Australia
|
Junior Member |
|
|
Silly me forgot to add in the commit line...
...
So i added in the commit; line above the if statement.
I can see in the Script Output window: anonymous block completed
And all i see in the Log window(after i select the commit button): dev-apps~1*: Thu Oct 04 10:09:53 CST 2012: Commit successful
|
|
|
Re: Submit Request via SQL Developer [message #567652 is a reply to message #567638] |
Thu, 04 October 2012 00:21 |
John Watson
Messages: 8964 Registered: January 2010 Location: Global Village
|
Senior Member |
|
|
Are you sayng that you do not see the output of your dbms_output statements? Are you running it in SQL*Plus, with serveroutput on? If not, why not?
And you are not casting your dates properly. I've already told you that.
|
|
|
|
Re: Submit Request via SQL Developer [message #567656 is a reply to message #567653] |
Thu, 04 October 2012 01:16 |
John Watson
Messages: 8964 Registered: January 2010 Location: Global Village
|
Senior Member |
|
|
You do have SQL*Plus. As you are using EBS, you have several copies of SQL*Plus.
And you must format your dates. Passing a string literal to a date variable is wrong. Forms is nothing to do with it.
As you can't do as I suggest, I don't think I can assist further. Perhaps someone else can help.
|
|
|
Re: Submit Request via SQL Developer [message #567658 is a reply to message #567656] |
Thu, 04 October 2012 01:35 |
skimmer333
Messages: 23 Registered: August 2010 Location: Adelaide, Australia
|
Junior Member |
|
|
No, I don't have SQL*Plus. It is not available on this machine, nor do i have access to the servers to run it off the database server.
SQL Developer does not require a client to be installed.
I've change the script to submit a report that doesn't use a date parameter. I get the same result.
Also, the 3rd,4th and 5th parameters are optional.
|
|
|