Apr 16, 2013

Concurrent Processing APIs for PL/SQL Procedures and other Concurrent programs

Concurrent Processing APIs for PL/SQL Procedures and other Concurrent programs ::

§FND_CONCURRENT: Information on Submitted Requests
§FND_FILE: PL/SQL: File I/O
§FND_PROGRAM: Concurrent Program Loaders
§FND_SET: Request Set Creation
§FND_REQUEST: Concurrent Program Submission
§FND_REQUEST_INFO: Request Information
§FND_SUBMIT: Request Set Submission
§FND_PROGRAM: Concurrent Program Loaders
 
§Concurrent Processing APIs for PL/SQL Procedures
Calling any Concurrent programs from concurrent PL/SQL procedure.
function FND_REQUEST.SUBMIT_REQUEST
( application IN varchar2 default NULL,
program IN varchar2 default NULL,
description IN varchar2 default NULL,
start_time IN varchar2 default NULL,
sub_request IN boolean default FALSE
argument1,
argument2, ..., argument99,
argument100) return number;
Submits a concurrent request for processing by a concurrent manager.         If the request completes successfully, this function returns the concurrent request ID; otherwise, it returns 0.
  
§FND_REQUEST.SUBMIT_REQUEST
Arguments:
-Application:  Short name of the application associated with the concurrent request to be submitted.
-Application Program: Name of the concurrent program for  which the request should be submitted.
-Description : Description of the request that is displayed in the Concurrent Requests form (Optional.)
-Sub_request: Set to TRUE if the request is submitted from another request and should be treated as a sub–request. Starting with Release 11, this parameter can be used if  you are submitting requests from within a PL/SQL stored procedure concurrent program.
 
 
§Attention: FND_REQUEST must know information about the user and responsibility from which the request is submitted. Therefore, this function only works from concurrent programs or forms within Oracle Applications.                                        Use FND_client_info.setup_client_info procedure if testing from sql*Plus environment.
§
§Your code should retrieve and handle the error message generated if there is a submission problem (the concurrent request ID returned is 0).
§
  
§You must call FND_REQUEST.SET_MODE before calling FND_REQUEST.SUBMIT_REQUEST from a database trigger.
§
§If FND_REQUEST.SUBMIT_REQUEST fails from anywhere but a database trigger, database changes are rolled back up to the point of the function call.
§
§After a call to the FND_REQUEST.SUBMIT_REQUEST function, all setup parameters are reset to their default values.
 
 
§FND_CONCURRENT.SET_COMPLETION_STATUS (Server)
§
§Call SET_COMPLETION_STATUS from a concurrent program to set its self completion status. The function returns TRUE on success, otherwise FALSE.
function FND_CONCURRENT.SET_COMPLETION_STATUS(status IN varchar2, message IN varchar2) return boolean;
§The status to set the concurrent program to. Either NORMAL, WARNING, or ERROR.
  

§FND_REQUEST.SET_OPTIONS (Client or Server)
Optionally call before submitting a concurrent request to set request options. Returns TRUE on successful completion, and FALSE otherwise.
 
§FND_CLIENT_INFO.setup_client_info
(application_id in number,
-Responsibility_id in number,
-User_id in number,
-Security_group_id in number )
-By calling this program in sql*Plus or Reports with correct parameters, user can achieve concurrent program environment for testing. 
 
§FND_PROFILE.get_specific( profile_name varchar2,
User_id  in number,
Responsibility_id in number
Application_id in number,
 value  out varchar2,
Defined out boolean)
-Get profile value for a specific user, responsibility in an application
  
§request_id: The request ID of the request to wait on.
§
§max_wait : The maximum time in seconds to wait for the request’s completion.
§
§interval : Number of seconds to wait between checks (i.e., number of seconds to sleep.)
§
§
 
 
§FND_FILE: PL/SQL File I/O
The FND_FILE package contains procedures to write text to log    and output files. In Release 11i, these procedures are supported    in all types of concurrent programs.
FND_FILE.PUT_LINE
procedure FND_FILE.PUT_LINE
(which IN NUMBER,
buff IN VARCHAR2); 
 
ØUse this procedure to write a line of text to a file (followed by a new line character). You will use this utility most often.
Ø
fnd_file.put_line(FND_FILE.LOG,’Warning: Employee ’||
l_log_employee_name ) ;
 
 FND_GLOBAL::
§On the client side, most of the procedures in the FND_GLOBAL package are replaced by a user profile option with the same (or a similar) name. You should use FND_PROFILE routines in your forms instead. 
 
§FND_GLOBAL.USER_ID (Server)
function FND_GLOBAL.USER_ID
return number;
§Returns the user ID.
  

§FND_GLOBAL.APPS_INITIALIZE (Server)
procedure APPS_INITIALIZE(user_id in number,
resp_id in number,
resp_appl_id in number);
This procedure sets up global variables and profile values in a database session. Call this procedure to initialize the global security context for a database session.
You can use it for routines such as Java, PL/SQL, or other programs that are not integrated with either the Oracle Applications concurrent processing facility or Oracle Forms (both of which already do a similar initialization for a database session).
 
 
§You can also use this procedure to set up a database session for manually testing application  code using SQL*Plus.
§This routine should only be used when the session must be established outside of a normal form or concurrent program connection.
§Example
USER_ID : The USER_ID number
RESP_ID : The ID number of the responsibility
RESP_APPL_ID: The ID number of the application to which the responsibility belongs
fnd_global.APPS_INITIALIZE (1010, 20417, 201);
  


 
 
 

No comments:

OraApps Search

Custom Search

Search This Blog