Friday, 17 April 2015

How to find the concurrent program and concurrent program short name using the query

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
             

No comments:

Post a Comment

Uploading PO Attachments from EBS to FTP Server

 create or replace PROCEDURE xx_upload_po_attachment(errbuff out varchar2, retcode out number)  IS CURSOR cur_new_attmt IS    select ponumbe...