Friday 28 April 2023

BIP Report Security -Security data access query

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

Security data access query for BU :-

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

 (
 SELECT   hou.name,
          hou.organization_id
 FROM     fun_user_role_data_asgnmnts fu,
          hr_operating_units hou
 WHERE    fu.user_guid = fnd_global.user_guid
 AND      fu.active_flag = 'Y'
 AND      hou.organization_id = fu.org_id
 AND      fu.role_name IN ( 'ORA_PO_PROCUREMENT_MANAGER_JOB',
                           'ORA_PO_BUYER_JOB' )
 GROUP BY -- group by put for each role has same bu access so values getting repeated so group by put
          hou.name,
          hou.organization_id,
 order by 1 )

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

Security Data Access Query for IO :-

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

Inventory Specific roles


(SELECT iop.organization_id

 FROM   fun_user_role_data_asgnmnts fu,
        per_users pu,
        inv_org_parameters iop
 WHERE  1 = 1
        AND iop.organization_id = fu.inv_organization_id
        -- this id will change only
        AND fu.role_name IN ( 'ORA_INV_WAREHOUSE_MANAGER_JOB' )
        AND fu.active_flag = 'Y'
        AND fu.user_guid = pu.user_guid
        AND pu.user_guid = fnd_global.user_guid
 GROUP  BY
-- group by put for each role has same IO access so values getting repeated so group by put
iop.organization_id
) 


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

Security Data Access Query for GL Ledger :-

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

SELECT gl.name,
       gl.ledger_id
FROM   gl_ledgers gl
WHERE  gl.ledger_id IN (SELECT asa.ledger_id
                        FROM   fun_user_role_data_asgnmnts urda,
                               gl_access_sets gs,
                               gl_access_set_assignments asa
                        WHERE  1 = 1
                               AND urda.user_guid = fnd_global.user_guid
                               AND
              urda.role_name IN ( 'ORA_GL_GENERAL_ACCOUNTANT_JOB',
                                  'ORA_GL_GENERAL_ACCOUNTING_MANAGER' )
                               AND urda.active_flag = 'Y'
                               AND urda.access_set_id = gs.access_set_id
                               AND gs.access_set_id = asa.access_set_id
                        GROUP  BY
                       -- group by put as each role has same ledger access so value gets repeated so group by put
                       asa.ledger_id)
ORDER  BY 1 

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

Security Data Access Query for FA Book :-

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

(SELECT bc.book_type_code
 FROM   fun_user_role_data_asgnmnts da,
        fa_book_controls bc
 WHERE  1 = 1
        AND da.user_guid = fnd_global.user_guid
        AND da.role_name IN ( 'ORA_FA_ASSET_ACCOUNTANT_JOB' )
        AND da.active_flag = 'Y'
        AND da.book_id = bc.book_control_id
 GROUP  BY
-- group by put as each role has same asset book so value get repeated so group by put
bc.book_type_code
 ORDER  BY bc.book_type_code) 

Wednesday 26 April 2023

What is Oracle Transactional Business Intelligence (OTBI)?

 Oracle Transactional Business Intelligence (OTBI) is an oracle reporting tools delivers a flexible and easy-to-use analysis tool that helps you to gain real-time insight into transactional data, understand data patterns and be alerted to key events and data anomalies.

OTBI is a fusion specific reporting tool, used by top level managements of organizations without the need for any technical knowledge. It is a flexible and easy to use analysis tool that helps gain real time insight into transactional data. These features make it extremely valuable to the top management.

OTBI

OTBI enables real-time reporting on Oracle Fusion Applications by leveraging web services to communicate with OLTP systems via ADF Entity and View Objects. In addition, OTBI offers tight security integration with the corresponding Oracle Fusion Application. With OTBI, there is no need to worry about customizing the reporting layer whenever new columns are customized in the transaction system as OTBI already supports automatic key and descriptive flex fields’ extension

Key Feature-

  • Oracle Transactional Business Intelligence (OTBI) is fully integrated with Fusion HCM and requires no additional system or security configuration. 
  • Fusion HCM uses trees to manage employee and organizational structure. Trees are flattened and propagated to Oracle Transactional Business Intelligence (OTBI) as reporting hierarchies so you can easily analyze data by rolling up or drilling the various hierarchies i.e. supervisor, department or position hierarchy, etc.
  • Oracle Transactional Business Intelligence (OTBI) supports multi-language translation. The reporting user interface and metadata can switch to your chosen local language. 
  • You can easily embed an Oracle Transactional Business Intelligence (OTBI) report or dashboard in a Fusion page through Personalization.

Development of Simple Oracle Transactional Business Intelligence (OTBI) Report

We will develop the report for below details:

• Person Number

• Date of Birth

• First Name

• Last Name

• Grade Name

• Job Name

• Department

To achieve this requirement follow the below steps.

Step 1 – 

Open the Oracle Fusion Application.

Step 2 – Navigation

Follow the below navigation,

Navigator -> Tools -> Report & Analytics -> Click on Browse Catalog

Step 3 – Creation of Simple Report 

Click on New and then Analysis

It will pop up list of predefined Subject Areas in Oracle Fusion. Select the appropriate Subject Area to develop the OTBI report. As per our requirement we are going to select “Worker Management – Worker Assignment Real Time”

It will open the report development page.

It contains 3 sections:

1) Subject Area – 

It holds all the selected subject area details.

2) Selected Columns – 

In this section we can add columns required for report.

3) Filters – 

Using this section we can add filter to restrict the data in report.

Step 4 – Adding Column in Report

As per our requirement add the columns.

Person Number, DOB, First name, Last Name are related to Worker.

Expand the Selected Subject Area then Search for Worker Folder to add above columns.

Expand Worker Folder add above mentioned columns like Person Number, DOB etc.

Then add Job, Grade and Department Name columns from respective folders. 

To run report click on results. It will give you the output.

Step 5 – Change the Column Heading

Click Column Setting -> Column Properties -> Column Format (tab)

Enable the Custom Heading check box.

Enter the required Column Heading.

Run the report again to check if column heading are changed or not.

Step 6 – Add Filter on OTBI Report.

Suppose we need to apply filter on Person Number then click Column Setting of Person Number, select Filter.

It popups filter details window. In this you can mention how you need to apply the filter based on your requirement. Run the report to check if filter is working fine.

Step 7- Save the OTBI Report.

Save the report in My Folder. You can find your report in My Folder.

Limitations of OTBI.

Access to Historical Data

Organizations that need to store years of operational data to support legal requirements may have difficulties accessing their historical data using OTBI. 

Advanced Analytics

Organizations today want to leverage their existing data assets to forecast future trends

Exporting to Excel

Excel continues to be an essential tool for business users. They need to be able to securely access and export data. However, OTBI limits Excel exports to 25,000 rows, making it a cumbersome process to work around the limitation.

BIP Report -Script to get item EFF data

 PDH-Item FUTURE_HIERARCHY Eff Attribute Report

-------------------------------------------------


Report query

---------------

SELECT esi.item_number      product_id,

       eseb.attribute_char3 product_type,

       eseb.attribute_char7 effective_date,

       eseb.attribute_char5 reason_code,

       eseb.attribute_char4 list_price_impact,

       decode(eseb.attribute_char6,

              'Orderable-Decrease','D',

              'Orderable-Increase','I',

              'Non-Orderble','E') increase_decrease,

       eseb.attribute_char8       buc_approver,

       eseb.attribute_char13      doc_id

FROM   ego_item_eff_b eseb,

       egp_system_items_b esi,

       egp_item_classes_tl eict,

       inv_org_parameters iop,

       egp_system_items_tl esit

WHERE  1 = 1

       --And esi.Item_number ='APR5PID2'

AND    eseb.inventory_item_id = esi.inventory_item_id

AND    eseb.organization_id = esi.organization_id

AND    eict.item_class_id = esi.item_catalog_group_id

AND    iop.organization_id = esi.organization_id

AND    esit.inventory_item_id = esi.inventory_item_id

AND    esit.organization_id = esi.organization_id

AND    esit.LANGUAGE = 'US'

AND    eict.LANGUAGE = 'US'

AND    eseb.acd_type = 'PROD'

AND    esi.acd_type = 'PROD'

AND    iop.organization_code='GLO'

AND    eict.item_class_name='Billing'

AND    eseb.context_code = 'FUTURE_HIERARCHY'

AND    (

              eseb.attribute_char13 IN ( :P_DOC_ID )

       OR     coalesce(:P_DOC_ID, NULL)IS NULL )

AND    (

              eseb.attribute_char14 IN ( :P_DOC_AUTHOR)

       OR     coalesce(:P_DOC_AUTHOR, NULL)IS NULL )

--------------------Bursting Query

SELECT doc_id                                                   AS KEY,

       'CSCO_FUT_HEIRARCHY_RPT'                                    template,

       'en-US'                                                     locale,

       'XLSX'                                                      output_format,

       'EMAIL'                                                     del_channel,

       'Future_heirarchy'                                          output_name,

       'sambchin@cisco.com,gagoud@cisco.com,chetverm@cisco.com'    parameter1,

       'borajesh@cisco.com'                                        parameter2,

       'sambchin@cisco.com'                                        parameter3,

       'Future Heirarchy values for the Item '                     parameter4, --Subject

       'Dear customer PFA attachment'                              parameter5,

       'true'                                                      parameter6

FROM   (

              SELECT eseb.attribute_char1 family,

                     eseb.attribute_char2 sub_group,

                     eseb.attribute_char3 product_type,

                     eseb.attribute_char4 list_price_impact,

                     eseb.attribute_char5 reason_code,

                     decode(eseb.attribute_char6,

                            'Orderable-Decrease','D',

                            'Orderable-Increase','I',

                            'Non-Orderble','E') increase_decrease,

                     eseb.attribute_char7       effective_date,

                     eseb.attribute_char8       buc_approver,

                     esi.item_number            product_id,

                     eseb.attribute_char13      doc_id

              FROM   ego_item_eff_b eseb,

                     egp_system_items_b esi,

                     egp_item_classes_tl eict,

                     inv_org_parameters iop,

                     egp_system_items_tl esit

              WHERE  1 = 1

                     --And esi.Item_number ='APR5PID2'

              AND    eseb.inventory_item_id = esi.inventory_item_id

              AND    eseb.organization_id = esi.organization_id

              AND    eict.item_class_id = esi.item_catalog_group_id

              AND    iop.organization_id = esi.organization_id

              AND    esit.inventory_item_id = esi.inventory_item_id

              AND    esit.organization_id = esi.organization_id

              AND    esit.LANGUAGE = 'US'

              AND    eict.LANGUAGE = 'US'

              AND    eseb.acd_type = 'PROD'

              AND    esi.acd_type = 'PROD'

              AND    iop.organization_code='GLO'

              AND    eict.item_class_name='Billing'

              AND    eseb.context_code = 'FUTURE_HIERARCHY'

              AND    (

                            eseb.attribute_char13 IN ( :P_DOC_ID )

                     OR     coalesce(:P_DOC_ID, NULL)IS NULL )

              AND    (

                            eseb.attribute_char14 IN ( :P_DOC_AUTHOR)

                     OR     coalesce(:P_DOC_AUTHOR, NULL)IS NULL ) )

BIP Report - SQL script to get UCM file details foe the given Content id

 

select DDOCNAME, DDOCAUTHOR

from

revisions 

where 1=1

AND DDOCTITLE like 'PDH_ITEM_CAT_MM%'

AND (DDOCNAME IN (:p_DOCID) OR COALESCE(:p_DOCID, NULL)IS NULL)

AND DCREATEDATE >=To_date(:p_date, 'MM-dd-yyyy HH24:MI:SS')


output 


<?xml version="1.0" encoding="UTF-8"?>

<!--Generated by Oracle Analytics Publisher -Data engine, datamodel:_Custom_Cisco_Custom_SCM_Integrations_Cs_GetItem_Report_CS_UCMREPORT_DM_xdm -->

-<DATA_DS>

<P_DATE>09-30-2022</P_DATE>

<P_DOCID/>

-<G_1>

<DDOCNAME>UCMFA01690040</DDOCNAME>

<DDOCAUTHOR>name@gmail.com</DDOCAUTHOR>

</G_1>

-<G_1>

<DDOCNAME>UCMFA01689832</DDOCNAME>

<DDOCAUTHOR>name@gmail.com</DDOCAUTHOR>

</G_1>

</DATA_DS>

Tuesday 25 April 2023

HDL (HCM Data Loader)

 

HDL stands for HCM Data Loader. It provides the flexible and efficient way to load data into Oracle Fusion HCM.

àIt performs complex data transformations.

àUsing HDL, we can load data into various HCM objects such as:

Locations,

Job Profile,

Worker or Employee,

Assignments and more.

It supports various formats such as: CSV,XLS,XLSX

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

Features of HDL are:

Managing and Validating of your data,

Data Transformation,

Data Mapping,

Data Validation,

Error Handling.

We can use HDL to perform batch uploads(import), updates, deletions and export data from oracle Fusion HCM.

Process:

àLog in to HCM implementation user,click on “My Client Groups”-à”Data Exchange”.

àIn Data Exchange, click on “View Business Objects”.


         

Search for the Business Object called "Location."

è Download the template called “Location.dat”

è Right click on Location.dat file and open with Notepad++.

You will be getting the data and from that choose the attributes in which you want to load the data:


Save the file in the same path without changing the name.

è Right click on “Location.dat”àChoose “Send To ”à Compressed (zipped folder) and rename it.


Now, go back to “Data Exchange” and click on “Import and Load Data”.







àClick on “Import File”



àChoose the file and browse the (Zipped) folder.

Once you upload the folder, click on “Refresh."



àImport is successfully when you see green check mark under import/load status.

àNow, click on “Recent File Loads”.