select fcpt.user_concurrent_program_name, fcp.concurrent_program_name from
fnd_concurrent_programs_tl fcpt,
fnd_concurrent_programs fcp
where
fcp.CONCURRENT_PROGRAM_ID= fcpt.CONCURRENT_PROGRAM_ID
and
fcpt.created_by =1706
Profile Value in oracle apps
If you want the query to display the data from different org_id's dont use org_id hardcoded in your query. Use Profile value for this.
SELECT sum(AIA.invoice_amount) INVOICE_AMT
,sum(NVL(AIPA.amount,APSA.amount_remaining)) PAYMENT_AMT
FROM
ap_invoices_all AIA
,ap_checks_all ACA
,ap_invoice_payments_all AIPA
,ap_payment_schedules_all APSA
,pa_projects_all PPA
WHERE AIA.invoice_id = AIPA.invoice_id (+)
AND APSA.invoice_id = AIA.invoice_id
AND AIA.vendor_id = NVL(:P_SUPPLIER_NAME,AIA.vendor_id)
AND AIA.vendor_site_id = NVL(:P_SUPPLIER_SITE_NAME, AIA.vendor_site_id)
AND NVL(ACA.check_date,SYSDATE) >= NVL(:P_FROM_DATE,NVL(ACA.check_date,SYSDATE))
AND NVL(ACA.check_date,SYSDATE) <= NVL(:P_TO_DATE,NVL(ACA.check_date,SYSDATE))
AND AIPA.check_id = ACA.check_id (+)
AND AIA.project_id = PPA.project_id (+)
AND AIA.invoice_type_lookup_code = 'STANDARD'
AND AIA.org_id = FND_PROFILE.value('ORG_ID')
GROUP BY AIA.vendor_id, AIA.vendor_site_id,aia.org_id
fnd_concurrent_programs_tl fcpt,
fnd_concurrent_programs fcp
where
fcp.CONCURRENT_PROGRAM_ID= fcpt.CONCURRENT_PROGRAM_ID
and
fcpt.created_by =1706
Profile Value in oracle apps
If you want the query to display the data from different org_id's dont use org_id hardcoded in your query. Use Profile value for this.
SELECT sum(AIA.invoice_amount) INVOICE_AMT
,sum(NVL(AIPA.amount,APSA.amount_remaining)) PAYMENT_AMT
FROM
ap_invoices_all AIA
,ap_checks_all ACA
,ap_invoice_payments_all AIPA
,ap_payment_schedules_all APSA
,pa_projects_all PPA
WHERE AIA.invoice_id = AIPA.invoice_id (+)
AND APSA.invoice_id = AIA.invoice_id
AND AIA.vendor_id = NVL(:P_SUPPLIER_NAME,AIA.vendor_id)
AND AIA.vendor_site_id = NVL(:P_SUPPLIER_SITE_NAME, AIA.vendor_site_id)
AND NVL(ACA.check_date,SYSDATE) >= NVL(:P_FROM_DATE,NVL(ACA.check_date,SYSDATE))
AND NVL(ACA.check_date,SYSDATE) <= NVL(:P_TO_DATE,NVL(ACA.check_date,SYSDATE))
AND AIPA.check_id = ACA.check_id (+)
AND AIA.project_id = PPA.project_id (+)
AND AIA.invoice_type_lookup_code = 'STANDARD'
AND AIA.org_id = FND_PROFILE.value('ORG_ID')
GROUP BY AIA.vendor_id, AIA.vendor_site_id,aia.org_id