OAF

How to call Workflow from OAF

We can call Workflow in 2 ways from the OAF 1) Using PL SQL Procedure, call procedure from OAF page using callable statement. CREATE OR REPLACE PROCEDURE start_wf_prc IS l_itemtype…

Read More

How to raise bundle exception in OAF

If we want to display multiple error messages in OAF page. We need to use the code as follows: arraylist errmsg = new ArrayList(); if(pageContext.getParameter(“Type”).equals(“”)) { errMsg.add(new OAException(“Type cannot be…

Read More

How to display the columns based on select query dynamically

package xxdynmcdata.oracle.apps.pos.project.webu; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.ResultSetMetaData; import java.sql.Connection; import java.sql.SQLException; import java.sql.Statement; import oracle.apps.fnd.common.VersionInfo; import oracle.apps.fnd.framework.OAApplicationModule; import oracle.apps.fnd.framework.OAViewObject; import oracle.apps.fnd.framework.server.OADBTransaction; import oracle.apps.fnd.framework.server.OAViewDef; import oracle.apps.fnd.framework.webui.OAControllerImpl; import oracle.apps.fnd.framework.webui.OAPageContext; import oracle.apps.fnd.framework.webui.beans.OAWebBean;…

Read More

How to Convert to Base64formate

package XXBlob.oracle.apps.pos.xxit.webui; import java.io.File; import java.io.FileOutputStream; import java.io.InputStream; import oracle.apps.fnd.common.VersionInfo; import oracle.apps.fnd.framework.OAException; import oracle.apps.fnd.framework.webui.OAControllerImpl; import oracle.apps.fnd.framework.webui.OAPageContext; import oracle.apps.fnd.framework.webui.beans.OAWebBean; import oracle.cabo.ui.data.DataObject; import oracle.jbo.domain.BlobDomain; import java.sql.PreparedStatement; import java.sql.Connection; import javax.xml.bind.DatatypeConverter; /** *…

Read More

How to Call Prepared Statement in OAF

import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.ResultSet; try { Connection conn = pageContext.getApplicationModule(webBean).getOADBTransaction().getJdbcConnection(); String Query = “SELECT count(*) count from RCV_HEADERS_INTERFACE where INTERFACE_HEADER_ID=:1 and ASN_TYPE=’DARFT_ASN'”; PreparedStatement stmt = conn.prepareStatement(Query); stmt.setString(1, project_id);…

Read More

How to call external URL from OAF

public void processRequest(OAPageContext pageContext, OAWebBean webBean) { super.processRequest(pageContext, webBean); String ExternalUrl = pageContext.getParameter(“ExternalUrl”); if ((ExternalUrl != null) || (!””.equals(ExternalUrl))) { String extrnlurl = “function externalurlfunc(){document.location='”+ExternalUrl+”‘;}”; OABodyBean bodyBean = (OABodyBean)pageContext.getRootWebBean(); pageContext.putJavaScriptFunction(“externalurlfunc”,…

Read More

How to assign Database sequence to VO

Assign DB sequence value to VO OAViewObject ASNvo = (OAViewObject)findViewObject(“XXASNDetailsVO”); OARow row = (OARow)ASNvo.first(); row.setAttribute(“ASNId”, getOADBTransaction().getSequenceValue(“XXASN_HEADER_SEQ”).toString());

Read More

Special characters validation

For any field if you want throw any exception when entered any special characters.  We need to use following pattern to find. Pattern p = Pattern.compile(“[^a-zA-Z0-9\\s]”);

Read More

500 Internal error in OAF

Once any environment get refreshed in EBS, a new dbc file will be generated. Some times we will receive 500 internal error. To over come this we need to replace…

Read More

Calling External URL in new Tab

When we calling any external URL from OAF page, we need to add destination URI as below. So URL will open in new tab with same browser. javascript:var a =…

Read More