Monday, March 15, 2021

Query to get Oracle Receivables Details

 /*Query to get Oracle Receivables Details

==========================================*/

SELECT rcta.trx_number "INVOICE NUMBER",

rctta.name "TRANSACTION TYPE",

rcta.trx_date "INVOICE DATE",

apsa.due_date "DUE DATE",

apsa.invoice_currency_code "CURRENCY",

apsa.amount_due_original "AMOUNT",

apsa.amount_due_remaining "AMOUNT DUE",

hp_b.party_name "BILL TO CUSTOMER NAME",

hcsua_b.site_use_id "BILL TO SITE USE ID",

hl_b.address1,

hl_b.address2,

hl_b.address3,

hl_b.address4,

hl_b.city,

hl_b.state,

hl_b.postal_code,

hp_s.party_name "SHIP TO CUSTOMER NAME",

hcsua_s.site_use_id "SHIP TO SITE USE ID",

hl_s.address1,

hl_s.address2,

hl_s.address3,

hl_s.address4,

hl_s.city,

hl_s.state,

hl_s.postal_code

FROM RA_TERMS RT,

RA_CUSTOMER_TRX_ALL RCTA,

--RA_CUSTOMER_TRX_LINES_ALL RCTLA,

RA_CUST_TRX_TYPES_ALL RCTTA,

HZ_CUST_ACCOUNTS_ALL HCAA,

HZ_CUST_ACCT_SITES_ALL HCASA_S,

HZ_CUST_SITE_USES_ALL HCSUA_S,

HZ_PARTIES HP_S,

HZ_PARTY_SITES HPS_S,

HZ_LOCATIONS HL_S,

HZ_CUST_ACCT_SITES_ALL HCASA_B,

HZ_CUST_SITE_USES_ALL HCSUA_B,

HZ_PARTIES HP_B,

HZ_PARTY_SITES HPS_B,

HZ_LOCATIONS HL_B,

AR_PAYMENT_SCHEDULES_ALL APSA,

HR_LEGAL_ENTITIES HLE

WHERE --RCTA.CUSTOMER_TRX_ID = RCTLA.CUSTOMER_TRX_ID

RCTA.CUST_TRX_TYPE_ID = RCTTA.CUST_TRX_TYPE_ID

AND RCTA.BILL_TO_CUSTOMER_ID = HCAA.CUST_ACCOUNT_ID

AND RCTA.ORG_ID = RCTTA.ORG_ID

AND APSA.CUSTOMER_TRX_ID = RCTA.CUSTOMER_TRX_ID

AND APSA.CUST_TRX_TYPE_ID = RCTTA.CUST_TRX_TYPE_ID

AND RCTA.TERM_ID = RT.TERM_ID(+)

AND HCAA.PARTY_ID = HP_S.PARTY_ID

AND HCAA.PARTY_ID = HP_B.PARTY_ID

--SHIP TO ADDRESS LINKS

AND RCTA.SHIP_TO_SITE_USE_ID = HCSUA_S.SITE_USE_ID

AND HCSUA_S.CUST_ACCT_SITE_ID = HCASA_S.CUST_ACCT_SITE_ID

AND HCASA_S.PARTY_SITE_ID = HPS_S.PARTY_SITE_ID

AND HPS_S.PARTY_ID = HP_S.PARTY_ID

AND HPS_S.LOCATION_ID = HL_S.LOCATION_ID

--------BILL TO ADDRESS LINKS

AND RCTA.BILL_TO_SITE_USE_ID = HCSUA_B.SITE_USE_ID

AND HCSUA_B.CUST_ACCT_SITE_ID = HCASA_B.CUST_ACCT_SITE_ID

AND HCASA_B.PARTY_SITE_ID = HPS_B.PARTY_SITE_ID

AND HPS_B.PARTY_ID = HP_B.PARTY_ID

AND HPS_B.LOCATION_ID = HL_B.LOCATION_ID

AND HLE.ORGANIZATION_ID = RCTA.LEGAL_ENTITY_ID

AND RCTA.TRX_NUMBER ='12149'


Sunday, February 28, 2021

Dispute Notification Work Flow tables in Oracle fusion

 select

-- task summary :

b.TASK_NUMBER,

t.TASK_TITLE,

b.INITIATED_BY,

b.INITIATED_DATE,

b.COMPLETED_BY,

b.COMPLETED_DATE,

b.STATUS_CODE,

b.OUTCOME_CODE,

hb.version,

hb.from_user

from FND_BPM_TASK_B b, FND_BPM_TASK_TL t,

FND_BPM_TASK_HISTORY_B hb

where b.domain = 'ICDomain'

--and b.task_number = 200381

and b.task_definition_name = 'DisputeNotificationTask'

and b.task_id = t.task_id

and t.language = USERENV('LANG')

and t.task_id=hb.task_id

order by b.task_number,hb.version desc

Oracle Fusion Projects and Tasks Details

 SELECT TO_CHAR(PPA.PROJECT_ID) PROJECT_ID

,TO_CHAR(PPA.SEGMENT1) PROJECT_NUMBER

,PPA.NAME PROJECT_NAME

,PPA.DESCRIPTION

,PPA.START_DATE

,PPA.COMPLETION_DATE

,PPA.CLOSED_DATE

,PTV.TASK_NUMBER

,TO_CHAR(PTV.TASK_ID) TASK_ID

,TO_CHAR(PPA.CARRYING_OUT_ORGANIZATION_ID) ORGANIZATION_ID

,HRU.NAME ORGANIZATION_NAME

,PPT.PROJECT_TYPE PROJECT_TYPE

,PPA.GROUP_SPACE_TEMPLATE_NAME

,PPA.PM_PROJECT_REFERENCE

,XLE.NAME "LEGAL ENTITY"

,PPA.ACTUAL_START_DATE "PROJECT START DATE"

,PPA.ACTUAL_FINISH_DATE "PROJECT FINISH DATE"

,PPA.PROJECT_STATUS_CODE

,PTV.PM_TASK_REFERENCE "SOURCE TASK REFERENCE"

,PTV.DESCRIPTION "TASK DESCRIPTION"

,PTV1.TASK_NUMBER "PARENT TASK NUMBER"

,PTC.TXN_CTRL_REFERENCE

,PTC.CHARGEABLE_FLAG

,PTC.BILLABLE_FLAG

,PTC.CAPITALIZABLE_FLAG

,PET.EXPENDITURE_TYPE_NAME

,PEC.EXPENDITURE_CATEGORY_NAME

,PCT.CLASS_CODE

,PCC.CLASS_CATEGORY

FROM

PJF_PROJECTS_ALL_VL PPA

,PJF_TASKS_V PTV

,PJF_TASKS_V PTV1

,HR_ORGANIZATION_UNITS HRU

,PJF_PROJECT_TYPES_TL PPT

,XLE_ENTITY_PROFILES XLE

,PJC_TRANSACTION_CONTROLS PTC

,PJF_EXP_TYPES_TL PET

,PJF_EXP_CATEGORIES_TL PEC

,PJF_CLASS_CATEGORIES_TL PCC

,PJF_CLASS_CODES_TL PCT

,PJF_PROJECT_CLASSES PPC

WHERE 1=1

AND PPA.PROJECT_ID=PTV.PROJECT_ID

AND PTV1.PARENT_TASK_ID(+) = PTV.TASK_ID

AND PPA.CARRYING_OUT_ORGANIZATION_ID=HRU.ORGANIZATION_ID(+)

AND PPT.PROJECT_TYPE_ID=PPA.PROJECT_TYPE_ID

AND PPA.SEGMENT1='158901-230'

AND XLE.LEGAL_ENTITY_ID = PPA.LEGAL_ENTITY_ID

AND PPA.PROJECT_ID=PTC.PROJECT_ID(+)

AND PTC.TASK_ID(+) = PTV.TASK_ID

AND PET.EXPENDITURE_TYPE_ID = PTC.EXPENDITURE_TYPE_ID(+)

AND PET.LANGUAGE ='US'

AND NVL(PEC.LANGUAGE,'US') ='US'

AND PTC.EXPENDITURE_CATEGORY_ID =  PEC.EXPENDITURE_CATEGORY_ID(+)

AND PPC.CLASS_CATEGORY_ID  = PCC.CLASS_CATEGORY_ID(+)

AND PPC.PROJECT_ID(+) = PPA.PROJECT_ID 

AND PPC.CLASS_CODE_ID = PCT.CLASS_CODE_ID(+)

ORDER BY TO_CHAR(PPA.PROJECT_ID)


Oracle Fusion - Cost Lines and Expenditure Item link in Projects

SELECT   ccd.transaction_id,ex.expenditure_item_id,cacat.serial_number FROM fusion.CST_INV_TRANSACTIONS cit,   fusion.cst_cost_distribution_...