Posts by Brahmaiah kolla

Account Preprocessor Period details Query

SELECT DISTINCT glp.period_num, glp.period_name, glp.period_set_name, sts.start_date, sts.end_date, sts.closing_status, gsob.set_of_books_id, sts.set_of_books_id sts_sob_id, plcy.legal_entity_id, glp.period_year FROM gl_periods glp, gl_period_statuses sts, gl_sets_of_books gsob, gmf_fiscal_policies plcy WHERE glp.period_set_name = gsob.period_set_name AND glp.period_type = gsob.accounted_period_type…

Read More

Cost Comparison Report Of OPM

select Item_code ,Item_description ,round(Cost_in_Curr_Period,2)Cost_in_Curr_Period ,round(Cost_in_Comparison_Period,2)Cost_in_Comparison_Period ,round((Cost_in_Comparison_Period-Cost_in_Curr_Period),2)Cost_Varaice ,decode(Cost_in_Comparison_Period,0,0,(round(((Cost_in_Comparison_Period-Cost_in_Curr_Period)/Cost_in_Comparison_Period),2)*100)) Cost_Varaice_prec ,ORGANIZATION_CODE ,Current_period ,Comp_period from(select msi.SEGMENT1 Item_code ,msi.DESCRIPTION Item_description ,nvl(cst.ACCTG_COST,0) Cost_in_Curr_Period ,nvl((select cst1.ACCTG_COST from gl_item_cst cst1 ,gmf_period_statuses gps1 where 1=1 and cst1.INVENTORY_ITEM_ID=cst.INVENTORY_ITEM_ID and…

Read More

How to get item cost for period wise.

SELECT ACCTG_COST FROM gl_item_cst gic, org_acct_periods_v oap WHERE 1 = 1 AND gic.organization_id = oap.organization_id AND gic.organization_id =:P_org_id AND gic.inventory_item_id = :P_item_id AND oap.rec_type = ‘ORG_PERIOD’ AND oap.period_name =:P_period_name AND…

Read More

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 get supplier ID and supplier site ID for the Isupplier login.

BEGIN SELECT DISTINCT assa.vendor_id,LISTAGG(assa.vendor_site_id, ‘,’) WITHIN GROUP (ORDER BY assa.vendor_id) INTO v_vendor_id,v_vendor_site_id FROM ak_web_user_sec_attr_values aw, ap_supplier_sites_all assa WHERE aw.web_user_id = FND_GLOBAL.USER_ID AND aw.attribute_code = ‘ICX_SUPPLIER_ORG_ID’ AND assa.vendor_id = aw.number_value AND…

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