You are on page 1of 15

Backend transportation Access:

==============================

corp dev : Apps/jeez1_u7z@tsoadev1


Patch : Apps/eeji4a_oub9e@tsoasbx1
sand box: apps/chue0_z8a@TSOADBA1
QA(STG) : apps/kahr1_i7yd@tsoastg2
DEV3 : apps/c4r4t_g0ld@TSOADEV3

Data Conversion:
================
select * from apps.GETS_CST_ITEM_COST_CONV_STG where branch_plant='LHL' and
process_flag='E';

select * from apps.org_organization_definitions where organization_code='FHL';

select * from apps.cst_item_cost_details where organization_id=2330 and


trunc(creation_date)=trunc(sysdate);

select * from apps.GETS_INV_ONHAND_CONV_STG where oracle_inv_org='LHL' and


process_flag='E';

select * from apps.mtl_onhand_quantities_detail where organization_id=2330 and


trunc(creation_date)=trunc(sysdate);

select * from apps.mtl_system_items_b where organization_id=2330;

Custom Table to check uncosted Error:


=====================================
select * from apps.gets_inv_no_cost_errors where transaction_id =4505917653;
Progarm to make Costed : GETS INV Update Mtl Transactions Costed Flag

Position Related Tables :


==========================

select * from apps.PER_POSITION_STRUCTURES_V where name like '%SG%';

select * from apps.PER_POS_STRUCTURE_ELEMENTS_V2 where ps_name like '%SG%';

select * from apps.PER_POS_STRUCTURE_ELEMENTS where pos_structure_version_id=423;

SELECT * FROM APPS.GETS_INV_OP_UNIT_INFO WHERE SHORT_NAME='GERIOT';

SELECT * FROM APPS.GETS_INV_ORGANIZATION_INFO;

select * from apps.PER_ASSIGNMENTS_V7 where assignment_number='502405656'; --


D_position_id='Buyer Indo';

select full_name,Employee_number,Effective_start_date,Effective_End_Date from


apps.PER_PEOPLE_V7 where person_id in
(select person_id from apps.PER_ASSIGNMENTS_V7 where D_position_id='Buyer Indo');

select * from apps.PER_ASSIGNMENTS_V7 where person_id in


(select person_id from apps.PER_PEOPLE_V7 where employee_number='502405656');

select * from apps.PER_PEOPLE_V7 where employee_number='502405656'; --where


full_name=''

select * from apps.PER_POSITIONS_V where job_name='Accounting Reviewer - TEST';

select * from apps.PER_POSITIONS_v where job_name='Accounting Reviewer - TURKEY';

select * from apps.hr_all_positions_f where name like '%Accounting%Rev%';

SELECT name, orig_system_id


FROM apps.wf_users
WHERE name = '502722187'
AND orig_system = 'PER'
AND status = 'ACTIVE';

Query to find the Employees in a particular Position and Employee's Position:


=============================================================================
select * from apps.PER_ASSIGNMENTS_V7 where assignment_number='502405656'; --
D_position_id='Buyer Indo';

select full_name,Employee_number,Effective_start_date,Effective_End_Date from


apps.PER_PEOPLE_V7 where person_id in
(select person_id from apps.PER_ASSIGNMENTS_V7 where D_position_id='Buyer Indo');

Custom Tables for Insert Queries:


==================================

select * from apps.GETS_INV_OP_UNIT_INFO where short_name='GEINJS';

select * from apps.GETS_INV_ORGANIZATION_INFO where organization_id=;

select * from org_organization_definitions where organization_code='';

Query to find the Ledger Name of a Org:


======================================
select * from apps.gl_ledgers where ledger_id in
(select set_of_books_id from apps.org_organization_definitions where
organization_code='NMD');

Query to find the responsibilities assigned for User:


====================================================

select * from apps.fnd_user where user_name='502405656';

select Responsibility_name from apps.fnd_responsibility_vl where responsibility_id


in
(select responsibility_id from apps.FND_USER_RESP_GROUPS_DIRECT where
user_id=144481);

Query to find the Order Types in a particular OU:


====================================================
select * from APPS.oe_transaction_types_tl where language='US' and
transaction_type_id in
(select transaction_type_id from APPS.oe_transaction_types_all where org_id=4218
and transaction_type_code='LINE');

Query to find the Modifier TP%


==============================
SELECT
ql.list_line_no "MODIFIER NO",
hca.account_number,
hp.party_name "CUSTOMER NAME",
ql.operand "TP%",
qh.name,
ql.start_date_active "MODIFIER START",
ql.end_date_active "MODIFIER END",
qq.START_DATE_ACTIVE "LINE QUALIFIER START",
qq.END_DATE_ACTIVE "LINE QUALIFIER END",
--qh.description,
--qh.comments,
qh.active_flag,
qq.qualifier_context,
qh.currency_code,
--qh.list_type_code,
--ql.list_line_type_code,
--ql.modifier_level_code,
ql.arithmetic_operator,
--ql.override_flag,
ql.print_on_invoice_flag,
--ql.reprice_flag,
--ql.product_attribute_context,
--ql.product_attr,
--ql.product_attribute_type,
--ql.product_attr_val,
--ql.pricing_phase,
--ql.modifier_level,
--ql.list_line_type,
ql.arithmetic_operator_type,
qq.comparision_operator_code
--qq.qualifier_attr_value,
FROM
apps.qp_secu_list_headers_vl qh,
apps.qp_modifier_summary_v ql,
apps.qp_qualifiers_v qq,
apps.hz_parties hp,
apps.hz_cust_accounts hca
WHERE
qh.list_header_id = ql.list_header_id
AND qh.list_header_id = qq.list_header_id
AND ql.list_line_id = qq.list_line_id
--AND qh.description = '2009-2012 MODIFIER COST MASTER LIST'--'2012 MODIFIER
COST MASTER LIST'
AND qh.NAME = '2012 MODIFIER COST MASTER LIST'
--AND ql.list_line_no = '24076900'
AND qq.qualifier_attr_value (+) = to_char(hca.cust_account_id)
AND hca.party_id = hp.party_id (+)
AND qq.qualifier_context = 'CUSTOMER'
--AND upper(hp.party_name) like 'TRANS%';
AND hca.account_number = :Account_number;
Query to find the users who have a particular responsibility:
==============================================================

select * from apps.fnd_responsibility_vl where responsibility_name like 'BOM%User


%GESAT'; --like '%BOM%User%';

select user_name,
description,
employee_id,
start_date,
end_date,
user_id
from
apps.fnd_user
where
user_id in (
select user_id from apps.FND_USER_RESP_GROUPS_DIRECT where responsibility_id=57280)
and end_date is null;

Query to find employee names in a position:


==================================================

select user_name,description,email_address,Start_date,end_date from apps.fnd_user


where employee_id in
(select person_id from apps.PER_ASSIGNMENTS_V7 where position_id=4);

select * from apps.fnd_user where employee_id =5821;

select person_id from apps.PER_ASSIGNMENTS_V7 where position_id=4;

select * from apps.PER_POSITIONS_V where name like '%Sr%Buyer%'; 310

Query to find out the status of the Interco in Material Txns table
==================================================================
select * from apps.oe_order_headers_all where order_number='91637213';

select * from apps.oe_order_lines_all where header_id='83227254';

select mmt.invoiced_flag,mmt.attribute9,mmt.* from apps.mtl_material_transactions


mmt where trx_source_line_id=22378404;

select
rcta.trx_number,
rcta.interface_header_context,
rcta.interface_header_attribute1,
rcta.interface_header_attribute3,
rcta.interface_header_attribute14,
rcta.*
from
apps.ra_customer_trx_all rcta
where
interface_header_attribute1 ='11776559';
--interface_header_attribute3 like '%55640059%' -- Original Delivery
--interface_header_attribute14 like '%55640059%';-- Intercompany Inv

select * from apps.ra_interface_lines_all where interface_line_attribute1='';

select * from apps.AP_INVOICES_INTERFACE where invoice_num ='881000210117-771';


--to_date(invoice_date) > to_date(Sysdate-2);

select * from apps.AP_INVOICES_all where invoice_num like '%61829291%';

Query to find out AR and AP Invoice Interface


=============================
select * from apps.ra_interface_lines_all where
interface_line_attribute1='91983375';

select * from apps.ra_customer_trx_all where


interface_header_attribute1='91983375'; 9630000000071

select * from apps.AP_INVOICE_LINES_INTERFACE where to_date(last_update_date) >


to_date(sysdate-1);

select * from apps.ap_interface_rejections where to_date(creation_date) >


to_date(sysdate-1);

select * from apps.ap_invoices_interface where to_date(invoice_date) >


to_date(sysdate-2);

select * from apps.AP_INVOICES_ALL where invoice_num like '%9630000000077%';

Query to Troubleshoot Global Procurement:


=========================================

select * from apps.po_headers_all where segment1='527000202';

select * from apps.po_lines_all where po_header_id=4062930;

select mmt.invoiced_flag,mmt.attribute9,mmt.* from apps.mtl_material_transactions


mmt where transaction_source_id='4062930';
--transaction_source_id is PO Header ID;

select * from apps.mtl_transaction_types where transaction_type_id in (18,19,11);

select ril.Interface_line_context,
ril.interface_line_attribute1,
ril.purchase_order,
ril.*
from apps.ra_interface_lines_all ril where to_date(creation_date) >
to_date(sysdate-2)
and interface_line_context='GLOBAL_PROCUREMENT';
--Interface_line_attribute1 is PO Number

select * from apps.RA_CUSTOMER_TRX_ALL where purchase_order='527000202' and


interface_header_attribute1='527000202';
--interface_header_attribute1 is PO Number

Query to Troubleshoot UX- RMA Process:


======================================
select * from apps.oe_order_headers_all where order_number='11727634';

select * from apps.oe_order_lines_all where header_id=83689702;

select * from apps.oe_order_headers_all where org_id=102 and


orig_sys_document_ref='11727634';

select * from apps.gets_oe_rma_ptn_creation where line_id=22463715;

To Find Salesrep in a OU:


========================

SELECT a.org_id, b.short_name, a.salesrep_id,


jrd.resource_id,a.salesrep_number,jrd.resource_number, a.NAME,jrd.resource_name,
a.status,
a.start_date_active, a.end_date_active,
a.gl_id_rev, (select concatenated_segments from
apps.gl_code_combinations_kfv where code_combination_id = a.gl_id_rev)
revenue_account,
a.gl_id_freight, (select concatenated_segments from
apps.gl_code_combinations_kfv where code_combination_id = a.gl_id_freight)
freight_account,
a.gl_id_rec, (select concatenated_segments from
apps.gl_code_combinations_kfv where code_combination_id = a.gl_id_rec)
receivable_account,
a.attribute1 cogs_material_id, (select concatenated_segments from
apps.gl_code_combinations_kfv where to_char(code_combination_id) = a.attribute1)
COGS_Material,
a.attribute2 cogs_labor_id, (select concatenated_segments from
apps.gl_code_combinations_kfv where to_char(code_combination_id) = a.attribute2)
cogs_labor,
a.attribute3 cogs_ovrhd_id, (select concatenated_segments from
apps.gl_code_combinations_kfv where to_char(code_combination_id) = a.attribute3)
cogs_ovrhd,
a.attribute4 accounting_type,
a.attribute5 reversal_salesrep, a.attribute6 salesrep_type,
a.attribute7 def_sic_code, a.attribute8 comm_bus_code,
a.attribute15 product_dep
FROM apps.jtf_rs_salesreps a, apps.gets_inv_op_unit_info b,
apps.jtf_rs_defresources_v jrd
WHERE 1=1--a.org_id = 3681
AND a.org_id = b.org_id AND b.short_name = 'CHNCML'
and a.resource_id = jrd.resource_id;

Query to find the errors in Order Import:


==========================================

SELECT ORIG_SYS_DOCUMENT_REF, PRICE_LIST_ID, ERROR_FLAG, STATUS_FLAG,


INTERFACE_STATUS,REQUEST_ID,order_type_id
from apps.OE_HEADERS_IFACE_ALL where orig_sys_document_ref = 11904594;

UPDATE apps.OE_HEADERS_IFACE_ALL
SET ERROR_FLAG = NULL, REQUEST_ID = NULLL
where org_id = 2609 and orig_sys_document_ref = 11904594;

SELECT ORIG_SYS_DOCUMENT_REF, INVENTORY_ITEM_ID, UNIT_LIST_PRICE,


UNIT_SELLING_PRICE, ERROR_FLAG, STATUS_FLAG, INTERFACE_STATUS,REQUEST_ID
FROM APPS.OE_LINES_IFACE_ALL WHERE ORIG_SYS_DOCUMENT_REF = 11905594;

select * from apps.po_requisition_headers_all where segment1='527000128';

SELECT * FROM APPS.OE_PROCESSING_MSGS WHERE REQUEST_ID=202778721;

select * from APPS.OE_PROCESSING_MSGS_tl where transaction_id in (10956610);

SELECT * FROM APPS.HR_OPERATING_UNITS WHERE NAME='PT. GE Operations Indonesia'; --


1450

select PL.name,PL.* from apps.qp_secu_list_headers_vl PL where


list_header_id=376669;

select * from apps.org_organization_definitions where organization_code='PA2';

Dropship Custom Tables:


=======================

select * from apps.gets_dm_cc_document_master where delivery_type ='EXTERNAL_DS'


and op_unit_id=2389;

select * from gets_po.gets_po_dropship_tbl where attribute1='EXTERNAL_DS' and


org_id=2389; --order by creation_date desc;

select * from apps.gets_dm_cc_document_master where op_unit_id=2389 and


organization_id=2390 and document_type='EXTERNAL_DS'
and to_date(creation_date) > to_date(sysdate-30);

select * from apps.gets_dm_cc_orders where cc_order_id in (select lead_cc_order_id


from apps.gets_dm_cc_document_master where op_unit_id=2529 and
delivery_name='45135937'); --delivery_type ='EXTERNAL_DS'

Interco Txn Flows:


==================

Select
Ship_organization_name FROM_OU,
Sell_organization_name TO_OU,
CUSTOMER_NAME,
CUSTOMER_NUMBER,
Location,
ATTRIBUTE_CATEGORY,
SUPPLIER_NAME,
VENDOR_SITE,
attribute5 "Bypass Flag"
from apps.MTL_INTERCOMPANY_PARAMETERS_V
where
Ship_organization_name= :p_ship_org
and Sell_organization_name=:p_sell_org;

REcords Stuck in ESG WB table:


===============================
SELECT gds.po_header_id,gds.order_header_id,gds.attribute1,
(select shipment_number from apps.mtl_material_transactions where transaction_id =
mmt.parent_transaction_id)
FROM apps.gets_po_dropship_tbl gds,
apps.mtl_material_transactions mmt
WHERE gds.status='NEW'
AND to_number(gds.attribute3) = mmt.transaction_id
AND mmt.trx_source_delivery_id = NVL(null,mmt.trx_source_delivery_id)
AND gds.attribute1 = 'AFFILIATE_DS'

Workflow realated Tables:


========================

select * from apps.fnd_user where user_name='502405656'; -- 149700

SELECT * FROM apps.wf_notifications where message_name='PO_EMAIL_PO';

SELECT * FROM apps.wf_notifications where user_key='539000020';

select * from apps.wf_users where to_date(start_date)> to_date(sysdate-3); --


original_recipient ='212585142'; --to_user like 'Chamila%';

Select from_user,to_user,notification_id, status, mail_status, begin_date


from apps.WF_NOTIFICATIONS where mail_status = 'FAILED' and to_date(begin_date)>
to_date(sysdate-3);

select * from apps.WF_LOCAL_USERS;

select name, email_address from apps.wf_users where name='502157768' order by name;


--where name='212585142'

Select from_user, to_user, notification_id, status,


mail_status,begin_date,USER_KEY,ITEM_KEY,MESSAGE_TYPE,MESSAGE_NAME begin_date
from apps.WF_NOTIFICATIONS where notification_id in (23354122,23411122);

select message_type, count(1) from apps.wf_notifications


where status='OPEN' and mail_status='MAIL' group by message_type;

Select from_user, to_user, notification_id, status,


mail_status,begin_date,USER_KEY,ITEM_KEY,MESSAGE_TYPE,MESSAGE_NAME begin_date
from apps.WF_NOTIFICATIONS where status = 'OPEN' and message_type='POAPPRV';

SELECT COUNT(*), message_name FROM apps.wf_notifications


WHERE STATUS='OPEN'
AND mail_status = 'MAIL'
GROUP BY message_name;

Select * from apps.WF_NOTIFICATIONS where mail_status = 'FAILED' and


notification_id ='23348745' and to_date(begin_date)> to_date(sysdate-3);

SELECT component_name, component_status FROM apps.fnd_svc_components WHERE


component_type = 'WF_MAILER';

Query to find the Appworx prog run by Resp wise:


================================================

select a.PROGRAM_SHORT_NAME,
to_char(a.REQUESTED_START_DATE,'DD-MON-YYYY HH24:MI:SS')REQUESTED_START_DATE,
to_char(a.ACTUAL_START_DATE,'DD-MON-YYYY HH24:MI:SS')ACTUAL_START_DATE,
to_char(a.ACTUAL_COMPLETION_DATE,'DD-MON-YYYY HH24:MI:SS')ACTUAL_COMPLETION_DATE,
--REQUESTED_START_DATE,ACTUAL_START_DATE,ACTUAL_COMPLETION_DATE
to_char(sysdate,'DD-MON-YYYY HH24:MI:SS')systime,
a.requestor,
a.argument_text
from apps.fnd_conc_req_summary_v a
where a.PROGRAM_SHORT_NAME = 'REQIMPORT'
and responsibility_id = 20707
and argument_text like '%ORDER%ENTRY%'
order by a.request_date desc;

select PROGRAM_SHORT_NAME,request_date,sysdate,requestor from


fnd_conc_req_summary_v where PROGRAM = 'GETS PO Grouping Rule for Dropship Orders'
order by request_date desc;

select PROGRAM_SHORT_NAME,request_date,sysdate,requestor from


fnd_conc_req_summary_v where PROGRAM_SHORT_NAME = 'GETS_ONT_VEOS_MAIN_PROCESS'
order by request_date desc;

select PROGRAM_SHORT_NAME,request_date,sysdate,requestor from


fnd_conc_req_summary_v where PROGRAM = 'GETS Customs Compliance Synchronize Process
(Drop Ship)' order by request_date desc;

PO Related Tables:
==================

select * from apps.po_requisition_headers_all where org_id=2389 and


to_date(approved_date)> to_date(sysdate-60);

select * from apps.po_requisition_lines_all where org_id=2389 and item_id=266171;


--cancel_flag='N' and ;

select * from apps.PO_REQ_DISTRIBUTIONS_ALL where org_id=2389;

select * from apps.mtl_system_items_b where segment1='390-1104-905';

select * from apps.po_headers_all where segment1='150002396';

Query to find the Hierarchy in which the PO got approved:


=========================================================

SELECT a.object_type_code,
a.action_code,
a.action_date,
a.employee_id,
b.name hierarchy_name,
d.full_name,
d.employee_number,
d.email_address
FROM apps.po_action_history a ,
apps.per_position_structures b ,
apps.po_headers_all c ,
apps.per_all_people_f d
WHERE a.object_id = c.po_header_id
AND c.segment1 = '533000007'--po_number
AND a.approval_path_id= b.position_structure_id
AND d.person_id = a.employee_id;

OM and Customer Realted Tables:


===============================

select * from apps.oe_order_headers_all where order_number='180016761';

select * from apps.oe_order_lines_all where header_id=74171487;

select * from apps.HZ_CUST_SITE_USES_ALL where cust_acct_site_id in


(select cust_acct_site_id from apps.HZ_CUST_ACCT_SITES_ALL where
cust_account_id=453950 and org_id=102); --location like '%PR1%' and
site_use_code='SHIP_TO';

select * from apps.HZ_CUST_ACCOUNTS_all where party_id=823612;

select * from apps.HZ_PARTIES where party_name='Industrea Mining Equipment Pty


Ltd.'; --party_id=823612

select * from apps.HZ_CUST_ACCT_SITES_ALL where cust_account_id=453950 and


org_id=102;

Query to Find Responsibility by user name:


=========================================
select * from select
a.user_id,a.user_name,a.description,a.email_address,a.person_party_id,b.responsibil
ity_id,
b.start_date,b.end_date,c.responsibility_name,c.description from apps.fnd_user a,
apps.FND_USER_RESP_GROUPS_DIRECT b, apps.fnd_responsibility_tl c where
a.user_id = b.user_id
and b.responsibility_id = c.responsibility_id
and c.language = 'US'
and a.user_name = '212585178';

Query to find the Customers with sites in a particular OU:


==============================================================
SELECT hca.cust_account_id,
(select party_name from apps.hz_parties where party_id = hca.party_id)
customer,
hca.account_number,
decode(hca.status,'I','Inactive','A','Active',hca.status) CUSTOMER_STATUS,
hcsu.site_use_code,
hcsu.primary_flag,
hcsu.location
FROM apps.hz_cust_site_uses_all hcsu,
apps.hz_cust_acct_sites_all hcasa,
apps.hz_cust_accounts hca
where hcasa.status = 'A'
and hcsu.cust_acct_site_id = hcasa.cust_acct_site_id
and hca.cust_account_id = hcasa.cust_account_id
and hcasa.org_id = 2529
Order by hcsu.site_use_code, hcsu.location;

Query to find out the exact Ship to site of a Inventory Org:


============================================================
Below Query we will get ORG_ID:
------------------------------
select * from apps.GETS_INV_OP_UNIT_INFO where short_name='GETSUK';

Below Query we will get Locations of particular OU:


---------------------------------------------------
select hps.party_site_number, hcsua.* from apps.HZ_CUST_SITE_USES_ALL hcsua
, apps.HZ_CUST_ACCT_SITES_ALL hcasa
,apps.hz_party_sites hps
where hcsua.org_id=2329 and hcsua.location like '%ERI%'
and hcsua.cust_acct_site_id =hcasa.cust_acct_site_id
and hcasa.party_site_id = hps.party_site_id;

Get the Location ID form below Query:


-------------------------------------
select * from apps.hr_locations where location_code='ERI Whse - Consume';

From the below Query we can find to which customer it has been linked:
----------------------------------------------------------------------
select * from apps.po_Location_Associations_All where location_id=1989 and
org_id=2329;

From the above query we will get the customer ID:


-------------------------------------------------
select * from apps.ra_customers where customer_ID=1553;

Not Needed (((((from the above query get the CUST_ACCT_SITE_ID and apply in thsi
query:
-----------------------------------------------------------------------
select * from apps.HZ_CUST_ACCT_SITES_ALL where cust_acct_site_id=807904 and
org_id=2329;

From the above Query we will get the CUST_ACCOUNT_ID then apply in this query:
-----------------------------------------------------------------------------
select * from apps.HZ_CUST_ACCOUNTS_all where cust_account_id=24240;

From the above query we will get PARTY_ID ,ACCOUNT_NUMBER then apply here to get
CUSTOMER_NAME:
-----------------------------------------------------------------------------------
------------
select * from apps.HZ_PARTIES where party_id='8977'; --'Industrea Mining Equipment
Pty Ltd.'; --party_id=823612))))))))

Query for Fetching Interco Customer Details:


============================================
--Execute below statement to get org id.
SELECT
*
FROM
apps.gets_inv_op_unit_info
WHERE
short_name = 'GEENR';

--Set database environment specific to Org


begin apps.mo_global.set_policy_context('S',3414); end;

--

SELECT
gio.short_name ou_name,
----------------------
--Customer Information
----------------------
hp.party_name "CUSTOMER_NAME",
hca.account_number,
hps.party_site_number,
hcsu.site_use_code,
hl.country,
hl.address1,
hl.address2,
hl.address3,
hl.address4,
hl.city,
hl.state,
hl.postal_code,
hl.province,
hl.county,
hl.address_style,
hsuv.location,
hsuv.payment_term_name,
hsuv.primary_salesrep_name,
hsuv.order_type_name,
hsuv.price_list_name,
hsuv.date_type_preference,
hsuv.freight_term,
hsuv.demand_class_code,
hsuv.inventory_location_code,
hsuv.inventory_organization_name,
---------------------------
--Customer Site Information
---------------------------
hp.party_id,
hca.cust_account_id,
hcas.cust_acct_site_id,
hcsu.site_use_id,
hcsu.primary_flag,
-----------------------
--Customer Site Address
-----------------------
--Site level details
hsuv.site_use_code,
hsuv.primary_flag,
hsuv.status,
hsuv.contact_id,
hsuv.contact_name,
hsuv.orig_system_reference,
hsuv.sic_code,
hsuv.payment_term_id,
hsuv.gsa_indicator,
hsuv.ship_partial,
hsuv.ship_via,
hsuv.fob_point,
hsuv.order_type_id,
hsuv.price_list_id,
hsuv.warehouse_id,
hsuv.warehouse_name,
hsuv.tax_reference,
hsuv.tax_code,
hp.tax_reference tax_code,
hcsu.tax_reference tax_code_site,
hcas.org_id,
hp.party_type,
hsuv.inventory_location_id,
hsuv.inventory_organization_id,
hsuv.tax_classification,
hsuv.tax_header_level_flag,
hsuv.tax_rounding_rule,
hsuv.primary_salesrep_id
FROM
apps.hz_parties hp,
apps.hz_party_sites hps,
apps.hz_cust_accounts_all hca,
apps.hz_cust_acct_sites_all hcas,
apps.hz_cust_site_uses_all hcsu,
apps.hz_locations hl,
apps.gets_inv_op_unit_info gio,
apps.hz_site_uses_v hsuv
WHERE
1 = 1
AND hp.party_id = hca.party_id
AND hca.cust_account_id = hcas.cust_account_id (+)
AND hps.party_site_id (+) = hcas.party_site_id
AND hcas.cust_acct_site_id = hcsu.cust_acct_site_id
--
AND hps.location_id = hl.location_id (+)
--
--AND hp.party_type = 'ORGANIZATION' -- only ORGANIZATION Party types
AND hp.status = 'A' -- only Active Parties/Customers
--AND upper(gio.short_name) = 'GEENR'
AND hca.account_number = nvl(:cust_account_number, hca.account_number)
AND hcas.org_id = gio.org_id
AND hsuv.site_use_id = hcsu.site_use_id
ORDER BY
1;

GL, AP, PO and AR Period Status:


================================
select
gps.set_of_books_id,fa.application_short_name,
gps.Period_name,gps.closing_status,gps.start_date,gps.end_date,
gps.year_start_date,gps.quarter_start_date,gps.period_year,gps.period_num,gps.adjus
tment_period_flag
from apps.gl_period_statuses gps,apps.fnd_application fa
where gps.application_id = fa.application_id
and gps.set_of_books_id = 181
and gps.period_name = 'Jun-14'
and fa.application_short_name in ('AR','PO','SQLAP','SQLGL');

Inventory Period Status:


========================
select * from apps.ORG_ACCT_PERIODS_V a, apps.org_organization_definitions b
where a.organization_id = b.organization_id
and a.period_name = 'Aug-14'
and b.set_of_books_id = 322;

select * from apps.gl_ledgers where name like '%RDC%';

select
hr.location_id,hr.location_code,hr.description,rsua.site_use_id,rsua.site_use_code,
rsua.address_id,rsua.status,rsua.location,rsua.bill_to_site_use_id,rsua.orig_system
_reference,ac.customer_id,rsua.org_id,
ac.customer_name,ac.customer_number,ac.orig_system_reference
from hr_locations hr, GETS_HZ_CUST_SITE_USES_V rsua, po_location_associations_all
pla,ar_customers ac
where pla.organization_id = 2629
and pla.site_use_id = rsua.site_use_id
and rsua.status = 'A'
and pla.location_id = hr.location_id
and ac.customer_id = pla.customer_id
order by hr.location_code;

select
msi.segment1,
br.resource_code,
cic.Item_cost,
cic.cost_type_id,
cic.cost_element_id
from
apps.cst_item_cost_details cic,
apps.BOM_RESOURCES_V br,
apps.mtl_system_items_b msi
where
cic.resource_id=br.resource_id
and cic.inventory_item_id=msi.inventory_item_id
and cic.organization_id=msi.organization_id
and to_date(cic.creation_date) > to_date(sysdate-1)
and cic.organization_id=3858;

Genome - Genpact Link :�https://genpact.edcast.com/log_in�

You might also like