Call OA Framework Page from Oracle Forms passing Parameters
Written by Anil Passi   
Friday, 27 July 2007
In order to find out how this can be done, lets have a look at how an Oracle standard screen makes a call to OA Framework page.

Requirement
You want to call an OA Framework screen from Oracle Form,using fnd_function.execute, passing some parameters to OA Framework page.
Which screen in Oracle Form standard functionality is integrated with OA Framework Screen?
Plenty of those, but for this article lets take an example of Purchase Order screen, as shown below.
In this case, the PO screen, passes the PO_HEADER_ID and PO_RELEASE_ID to an OA Framework page.



Syntax for making a call to pass parameters
From the Purchase order screen, OA Framework based function PO_VIEW_CHANGE_HISTORY is called.
Clicking on this menu link takes you straight to the Workflow process diagram for the current po_header_Id (and the currently selected po_release_id).
The syntax used by the Oracle Form screen is
        if fnd_function.test(resp_function_name)
         then   
            fnd_function.execute
                (
                FUNCTION_NAME=>'PO_VIEW_CHANGE_HISTORY',

                OPEN_FLAG =>'Y',
                SESSION_FLAG =>'Y',
                OTHER_PARAMS =>'PoHeaderId='||l_po_header_id||'&PoReleaseId='||l_po_release_id
                );

        end if;


Now some Notes
Parameters are being passed via OTHER_PARAMS
You need to use & for each subsequent parameter, after the first parameter.
This is JSP style syntax.


Why is OA framework parameter syntax same as JSP styled syntax?

That's because the form function is attached to OA.jsp, that redirects the call to framework page.


How is the parameter value accessed within OA Framework?
Inside the controller [processRequest] of OA Framework page, you can use pageContext.getParameter("parameter name")
In the context of this example
String poHdrId = pageContext.getParameter("PoHeaderId") ;

Comments (3)add
...
written by Rao , August 29, 2007
very good
...
written by Soumya , September 27, 2007
When you click on the view approval through workflow in the inquire menu. How is the function name 'view approval through workflow' linked to the OA page that which we have defined in application developer. Though we use fnd_function.execute to call this form. Is there anything link we should call this fnd_function.execute in custom.pll.

My Question is where are you going to call the fnd_function.execute ?? Could u please help me because i'm working on the similar kind of object.
to see code in that form function
written by nikhil patil , March 18, 2008
Anil,it is very good , but can u tell me how check code within that form function?
You must be logged in to a comment. Please register if you do not have an account yet.

busy