Upload
julioyc
View
134
Download
3
Embed Size (px)
Citation preview
FND_FUNCTION.EXECUTE
Summary
procedure FND_FUNCTION.EXECUTE
(function_name IN varchar2,
open_flag IN varchar2 default 'Y',
session_flag IN varchar2 default 'SESSION',
other_params IN varchar2 default NULL,
activate IN varchar2 default 'ACTIVATE',
browser_target IN varchar2 default NULL);
Description
Executes the specified form function. Only executes functions that have a form attached. Displays a message to the
end user if the function is not accessible.
Make sure that the function is defined with Oracle Application Object Library. Also, the function must be somewhere
on the menu for the responsibility, though the form does not need to be accessible from the menu in the Navigator
(do this by adding the function to the menu but leaving the prompt blank). Otherwise, the user will get a message
saying that function is not available.
You should use FND_FUNCTION.EXECUTE instead of OPEN_FORM whenever you need to open a form
programatically. Using FND_FUNCTION.EXECUTE allows you to open forms without bypassing Oracle Applications
security, and takes care of finding the correct directory path for the form.
FND_FUNCTION.EXECUTE is similar to APP_NAVIGATE.EXECUTE, except that APP_NAVIGATE.EXECUTE allows
a form to be restarted if it is invoked a second time.
APP_NAVIGATE.EXECUTE and FND_FUNCTION.EXECUTE store the position and size of the current (source)
window in the following global variables so that the target form being opened can access them:
global.fnd_launch_win_x_pos
global.fnd_launch_win_y_pos
global.fnd_launch_win_width
global.fnd_launch_win_height
The intended usage is so that the target form can be positioned relative to the current window of the calling form.
When calling APP_NAVIGATE.EXECUTE, these values are available when the target form is opened the first time.
APP_NAVIGATE.EXECUTE and FND_FUNCTION.EXECUTE allow you to open functions for Oracle Self-Service
Applications (self-service functions) from Oracle Forms Developer-based forms and the Navigator window as well.
The arguments require URL-style syntax instead of OPEN_FORM-style syntax. You cannot use
APP_NAVIGATE.EXECUTE and FND_FUNCTION.EXECUTE to open functions from Oracle Self-Service
Applications, however (because these routines are contained in Oracle Forms Developer-based libraries).
Arguments (input)
function_name The developer name of the form function to execute.
open_flag 'Y' indicates that OPEN_FORM should be used; 'N' indicates that NEW_FORM should be used.
You should always pass 'Y' for open_flag, which means to execute the function using the Oracle
Forms OPEN_FORM built-in rather than the NEW_FORM built-in.
This argument is ignored if the function type is one of the following function types: WWW, WWK,
JSP, or SERVELET.
session_flag Passing 'NO_SESSION' or 'N' opens the form in the same session as the existing form; passing
anything else opens your form in a new database session (including 'SESSION', the default).
Opening a form in a new database session causes the form to have an independent commit cycle.
You should always pass 'SESSION' or 'Y' (which has the same effect as 'SESSION' for backwards
compatibility).
This argument is ignored if the function type is one of the following function types: WWW, WWK,
JSP, or SERVELET.
Function Security APIs for PL/SQL Procedures (Oracle Applications D... http://egeapp.egeseramik.com:8000/pls/prod/fndgfm/fnd_help.get/us/F...
1 de 2 11/07/2012 11:35 a.m.
JSP, or SERVELET.
other_params An additional parameter string that is appended to any parameters defined for the function in the
Parameters field of the Form Functions form. You can use other_params to set some parameters
dynamically. It can take any number of parameters.
For calling forms: if there are multiple additional parameters, the values passed to those
parameters must have double quotes around them. For example, suppose a form accepts two
pieces of context information to perform a query when the form is accessed from a particular
window. The concatenated string to pass should have the following syntax:
FND_FUNCTION.EXECUTE(
FUNCTION_NAME=> function_name,
OPEN_FLAG=>'Y', SESSION_FLAG=>'Y',
OTHER_PARAMS=>
'CONTEXT1="'||:block.context1 || ' "
CONTEXT2=" || :block.context2 || ' " ');
For calling Oracle Self-Service Applications functions, anything in the other_params argument is appended to the
URL as constructed from the function definition (with an ampersand & delimiter). The URL is constructed as
follows:
HTML_Call_field&Parameters_field&OTHER_PARAMS
Use URL-style syntax for other_params if you are calling a self-service function. For example, your call might look
like the following:
FND_FUNCTION.EXECUTE(
FUNCTION_NAME=> function_name,
OPEN_FLAG=>'Y', SESSION_FLAG=>'Y',
OTHER_PARAMS=>'partyId='||
to_char(:cust.party_id));
activate_flag Either ACTIVATE or NO_ACTIVATE (default is ACTIVATE). This flag determines whether the focus
goes to the new form (ACTIVATE) or remains in the calling form (NO_ACTIVATE).
This argument is ignored if the function type is one of the following function types: WWW, WWK,
JSP, or SERVELET.
browser_target Use this argument only for calling self-service functions. This argument allows you to specify which
browser frame should be used. The NULL default means that the function opens in a new browser
window.
Example
The following is an example of calling a form function (not a self-service function):
FND_FUNCTION.EXECUTE(FUNCTION_NAME=>'DEM_DEMXXEOR',
OPEN_FLAG=>'Y', SESSION_FLAG=>'Y',
OTHER_PARAMS=>
'ORDER_ID="'||param_to_pass1||
'" CUSTOMER_NAME="'||param_to_pass2||'"');
Function Security APIs for PL/SQL Procedures (Oracle Applications D... http://egeapp.egeseramik.com:8000/pls/prod/fndgfm/fnd_help.get/us/F...
2 de 2 11/07/2012 11:35 a.m.