Wednesday, 28 May 2025

Query to get ESS Job Last Run Date

 SELECT NVL(Max(erh.processstart), NULL) last_run_date

        FROM   ess_request_history erh,

               ess_request_property erp1

        WHERE  erh.executable_status = 'SUCCEEDED'

               AND erp1.requestid = erh.requestid

              --AND erp1.name = 'submit.argument1'

               AND erh.DEFINITION =

       'JobDefinition://oracle/apps/ess/custom/scm/sourcing/XXPurchaseAgreementNumbers_Sirion'

Monday, 12 May 2025

Query to get ESS Request details(Oracle Fusion)

 SELECT UNIQUE rh1.requestid Child_requestid,rp1.value job_id --,rh.PARENTREQUESTID request_id

  FROM fusion.ess_request_history rh1, fusion.ess_request_property rp1

WHERE rh1.requestid = rp1.requestid

and rp1.name ='outputOverrideParameter'

--and rh.PARENTREQUESTID in (

AND EXISTS (

SELECT UNIQUE rh.requestid Child_requestid --,rh.PARENTREQUESTID request_id

  FROM fusion.ess_request_history rh, fusion.ess_request_property rp

WHERE rh.requestid = rp.requestid

--and rh.requestid = :P_REQ_ID

AND (rh.requestid  = rh1.PARENTREQUESTID OR rh.requestid  = rh1.requestid)

and rh.PARENTREQUESTID = :P_REQ_ID

   )

and rownum = 1

Sunday, 11 May 2025

To Display the Run time and instance Details(Oracle Fusion)

 SELECT 

TO_CHAR (:ACCOUNTING_P_FROM_DATE, 'DD-MON-RRRR') From_GL_Date,

TO_CHAR (:ACCOUNTING_P_TO_DATE, 'DD-MON-RRRR') To_GL_Date,

NVL(:P_BU_NAME,'ALL') BU_NAME,

NVL(:P_SOURCE,'ALL') SOURCE,

TO_CHAR (:INV_P_FROM_DATE, 'DD-MON-RRRR') From_Invoice_Date,

TO_CHAR (:INV_P_TO_DATE, 'DD-MON-RRRR') To_Invoice_Date,

TO_CHAR (SYSDATE + 3/24, 'DD-MM-YYYY HH12:MI:SS AM') PRINT_DATE,

to_char(sysdate,'DD-MON-RRRR HH24:MI:SS') as RUN_DATE,

((select SUBSTR(external_virtual_host,INSTR( external_virtual_host, '-', 1,2 )+1,9) from ask_deployed_domains WHERE

deployed_domain_name='FADomain')) instance,

FND_GLOBAL.USER_NAME as RUN_BY

FROM DUAL

Query to extract the user details(Oracle Fusion)

 SELECT 

 pur.username USER

,papf.person_number EMP_NUM

,ppnf.first_name EMP_FIRST_NAME

,ppnf.last_name EMP_LAST_NAME 

,DECODE(SUSPENDED,'Y', 'Inactive User','N', 'Active User') USER_STATUS

,ASSIGNMENT_STATUS_TYPE EMP_STATUS

FROM 

 per_users pur 

,per_person_names_f ppnf

,per_all_people_f papf 

,per_all_assignments_f paaf

WHERE pur.person_id = ppnf.person_id 

AND pur.person_id = papf.person_id

AND paaf.person_id = papf.person_id 

AND name_type = 'GLOBAL'

AND TRUNC(SYSDATE) BETWEEN ppnf.effective_start_Date AND ppnf.effective_end_Date

AND TRUNC(SYSDATE) BETWEEN papf.effective_start_Date AND papf.effective_end_Date

AND TRUNC(SYSDATE) BETWEEN paaf.effective_start_Date AND paaf.effective_end_Date

More Columns in RTF(Oracle Fusion)

 Suppose we are developing the RTF report with more than 30 columns then we don't have sufficient place in the RTF even if we used the landscape. 

  In case we use the regular excel(.xls)output format in the report that doesn't provide the report output in readable format. We need to expand all columns. To avoid that we can use the 'mhtml' format. This format provides the feel good report output with proper width.

Tuesday, 6 May 2025

Date and Time parameter for Oracle Report(Oracle Fusion)

 Hi Guys,

Usually we are using the format as 'MM-dd-yyyy' for Date parameter in the Data model to display for Date calendar.

In case we want to submit with time stamp, we have to use below format in the Parameters 'Date Format Sting' MM-dd-yyyy HH:mm:ss

To remove the space lines in the notepad++

 Suppose we have the extra space lines between the lines like below then go to 

Edit ----> Line Operations ------> Remove empty lines


Before removing empty lines:

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

FROM


  doo_headers_all dha,


  doo_headers_eff_b dheb,


  doo_fulfill_lines_all fl,


  doo_fulfill_line_details fld,


  doo_lines_all dla,


  wsh_delivery_details dd,


  wsh_delivery_assignments da,


  wsh_new_deliveries nd,


  egp_system_items_b esi,


  EGP_SYSTEM_ITEMS_TL esit,


  HZ_PARTIES HZ,


  INV_ORGANIZATION_DEFINITIONS_V iodv


-----After removing the empty lines

FROM

  doo_headers_all dha,

  doo_headers_eff_b dheb,

  doo_fulfill_lines_all fl,

  doo_fulfill_line_details fld,

  doo_lines_all dla,

  wsh_delivery_details dd,

  wsh_delivery_assignments da,

  wsh_new_deliveries nd,

  egp_system_items_b esi,

  EGP_SYSTEM_ITEMS_TL esit,

  HZ_PARTIES HZ,

  INV_ORGANIZATION_DEFINITIONS_V iodv