Create ViewObject(VO) Dynamically
Now we are going to learn about how to create the view object (VO) programmatically.
Write the following code in In ProcessRequest
import oracle.apps.fnd.framework.server.OAViewDef
import oracle.apps.fnd.framework.OAViewObject
SampleAMImpl am=(SampleAMImpll)pageContext.getApplicationModule(webBean);
if(am!=null)
{
OAViewDef
viewdef=(OAViewDef)am.getOADBTransaction().createViewDef();
viewdef.setSql("select ename from scott.emp");
OAViewObject vo=(OAViewObject)am.createViewObject("SampleVO1",viewdef);
//SampleVO1 is
ViewObject Name
}