Showing posts with label ESS Job. Show all posts
Showing posts with label ESS Job. Show all posts

Saturday, 14 May 2022

SQL Queries to Track FAH Import Accounting Transactions process ID , Create Accounting for Data Set Process ID and Others

Query 1: Link Import Accounting Transactions with Create Accounting for Data Set

select * from FUSION_ORA_ESS.REQUEST_history where requestid in (select requestid from FUSION_ORA_ESS.REQUEST_PROPERTY where name = 'submit.argument23' and value = 'XLA_LOAD_<Import Accounting Transactions request ID>')

Query 2: Link Create Accounting for Data Set with Create Accounting: Subprocess and Post Subledger Journal Entries

select decode(name,'apps.fin.xla.xlafsnrpt.childRequests','Create Accounting Subprocess','apps.fin.xla.xlafsnrpt.gltparent','Post Subledger Journal Entries'),value from ESS_REQUEST_PROPERTY where requestid = <Create Accounting for Data Set request ID from Query 1> and name in ('apps.fin.xla.xlafsnrpt.gltparent','apps.fin.xla.xlafsnrpt.childRequests')

Query 3. Link Post Subledger Journal Entries with Post Subledger Journal Entries: Subprocess

select DECODE(name,'apps.fin.xla.xlagltrn.childRequests','Post Subledger Journal Entries Subprocess') jobname,value from ess_request_property where requestid = <Post Subledger Journal Entries request ID from Query 2> and name ='apps.fin.xla.xlagltrn.childRequests'

Query 4. Link Create Accounting: Subprocess with Update Subledger Accounting Balances

select prop1.requestid XLABABUP, hist1.requestid CASUBPROCESS from fusion_ora_ess.request_history hist1 , fusion_ora_ess.request_property prop1, fusion_ora_ess.request_history hist2 , fusion_ora_ess.request_property prop2 WHERE prop2.name = ('submit.argument8') and prop2.requestid = <a Create Accounting Subprocess request     ID from Query 2> and hist1.requestid = prop2.requestid and hist1.name = 'XLAFSNAPENG' and prop1.name = ('submit.argument3') and prop1.requestid = hist2.requestid and prop1.value = prop2.value and hist2.name = 'XLABABUP'

Query 5. Link Import Accounting Transactions with Create Accounting for Data Set, Post Subledger Journal Entries and Update Subledger Accounting Balances 

select base4.zipfile, substr(base4.loadfile,1,16) loadfile,base4.cadatasetid cadataset,

(select count(1) from fusion.xla_fsn_events_int where parent_request_id <> -1

and report_request_id = cadatasetid) event_count,

(select value from fusion_ora_ess.request_property

where requestid = cadatasetid

and name = 'submit.argument3') application_id,

(select value from fusion_ora_ess.request_property

where requestid = cadatasetid

and name = 'submit.argument4') ledger_id,

substr(replace(base4.casubprocess_ids,',','-'),1,300) casubprocess,

to_number(base4.accounting_batch_id) accountingbatchid,

to_number(base4.gltp) GLTParentProcessId,

to_number(base4.XLABABUP) XLABABUP,

prop5.value gltw ,

hist3.processstart importstarttime,

hist3.processend importendtime,

hist3.processend - hist3.processstart importspendtime,

base4.castart,

base4.caend,

base4.caend -base4.castart,

hist2.processstart xlababup_start_time,

hist2.processend xlababup_end_time,

hist2.processend - hist2.processstart xlababupspendtime,

nvl(hist2.processend,base4.caend) - hist3.processstart total_time_taken

from fusion_ora_ess.request_property prop5,

fusion_ora_ess.request_history hist2,

fusion_ora_ess.request_history hist3,

(select base3.*,prop4.value gltp from fusion_ora_ess.request_property prop4, (SELECT base2.*,

prop3.requestid XLABABUP

FROM fusion.ess_request_property prop3,(

SELECT base.loadfile,

base.zipfile,

base.cadatasetid,

base.castart,

base.caend,

base.process_ids casubprocess_ids,

value accounting_batch_id

FROM fusion.ess_request_property prop2,

(SELECT zipfile,

loadfile,

cadatasetid,

castart,

caend,

process_name,

process_ids

FROM

(SELECT base0.*,

--hist.requestid cadatasetid ,

DECODE(prop.name,'apps.fin.xla.xlafsnrpt.childRequests','Create Accounting

Subprocesses' ) process_name,

prop.value process_ids

FROM fusion.ESS_REQUEST_PROPERTY prop,

fusion_ora_ess.request_history hist,

(SELECT hist0.requestid cadatasetid ,

prop0.value loadfile,

hist0.processstart castart,

prop1.value zipfile,

hist0.processend caend

FROM FUSION_ORA_ESS.REQUEST_history hist0,

FUSION_ORA_ESS.REQUEST_PROPERTY prop0,

FUSION_ORA_ESS.REQUEST_PROPERTY prop1

WHERE hist0.requestid = prop0.requestid

AND prop0.name = 'submit.argument23'

AND prop0.value LIKE 'XLA_LOAD_%'

and prop1.requestid = substr(prop0.value,10,length(prop0.value))

and prop1.name = 'submit.argument2'

AND TRUNC(hist0.processstart)> to_date(<Start Date of the Import Accounting

Transactions request>,'dd-MON-YYYY')

) base0

WHERE prop.requestid = hist.requestid

AND prop.name IN ('apps.fin.xla.xlafsnrpt.childRequests')

AND hist.requestid = base0.cadatasetid

)

) base

WHERE prop2.name IN ('submit.argument8')

AND prop2.requestid = DECODE (instr(base.process_ids,',',1), 0,

base.process_ids,SUBSTR(base.process_ids,0,instr(base.process_ids,',',1)-1))

AND base.process_name = 'Create Accounting Subprocesses') base2

WHERE prop3.value (+)= base2.accounting_batch_id

AND prop3.name (+)= 'submit.argument3') base3

WHERE base3.cadatasetid = prop4.requestid

AND prop4.name = 'apps.fin.xla.xlafsnrpt.gltparent'

) base4

where base4.gltp = prop5.requestid

and prop5.name = 'apps.fin.xla.xlagltrn.childRequests'

and hist2.requestid (+) = to_number(base4.XLABABUP)

and hist3.requestid = to_number(substr(base4.loadfile,10))

ORDER BY cadatasetid


To View the Output of an ESS Jobs Submitted By Another User Based on Fusion Custom Role

For example one user is running a request and multiple users want to see the output.

  1. Login using user who has IT SECURITY MANAGER role assigned.
  2. Choose Navigator -> Security Console.
  3. Choose administration --> manage database resources
    • Search on object ESS_REQUEST_HISTORY
    • Click edit on ESS_REQUEST_HISTORY
    • Click condition then Add
    • Create the database condition and save and submit.
          Edit and add the condition needed for the security policy name = ess condition with a sql predicate . Substitute             your job definition in place of the sample job definition below.
EXISTS
(select 1 from dual)
and DEFINITION in (
'JobDefinition://oracle/apps/ess/hcm/users/SyncRolesJob'
)

     4.  Create a job role

    • Name: test_ess
    • Code: ess
    • Description: testing for ess
    • Role Category: HCM - Job Roles
    5. Create a data security policy
    • policy name = ess_request_history
    • Policy Description = ?????
    • Data Resource = ESS_REQUEST_HISTORY
    • Privilege = read; ESS_REQUEST_READ; ESS_REQUEST_OUTPUT_READ
    • data set = select by instance set
    • Condition = choose the condition created in step 3 (under manage database resources) ess condition
  • In the similar way can be given different privileges like:

     
    ActionEffect
    ESS_REQUEST_READRead the request, get request state, and get details.
    ESS_REQUEST_UPDATEUpdate the request.
    ESS_REQUEST_HOLDHold request execution.
    ESS_REQUEST_CANCELCancel a request execution.
    ESS_REQUEST_LOCKLock a request.
    ESS_REQUEST_RELEASERelease the lock on a request.
    ESS_REQUEST_DELETEDelete a request.
    ESS_REQUEST_PURGEPurge a request.
    ESS_REQUEST_OUTPUT_READView the output of a request.
    ESS_REQUEST_OUTPUT_DELETEDelete the output of a request.
    ESS_REQUEST_OUTPUT_UPDATEUpdate the output of a request.

    6.  Add the user
    7.  Run the ESS process: Import User and Role Application Security Data


Fusion General Ledger: Currency creation Setup/ Configuration

Definition: A system of money in general use in a particular country called currency Types of currencies Functional currency/Accounted curre...