Login
Register

Home

Trainings

Fusion Blog

EBS Blog

Authors

CONTACT US

Oracle Scripts
  • Register

Oracle Gold Partners, our very popular training packages, training schedule is listed here
Designed by Five Star Rated Oracle Press Authors & Oracle ACE's.

webinar new

Search Courses

Calling a PL/SQL Concurrent Program in Real-Time

 

Lets say there is an Oracle Delivered concurrent program of type PL/SQL.

 

Your requirement is such that you wish to call that PL/SQL Executable [attached to concurrent program] directly from some other process, in real-time mode, in the same session as that of the parent Oracle session[forms or report or some other plsql ]. In order to call that pl/sql program within the same session, your challenge may be that the concurrent  program could be writing into log/output file using fnd_file API which you want to display to the user somehow.

 

To get a handle to the log/output of the API [which is executable of Conc Program], we need to do the following:-

1. Call fnd_global.initialize ensuring you pass it two parameters in bold below

declare

...your variables here

  v_session_id INTEGER := userenv('sessionid');

      v_trace      VARCHAR2(2000) := fnd_trace.get_trace_filename;

      n_conc_request_id INTEGER ;

begin

//optionally trace the API Call with bind variable values

  execute immediate 'alter session set events=''10046 trace name context forever, level 12''' ; 

    //the trace file details will be in variable v_trace     

 

    //Now call fnd_global.initialize ensuring you pass it two parameters in bold below

 

  fnd_global.initialize

    (

    session_id                     => v_session_id

                       ,user_id                          => 18594 //or pass the current fnd_global.user_id itself

                       ,resp_id                          => 4650126 //or pass the current fnd_global.resp_id itself

                       ,resp_appl_id            => 8405 //or pass the current fnd_global.resp_appl_id itself

                       ,security_group_id       => 0

                       ,site_id                           => NULL

                       ,login_id                     => 3115003

                       ,conc_login_id              => NULL

                       ,prog_appl_id           => NULL

                       ,conc_program_id       => 229233 //The program id of concurrent request

                   ,conc_request_id    => n_conc_request_id //From fnd_concurrent_requests_s.nextval

                      ,conc_priority_request    => NULL

   );

      //Lets assume the nextval from sequence is 14633154

//now call the API, i have arbitrarily typed in just any API

    ar_process_trx.place_hold( v_errbuf, v_retcode, v_trx_id ) ;

end ;

 

2. Run the SQL on fnd_temp_files, as below, using the fictional request_id generated from sequence [ in variable n_conc_request_id ]

3. In order to read those files, ensure that the directory [/usr/tmp in this case] is listed in v$parameter utl_file_dir




In this approach, no change is made to the Original concurrent program. Hence, if need be, users can continue to run the concurrent process as usual from SRS.




Trace file with bind variables

 

This approach also makes it easy to trace a concurrent program with bind variables. The location of the trace will can be determined by using API fnd_trace.get_trace_filename. The beauty of this API construct is that it takes care of different platforms like Linux, NT, HP, AIX etc , when constructing the name and full path of the trace file for Concurrent Program

 


Anil Passi

Comments   

0 #1 venkat 2007-07-14 11:10
Its really superb.
Quote
0 #2 Devendar 2007-10-16 06:58
That's really great...
thnx a lot....
Quote
+1 #3 I.K.Srinivas 2007-11-22 11:11
Hi all

I want to know the below database objects are used in which reports.How can I do that,
is there any command or script I can run and get the details.

Pleas e help me.
1) AP_INOVICES
2) AP_INVOICES_ALL
3) AP_INVOICE_DIST RIBUTIONS
4) AP_INVOICE_DIST RIBUTIONS_ALL
5 ) AP_INVOICE_PAYM ENTS
6) AP_INVOICE_LINE S
Thanks In advance
Quote
0 #4 Sandeep Arya 2008-02-05 05:02
Hi Anil ,
Need your help .Can u tell me while preparing the technical design (TS) whether we have to write the code first and then TS or directly preparing the TS then make the code.

and how we can make the our TS effectively .If you have any prepared TS pls send me for the guidance .

Thanks,
Sand eep
Quote
0 #5 Varaprasad 2008-05-19 08:34
hi anil,

Thanks a lot giving the help on oracle apps
Quote
0 #6 Varaprasad 2008-05-19 10:24
any one help me

how can we make the one parameter dependent on another parameter in discoverer
Quote
0 #7 K 2010-03-28 01:30
Hi Anil,

I have a requirement to generate 20 BI Publisher reports but other than using the concurrent programs. I planned to calling the java program behind the XDODTEXE executable directly from PL/SQL. I have two parameters for all the 20 reports. I do not know how to pass the parameters to JCP4XDODataEngi ne,which I belive is the java program. Can you help?

Thanks
K
Quote
0 #8 rajesh_poojary 2010-08-27 03:15
i wanted the details of the user who have not logon for last 90 days. but there are many data in logon column with data as NULL.so can you please tell me what this NULL significe in fnd_user table
Quote
0 #9 mmyswamy 2011-03-02 17:47
Hi Anil,
I want to knowing about UTL_FILE.FOPEN whether we have to write the code in PL/SQL programing
I wana What the purpose of UTL_FILE.FOPEN and i want exct answer

In Advance
Thanks,
MMYS
Quote
0 #10 mahendra 2015-06-23 22:59
HI Anil,
i am new from oracle apps.so please give me a small join query for below details
--COLUMNS--
(SALSE_ORDER_NUMBER,CUSTOMERNAME, STATUS, ORDERTYPE, ITEM, CUSTMERNUMBER, SALSEPERSION, CUSTMER_PO, DATEORDERED, REQUESTDATE, PRICE_LIST, SHIPTO, BILLTO, WAREHOUSE, TERM, CURRENCY, FREIGHTTERMS, FOB, PODATE, PONUMBER.POQTY, POPRICE, QTY, SOPRICE, SUPPLIER)--DATA--
(210007513 Ford Motor Company of Canada Ltd. BOOKED EWI E CA Sales Orders 70000003 05 1004 No Sales Credit B69RL132 47541 18/09/201 3 19/09/13 09:33 Ford US Price List B69-FORD TRUCK & MODULAR ENGINE PL B69-FORD TRUCK & MODULAR ENGINE PL B69-Ford Windsor Engine Plant 60 NET USD 19/09 /13 10:13 220007200 6 82 6 102.5 A DVANCED CUTTING TOOLS INC.
210007514 Ford Motor Company of Canada Ltd. BOOKED EWI E CA Sales Orders 70000015 84 1004 No Sales Credit B69RL132 47542 18/09/201 3 19/09/13 09:33 Ford US Price List B69-FORD TRUCK & MODULAR ENGINE PL B69-FORD TRUCK & MODULAR ENGINE PL B69-Ford Windsor Engine Plant 60 NET USD 19/09 /13 10:13 220007201 3 134 3 157.65 LONERO ENGINEERING CO INC.
210007515 Ford Motor Company of Canada Ltd. BOOKED EWI E CA Sales Orders 70000026 33 1004 No Sales Credit B69RL132 47544 18/09/201 3 19/09/13 09:33 Ford CA Price List B69-FORD TRUCK & MODULAR ENGINE PL B69-FORD TRUCK & MODULAR ENGINE PL B69-Ford Windsor Engine Plant 60 NET CAD 19/09 /13 10:28 220007202 40 4.7 40 5.53 SANDVIK COROMANT
210007516 Ford Motor Company of Canada Ltd. BOOKED EWI E CA Sales Orders 70000019 00 1004 No Sales Credit B69RL132 47547 18/09/201 3 19/09/13 09:33 Ford US Price List B69-FORD TRUCK & MODULAR ENGINE PL B69-FORD TRUCK & MODULAR ENGINE PL B69-Ford Windsor Engine Plant 60 NET USD 19/09 /13 10:29 220007203 50 160 50 200 SPECIAL DRILL & REAMER CO
210007517 Ford Motor Company of Canada Ltd. BOOKED EWI E CA Sales Orders 70000029 35 1004 No Sales Credit B69RL132 47549 18/09/201 3 19/09/13 09:33 Ford US Price List B69-FORD TRUCK & MODULAR ENGINE PL B69-FORD TRUCK & MODULAR ENGINE PL B69-Ford Windsor Engine Plant 60 NET USD 19/09 /13 10:29 220007204 5 11.99 5 14.9 9 SAINT GOBAIN)

Thanks&Regards:
Mahendra.
Quote
0 #11 AAhwgck 2021-06-25 09:45
http://clck.ru/Vhqmh http://clck.ru/VhquH http://clck.ru/Vhqve http://clck.ru/Vhquo http://clck.ru/Vhquw http://clck.ru/Vhquu http://clck.ru/Vhquq http://clck.ru/Vhqus http://clck.ru/VhqxL http://clck.ru/VhqxJ http://clck.ru/VhqxQ http://clck.ru/VhqxN http://clck.ru/VhqwK http://clck.ru/VhqxU http://clck.ru/VhqwT http://clck.ru/Vhqws http://clck.ru/VhqwF http://clck.ru/VhqxY http://clck.ru/VhqwR http://clck.ru/Vhqvv http://clck.ru/Vhqxc http://clck.ru/VhqwM http://clck.ru/Vhqwq http://clck.ru/VhqxS http://clck.ru/VhqwP http://clck.ru/VhqwH http://clck.ru/Vhqvt http://clck.ru/Vhqvz http://clck.ru/Vhqw7 http://clck.ru/VhqwD http://clck.ru/Vhqx4 http://clck.ru/Vhqwm http://clck.ru/Vhqx2 http://clck.ru/VhqxW http://clck.ru/Vhqw5 http://clck.ru/Vhqwh http://clck.ru/VhqxC http://clck.ru/Vhqw3 http://clck.ru/Vhqw9 http://clck.ru/VhqwB http://clck.ru/Vhqwu http://clck.ru/VhqwV http://clck.ru/Vhqx6 http://clck.ru/VhqwX http://clck.ru/Vhqwf http://clck.ru/Vhqwy http://clck.ru/VhqwZ http://clck.ru/Vhqwo http://clck.ru/Vhqwd http://clck.ru/Vhqwj http://clck.ru/VhqxE http://clck.ru/Vhqwb http://clck.ru/Vhqvx http://clck.ru/Vhqxa http://clck.ru/VhqxA http://clck.ru/Vhqww http://clck.ru/VhqxG http://clck.ru/Vhqx8 http://clck.ru/VhqzJ http://clck.ru/Vhqyy http://clck.ru/Vhqxe http://clck.ru/VhqyH http://clck.ru/Vhqxz http://clck.ru/Vhqys http://clck.ru/Vhqz2 http://clck.ru/Vhqy9 http://clck.ru/VhqyB http://clck.ru/Vhqyd http://clck.ru/Vhqz6 http://clck.ru/VhqyD http://clck.ru/Vhqyf http://clck.ru/Vhqy5 http://clck.ru/VhqyF http://clck.ru/VhqyM http://clck.ru/VhqyP http://clck.ru/VhqyX http://clck.ru/Vhqxx http://clck.ru/Vhqxg http://clck.ru/VhqyR http://clck.ru/Vhqxn http://clck.ru/Vhqxk http://clck.ru/Vhqxv http://clck.ru/Vhqxp http://clck.ru/VhqzE http://clck.ru/VhqyT http://clck.ru/Vhqy3 http://clck.ru/VhqzA http://clck.ru/Vhqxi http://clck.ru/Vhqyw http://clck.ru/VhqyK http://clck.ru/Vhqyq http://clck.ru/Vhqz4 http://clck.ru/VhqzC http://clck.ru/Vhqxt http://clck.ru/VhqyZ http://clck.ru/VhqyV http://clck.ru/Vhqy7 http://clck.ru/Vhqz8 http://clck.ru/Vhqyo http://clck.ru/Vhqxr http://clck.ru/Vhqyu http://clck.ru/Vhqyb http://clck.ru/Vhqyh http://clck.ru/VhqzG http://clck.ru/Vhqyj http://clck.ru/Vhqym http://clck.ru/VhqhR http://clck.ru/Vhqhq http://clck.ru/Vhqgt http://clck.ru/Vhqgz http://clck.ru/Vhqhh http://clck.ru/VhqgJ http://clck.ru/Vhqhj http://clck.ru/Vhqgv http://clck.ru/VhqhD http://clck.ru/Vhqhf http://clck.ru/Vhqhy http://clck.ru/Vhqgi http://clck.ru/VhqgQ http://clck.ru/VhqhX http://clck.ru/VhqgU http://clck.ru/Vhqge
rwtxdzcvcxbniye bkg
Quote
0 #12 bandarqq depo pulsa 2021-07-26 03:06
I've read several excellent stuff here. Definitely worth bookmarking for revisiting.
I surprise how so much effort you put to create any such wonderful informative site.
Quote

Add comment


Security code
Refresh

Search Trainings

Fully verifiable testimonials

Apps2Fusion - Event List

<<  Apr 2024  >>
 Mon  Tue  Wed  Thu  Fri  Sat  Sun 
  1  2  3  4  5  6  7
  8  91011121314
15161718192021
22232425262728
2930     

Enquire For Training

Fusion Training Packages

Get Email Updates


Powered by Google FeedBurner