Invoking a server-side stored procedure or function within Oracle Forms is the identical to calling a local client-side procedure or function.
A server-side stored procedure is a PL/SQL block designed to be executed by the server-side PL/SQL engine. It may accept inputs, and may return outputs, neither of which is mandatory.
The server-side stored procedure runs under the security domain (or Schema) of the creator of the procedure, not the current user. The current user needs EXECUTE privileges on the procedure to use it.
One important difference between procedures for Oracle Forms and procedures for the database is that server-side procedures do not understand references to Oracle Forms bind variables (such as :BLOCK.ITEMNAME, :GLOBAL.VARNAME, or :SYSTEM.CURSOR_ITEM). Any data that procedures need for processing must be passed by way of parameters of appropriate datatype, by package variables, or by selecting from tables.
You should structure your Oracle Forms user-named routines to accept inputs and return results in parameters. This will make the eventual migration of the procedure into the database as painless as adding the word CREATE in front of the PROCEDURE declaration (in addition to running the resulting script in SQL*PLUS).
When invoking a stored procedure or function, only the following subset of possible usages is supported:
DECLARE
ld DATE;
ln NUMBER;
lv VARCHAR2(30);
BEGIN
/*
** Calling Form-Level Procedure/Function
*/
forms_procedure_name(ld,ln,lv);
ld := forms_function_name(ln,lv);
/*
** Calling Database Procedure/Function
*/
database_procedure_name(ld,ln,lv);
ld := database_function_name(ln,lv);
END;