Posts by Chandrasekar Sivasangu

Reserve Lot number for the order

Sample script for Reserve Lot number for the order PROCEDURE xx_bdg_Reserve_attribs ( errbuf OUT VARCHAR2, retcode OUT VARCHAR2, p_org_id NUMBER ) IS v_api_version_number NUMBER := 1; v_return_status VARCHAR2 (2000); v_msg_count…

Read More

Order Creation Using API

Script to OE_ORDER_PUB.PROCESS_ORDER ( Sample Script  Create Sales Order ) Script PROCEDURE xx_bdg_so_interface ( errbuf OUT VARCHAR2, retcode OUT VARCHAR2, p_org_id NUMBER ) IS v_api_version_number NUMBER := 1; v_return_status VARCHAR2…

Read More

Find tax intended use for an Item

SELECT NVL (attribute_value, ‘N’) FROM jai_item_templ_hdr_v jih, jai_item_templ_dtls_v jid WHERE 1 = 1 AND jih.template_hdr_id = jid.template_hdr_id AND jid.attribute_code = ‘RECOVERABLE’ AND jih.inventory_item_id = 73838 AND jih.organization_id = 101

Read More

ASL Duplicate Site validation

SELECT count(*) into v_asl_site_count FROM po_lookup_codes plc, hr_org_units_no_join hou, hr_org_units_no_join hou1, hr_all_organization_units_tl hout, hr_all_organization_units_tl hout1, po_vendors pv, po_vendor_sites_all pvs, mtl_manufacturers mm, mtl_manufacturers mm1, mtl_parameters mp, mtl_parameters mp1, po_asl_statuses past, po_approved_supplier_list…

Read More

How to handle divisor is equal to zero error

While execution the query with arithmetic calculation exception will throw divisor is equal to zero error.In this situation we can use below logic. CREATE OR REPLACE FUNCTION divisorzero (p_divited NUMBER,…

Read More

Concurrent programs run count Weekly breakup query

Pass the from and to date parameter. select USER_CONCURRENT_PROGRAM_NAME,REQUEST_DATE,CNTPERDAY,week_no, case when week_no=1 then sum(CNTPERDAY) OVER (PARTITION BY USER_CONCURRENT_PROGRAM_NAME,week_no) else 0 end week_no_1, case when week_no=2 then sum(CNTPERDAY) OVER (PARTITION BY…

Read More

Customer Address change script

/******************************************************************************** *PURPOSE: To Customer Locations information from back-end * *AUTHOR: Shailender Thallam * *********************************************************************************/ SET SERVEROUTPUT ON; DECLARE — –Cursor to fetch location details — cursor cur_loc IS select hps.location_id…

Read More

Call requisition import program back from back end

declare l_request_req_id NUMBER; begin BEGIN l_request_req_id := apps.fnd_request.submit_request (application => ‘PO’ –Application, , program => ‘REQIMPORT’ –Program, , argument1 => ” –Interface Source code, , argument2 => 1032 –Batch ID,…

Read More

Third party Registration Validation

create or replace procedure xx_Thirdpart_reg_validation(P_CUSTOMER varchar2) as LV_ERR_MSG VARCHAR2 (4000); LV_STATUS_FLAG VARCHAR2 (1); LV_CUSTOMER_ID NUMBER; LV_SITE_USE_ID NUMBER; LV_GST_NUM VARCHAR2 (20); begin BEGIN SELECT CUSTOMER_ID INTO LV_CUSTOMER_ID FROM AR_CUSTOMERS ARC WHERE…

Read More

Ship to Site Address Validation

create or replace procedure xx_shipto_site_validation(P_CUSTOMER varchar2) as LV_ERR_MSG VARCHAR2 (4000); LV_STATUS_FLAG VARCHAR2 (1); LV_CUSTOMER_ID NUMBER; LV_SHIP_SITE_USE_ID NUMBER; begin BEGIN SELECT CUSTOMER_ID INTO LV_CUSTOMER_ID FROM AR_CUSTOMERS ARC WHERE ARC.CUSTOMER_NAME = P_CUSTOMER;…

Read More