Home » Applications » Oracle Fusion Apps & E-Business Suite » Need help on PL/SQL Query while running CP (Oracle Apps R12)
Need help on PL/SQL Query while running CP [message #602019] Thu, 28 November 2013 23:16 Go to next message
Geeth
Messages: 1
Registered: November 2013
Junior Member
There are two procedures in my package.
One procedure is used to fetch the values and insert data into the specific tables then run the concurrent program while
another procedure is called whenever the main concurrent program is run.


in my first procedure 'abc' ,am using the below query:

l_request_id :=
fnd_request.
submit_request (application => 'XXXYZ',
program => 'XXITEMA',
description => NULL,
start_time => SYSDATE,
sub_request => TRUE,
argument1 => price_list_id,
argument2 => type_of_operation,
argument3 => user_id,
argument4 => email_id);


Similarly, In my second procedure 'xyz',I am using the below query:
<if --my condition--?>

fnd_global.
apps_initialize (user_id => x_user_id,
resp_id => x_resp_id,
resp_appl_id => x_resp_appl_id);
l_request_id :=
fnd_request.
submit_request (application => 'XXXYZ',
program => 'XXITEMB',
description => NULL,
start_time => SYSDATE,
sub_request => FALSE,
argument1 => header_id,
argument2 => type_of_operation,
argument3 => requested_by,
argument4 => email_id);

else DBMS_OUTPUT.put_line('Invalid header Id');
END IF;

po_request_id:=l_request_id;


According to my requirement i need to fetch the value of 'l_request_id' from the parent request id i.e
the one which is obtained from the procedure 'abc.'
But the concurrent programs are different in both the procedures.
So can anyone suggest on how to call the request_id from the first procedure 'abc' as soon as the concurrent program for the second procedure 'xyz' is run.

Thanks,
Geeth
Re: Need help on PL/SQL Query while running CP [message #605030 is a reply to message #602019] Tue, 07 January 2014 01:06 Go to previous message
sreekumar.nair.it
Messages: 16
Registered: January 2014
Junior Member
Hi,

My understanding about your requirement is as under:

Package
---------------------------------
Procedure abc
begin
submit main program;
end;
---------------------------------
Procedure xyz
begin
submit child program;
end;
---------------------------------
Procedure Main
begin
call abc;
call xyz;
end;
End Package;

If my understanding is correct then following workaround may resolve your purpose:

-----------------------------------
Workaround Package
---------------------------------
Procedure abc (p_request_id OUT NUMBER)
begin
submit main program;
end;
---------------------------------
Procedure xyz (p_parent_req_id IN NUMBER)
begin
submit child program;
po_req_id:=p_parent_req_id;
end;
---------------------------------
Procedure Main
l_parent_req_id NUMBER;
begin
call abc(l_parent_req_id);
call xyz(l_parent_req_id);
end;
End Package;

-----------------------------------

With above workaround package skeleton, the first procedure will return the parent request id using the OUT parameter
and the second procedure will use the same OUT parameter value as IN parameter. This way the second procedure will get
parent request id.

Please let me know if it solves your purpose. Please correct me if my understanding about the requirement is wrong.

Regards,
Sreee

[Updated on: Tue, 07 January 2014 01:31]

Report message to a moderator

Previous Topic: order type changed
Next Topic: How to restrict values displayed in a DFF using Form Personalization
Goto Forum:
  


Current Time: Sat Dec 20 22:33:55 CST 2014

Total time taken to generate the page: 0.08363 seconds