Call OA Framework Page from Oracle Forms passing Parameters
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=>resp_function_name,
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
My Question is where are you going to call the fnd_function.ex ecute ?? Could u please help me because i'm working on the similar kind of object.
OA.jsp?OAFu nc=XX_XXTRFRMA& P_INCIDENT_ID={ @IncidentId}
W hen I do this, it opens the form, but I get an error of
UTIL-PARAM STRING ERROR
This error happens within the application, not on the html page. Can you help with this? If I hardcode a value for IncidentId like this
OA.jsp?OA Func=XX_XXTRFRM A&P_INCIDENT_ID =123456
the form opens as expected.
RSS feed for comments to this post