[Fusion] How to use multi selection LOV in Oracle Fusion BIP Report?


  

 In this post we will see how to use multi select LOV in Oracle Fusion BIP Report.

 

  • Login to Fusion BI Catalog of your fusion instance by using the below URL:

https://<server>.fa.ocs.oraclecloud.com/analytics/saw.dll?bieehome

  • Once logged in, create new Data Model by clicking Catalog -> Data Model
 
  • It will present you untitled Data Model. Now, click on New Data Set button and choose SQL Query as type of the Data Set from the list.

  • Enter the name of Data Set like Q1 and choose Data Source as ApplicationDB_FSCM and provide the SQL query
  • We have the below query

SELECT
     aia.invoice_id
    ,aida.invoice_distribution_id
    ,aila.line_number
    ,(SELECT hou.name FROM HR_OPERATING_UNITS hou where hou.organization_id=aia.org_id) org_name
    ,(   SELECT ps.vendor_name FROM poz_suppliers_v ps
         WHERE ps.vendor_id=aia.vendor_id
     ) vendor_name
    ,(   SELECT pss.vendor_site_code FROM poz_supplier_sites_v pss
         WHERE pss.vendor_id=aia.vendor_id AND pss.vendor_site_id=aia.vendor_site_id
     ) vendor_site_code
    ,aia.invoice_num
    ,aia.description    invoice_desc
    ,aia.invoice_type_lookup_code
    ,aia.source
    ,aia.invoice_date
    ,aia.invoice_amount
    ,aia.amount_paid
    ,aia.payment_status_flag
    ,ap_invoices_pkg.Get_approval_status(
        aia.invoice_id, aia.invoice_amount,
        aia.payment_status_flag, aia.invoice_type_lookup_code
    ) approval_status
    ,ap_invoices_pkg.Get_posting_status(aia.invoice_id) accounting_status
    ,aia.gl_date
    ,aia.invoice_currency_code
    ,aia.payment_currency_code
    ,aia.accts_pay_code_combination_id
    ,(  SELECT fnd_flex_ext.get_segs('GL', 'GL#', gcc.chart_of_accounts_id, gcc.code_combination_id)
    FROM gl_code_combinations gcc where gcc.code_combination_id=aia.accts_pay_code_combination_id
     ) code_combination
    ,aila.amount
FROM    
     ap_invoices_all                aia
    ,ap_invoice_lines_all           aila
    ,ap_invoice_distributions_all   aida
WHERE 1=1
AND aia.invoice_id      = aila.invoice_id
AND aila.invoice_id     = aida.invoice_id
AND aila.line_number    = aida.invoice_line_number
AND aia.org_id      = :pOrgId
  •  Now click OK button
  •  G_1 group will be added, click OK button again
  • This will add the parameter 
  • Now, go to List of Values section and add new LOV like below. Here you need to enter the Name of LOV and select Type as SQL Query and select Data Source as ApplicationDB_FSCM
SELECT hou.name, hou.organization_id FROM HR_OPERATING_UNITS hou order by 1
 


In LOV there are two things:
  • Key Value - It can be like ID field
  • Key Label - It can be like description
So like in this LOV we will display Org Name in LOV, but when we select any Org from LOV, it will pass Organization Id to the parameter. 
 
In this one we have Org_Name as Key Label and Organization_Id as Key value. 

First column of LOV query will be Key Label and second will be Key Value always, like:

SELECT key_label , key_value FROM table
  • So, now use this LOV in parameter like below:
 
  •  Parameter type should be Menu, and then select OrgLOV in List of Values field
  •  Also, select Multi Selection option and select Can select all & NULL Value Passed
  •  Now, click on View Data button
  • Select any Org Name from the list
  • Once you select any single Org Name from list you will be able to get the data. But in case you select multiple Org Names, you will not be able to get the data
  • To fix this problem we have to change our query like below:
SELECT
     aia.invoice_id
    ,aida.invoice_distribution_id
    ,aila.line_number
    ,(SELECT hou.name FROM HR_OPERATING_UNITS hou where hou.organization_id=aia.org_id) org_name
    ,(   SELECT ps.vendor_name FROM poz_suppliers_v ps
         WHERE ps.vendor_id=aia.vendor_id
     ) vendor_name
    ,(   SELECT pss.vendor_site_code FROM poz_supplier_sites_v pss
         WHERE pss.vendor_id=aia.vendor_id AND pss.vendor_site_id=aia.vendor_site_id
     ) vendor_site_code
    ,aia.invoice_num
    ,aia.description    invoice_desc
    ,aia.invoice_type_lookup_code
    ,aia.source
    ,aia.invoice_date
    ,aia.invoice_amount
    ,aia.amount_paid
    ,aia.payment_status_flag
    ,ap_invoices_pkg.Get_approval_status(
        aia.invoice_id, aia.invoice_amount,
        aia.payment_status_flag, aia.invoice_type_lookup_code
    ) approval_status
    ,ap_invoices_pkg.Get_posting_status(aia.invoice_id) accounting_status
    ,aia.gl_date
    ,aia.invoice_currency_code
    ,aia.payment_currency_code
    ,aia.accts_pay_code_combination_id
    ,(  SELECT fnd_flex_ext.get_segs('GL', 'GL#', gcc.chart_of_accounts_id, gcc.code_combination_id)
    FROM gl_code_combinations gcc where gcc.code_combination_id=aia.accts_pay_code_combination_id
     ) code_combination
    ,aila.amount
FROM    
     ap_invoices_all                aia
    ,ap_invoice_lines_all           aila
    ,ap_invoice_distributions_all   aida
WHERE 1=1
AND aia.invoice_id      = aila.invoice_id
AND aila.invoice_id     = aida.invoice_id
AND aila.line_number    = aida.invoice_line_number
AND (aia.org_id IN (:pOrgId) OR 'All' IN (:pOrgId ||'All'))
  • So, by using the above condition in WHERE clause you will be able to accept multiple selections for the parameter



Comments

All Categories

Call Fusion BIP Report2 Change Password1 Code Combinations2 Compute Instance2 CTE1 Customer1 Data Aggregation2 Database5 Date Conversion1 DB Adapter2 Decryption1 Development1 EBS4 Encryption1 ESS Jobs3 Examine1 FBDI3 Fusion APIs1 Fusion BIP7 GIT2 GL3 GL Journals1 GL_DAILY_CONVERSION_TYPES1 GL_DAILY_RATES1 ICS1 Identity Domain1 Integrations1 Java1 Journal Import1 Keys1 Legal Entity1 LookupTypeLOV1 LOV1 LOVs1 MultiPartAPIs1 Networking1 NVL2 NVL in OIC2 OCI11 OCI Billing1 OCI Compute5 OCI Cost Management1 OCI Events Service1 OCI Free Tier3 OCI Notifification Service1 OCI Security3 OIC4 OIC Mapper2 Oracle26 Oracle ADF17 Oracle APEX1 Oracle Apps59 Oracle Apps R126 Oracle ATP1 Oracle BIP8 Oracle Cloud12 Oracle Cloud Free Tier1 Oracle cloud Infrastructure9 Oracle Cloud Security2 Oracle Cloud VM1 Oracle DB4 oracle ebs5 Oracle ERP4 Oracle ERP Adapter2 Oracle ERP Cloud7 Oracle financials2 Oracle Forms1 Oracle Fusion57 Oracle Fusion BIP4 Oracle Fusion ERP17 Oracle Fusion Financials18 Oracle Integration Cloud3 Oracle OAF17 Oracle OCI14 Oracle OIC22 Oracle SOA 12c10 Oracle SQL17 Oracle VBCS1 Oracle VBS2 Oracle Visual Builder Cloud Service1 Oracle Visual Builder Studio2 Oracle Workflow Notifications1 Others10 Payables2 Payables Import1 Properties1 R121 Register BIP as ESS Job1 Reset Password1 Responsibility1 REST4 Security List1 Site Map1 SOAP2 SOAP API2 SOAP UI3 SQL16 SQL Functions3 SQL Queries14 SQL Query8 SQL Tips3 SSH1 TCA1 Value Sets1 VBCS1 Virtual Machine2 Virtual Machines1 XML1 XSLT1
Show more