A script-enabled browser is required for this page to function properly.

Passing Parameter Values to a Foreign Function Using PL/SQL

Passing parameter values, such as Oracle Forms variables and items, to a foreign function that is invoked from a PL/SQL interface is similar to passing parameters to any PL/SQL subprogram. Be sure to register the parameter values when you create the PL/SQL interface.

After assigning a Oracle Forms variable or item value to a PL/SQL variable, pass the PL/SQL variable as a parameter value in the PL/SQL interface of the foreign function. The PL/SQL variable that is passed as a parameter must be a valid PL/SQL data type; it must also be the appropriate parameter type as defined in the PL/SQL interface.

Passing parameter values to a foreign function using PL/SQL: Example

/*
 The variables X_Val and Y_Val contain values obtained from
 Oracle Forms and are used as parameter values in the ADD
 foreign function.
*/
DECLARE
 X_Val  BINARY_INTEGER := :addblk.Xitm;
 Y_Val BINARY_INTEGER := :addblk.Yitm;
 sum BINARY_INTEGER;

BEGIN
 sum := ADD(X_Val, Y_Val);
END;


Returning a value from a foreign function using PL/SQL example

Simplifying complex parameter data types

Passing parameter values to a foreign function using USER_EXIT