You are on page 1of 44

Oracle Fusion Global Payroll

Payslip Troubleshooting
O R AC L E W H I T E P AP E R | A P R I L 2018
Disclaimer
The following is intended to outline our general product direction. It is intended for information
purposes only, and may not be incorporated into any contract. It is not a commitment to deliver any
material, code, or functionality, and should not be relied upon in making purchasing decisions. The
development, release, and timing of any features or functionality described for Oracle’s products
remains at the sole discretion of Oracle.

ORACLE FUSION GLOBAL PAYROLL PAYSLIP TROUBLESHOOTING


Table of Contents

Introduction 4

What’s in this Document? 4

Other Information Sources 4

Document Updates 4

1 Overview of Generate Payslips Process 5

2 Payslip Troubleshooting Scenarios 5

2.1 Case 1 Generate Payslips did not complete successfully and has errors 5

2.1.1 Error with Archive Integration with BI Publisher process 5

2.1.1.1 Error message has “There is no data to process”. 5

2.1.1.2 Error message has “Report data size (xxxx bytes) exceeds the

maximum limit (xxxx bytes).” 6

2.1.1.3 Error message has

“oracle.xdo.memoryguard.XDOQueryTimeoutException SQL query time exceeds

the limit (600 sec). Stopped processing.” 6

2.1.1.4 Error message has java.lang.reflect.InvocationTargetException 6

2.1.1.5 Error message is different from the ones listed above 6

2.1.2 Error with Archive Payroll Information and Generate Report process 6

2.1.2.1 If the log file has the error ‘An assertion failure was detected at

location write_bank_account:1’ 6

2.1.2.2 Error message is different from above 7

2.1.3 Error with Archive Integration with Document of Records process 7

2.1.3.1 Log has XML-20221 error 7

2.1.3.2. Log has NumberFormatException 8

0 | ORACLE FUSION GLOBAL PAYROLL PAYSLIP TROUBLESHOOTING


2.1.3.3 Error message is different from above 8

2.2 Case 2 Generate Payslips completed successfully but some employees

cannot see their payslips 8

2.2.1 Payslip is visible through View Results in Person Process Results but

not visible to employees 8

2.2.1.1 Check one of the payslips and verify if Payroll Period and Pay Date is

correct. 8

2.2.1.2 If payslip periods are incorrect (payslip period is in the future), check if

Generate Prepayments processed Balance Adjustment along with regular payroll

run, and the Balance Adjustments has process date that falls in the next payroll

period. 8

2.2.2 Payslip is NOT visible through View Results in Person Process Results.8

2.2.2.1 Check in BI if payslips are generated using the steps listed in Section

1. 8

2.2.2.2 Check if Generate Payslips has errors in “Errors and Warnings’ tab as

described in 5.2. It may show error messages like

PAY_PAYPROC_UNKNOWN_ERR or FND_CORE_SYS_ERR. 9

2.2.2.3 Check if added new delivery option for online payslip. 9

2.2.2.4 Run the SQL listed in 7.1 to find how many payslips are missing from

the Document of Records. You will need flow instance name to run the SQL. 9

2.2.2.5 Issue not resolved or error still exists. 9

2.3 Case 3 Customer added email delivery option, but didn’t receive any email or

received same email several times. 9

1 | ORACLE FUSION GLOBAL PAYROLL PAYSLIP TROUBLESHOOTING


2.3.1 No Email Received 10

2.3.2 Received same email several times 10

2.4 Case 4 Employees see an error when opening the Payslip PDF file 10

2.5 Case 5 Amount shown on the Payslip is incorrect or is missing 11

2.6 Case 6 Generate Payslip running for long time and not completing 11

2.7 Case 7 Missing payment date in payslip 11

2.8 Case 8 Payslip missing for employee has zero net pay 11

2.9 Case 9 Customer added new delivery option to generate single output

(PDF/ADP file), but output is unavailable on View Results of checklist 12

3 Generate Payslips Process Prerequisites 12

3.1 Were the prerequisite processes run in correct sequence? 12

3.2 Were payslips generated previously for the same employees for the same

period?12

3.3 Check the input parameters for the Generate Payslips process 12

4 Payroll Archive and Payments Processes 13

4.1 Was Payments process successful? 13

4.2 Were balances archived in Payroll Archive process? 13

5 View Status of Child Processes 14

5.1 View Process Hierarchy to Determine Status of Child Processes 14

5.2 Check Errors and Warnings Tab from Checklists UI if process status is ‘Error’

17

6 Investigate BI Publisher Job 18

7 Appendix 18

7.1 SQLs to check Payslip Count 18

2 | ORACLE FUSION GLOBAL PAYROLL PAYSLIP TROUBLESHOOTING


7.2 Bursting SQL for email delivery setup 19

7.3 Diagnostic script 20

7.4 Payslip Monitor SQL 35

7.5 Get additional information from Archive Payroll Information and Generate

Report process log 38

3 | ORACLE FUSION GLOBAL PAYROLL PAYSLIP TROUBLESHOOTING


Introduction
This paper identifies and describes steps to resolve process issues with Oracle Fusion Global Payroll Generate
Payslips.

What’s in this Document?


This document is intended to assist the support team (Oracle as well as customer) in understanding how to resolve Generate
Payslips process issues in Oracle Fusion Global Payroll. Customers may find this document useful to determine some of the
root causes to problems with the Generate Payslips process and prepare the logs and data necessary to provide Oracle
Support.

This document is separated into following sections:

Section 1 provides an Overview of the Generate Payslips process and the various child processes that are invoked.

Section 2 lists the 5 broad Payslip Troubleshooting Scenarios or cases of Payslip errors. Most problems with the Generate
Payslips process would fit into one of the 5 scenarios. For each scenario, the steps to investigate are provided depending on
the final outcome, the phase or step that failed, and the type of error message displayed.

Some of the common investigational procedures that are required for one or more scenarios are explained in the subsequent
sections (3 to 7) and referenced through links under the various scenarios, in order to avoid repetition.

Section 3 explains the pre-requisites to the Generate Payslips Process Prerequisites and steps to verify them as well as
the parameters to the Generate Payslips process.

Section 4 explains how two of the pre-requisite processes viz. Payroll Archive and Payments Processes can be
investigated as a possible root cause for the issues with the subsequent Generate Payslips process.

Section 5 provides steps to View Status of Child Processes and the associated log files.

Section 6 explains how to Investigate BI Publisher Job within the BI Publisher server.

Section 7 provides is the Appendix where diagnostic scripts referenced throughout this document are located to assist in
troubleshooting.

Other Information Sources


Oracle Fusion Global Payroll User Guide:
http://www.oracle.com/technetwork/fusion-apps/payrolluserguider4-1873385.pdf

Document Updates
This document is based on the most current application release as of the document’s publication date. Content may be
updated as needed only to reflect major changes to existing features or when significant new features are added. For this
reason, it is possible that some minor UI differences may exist between the version being implemented and the version
described in this document.

4 | ORACLE FUSION GLOBAL PAYROLL PAYSLIP TROUBLESHOOTING


1 Overview of Generate Payslips Process
Generate Payslips process executes the following child processes:

Child process name Function of the child process Multi-threaded/Single threaded


Archive Payroll Information and Extracting the data from archive Multi-threaded
Generate Report and creating xml
Archive Integration with BI Generating payslip PDF for Single threaded
Publisher individual employees
Archive Integration with Document Storing the payslip in Document of Multi-threaded
of Records Records

If more than one thread is specified in the payroll process configuration group, you will see sub-processes under Archive
Payroll Information and Generate Report and Archive Integration with Document of Records in hierarchy view on the
Scheduled Processes UI (5.1).

2 Payslip Troubleshooting Scenarios


When troubleshooting the Payslip, the first step is to identify the symptom of the problem or scenario. Most payslip issues fall
under one of the following 5 scenarios or cases:

Case 1) Generate Payslips did not complete successfully and has errors.

Case 2) Generate Payslips completed successfully but some employees cannot see their pay slips.

Case 3) Customer added email delivery option, but employees received either no email or multiple emails.

Case 4) Employees see an error when opening the Payslip PDF file.

Case 5) Amount shown on the Payslip is incorrect or is missing.

2.1 Case 1 Generate Payslips did not complete successfully and has errors
Check which child process errored out using the steps listed in 5.1 and 5.2, error will be with one of the processes listed in
Section 1 their child sub processes

2.1.1 Error with Archive Integration with BI Publisher process


Check the status of the payslip job in BI Publisher using steps mentioned in Section 6.

2.1.1.1 Error message has “There is no data to process”.


This error comes up due to one of the following issues:

1) Check the sequence of running the prerequisite processes is correct, as listed in Section 3.
Resolution: Rollback the out-of-order processes and run in the correct order.

2) Check that Payroll Archive and Payment processes have successfully processed the employees as mentioned in
Section 4.

If balances were not archived in Archive Periodic Payroll Results process and customer is using US LDG, this could
be caused by missing 'Federal Tax' jurisdiction on TRU. US payroll archives only when TRU is registered with
'Federal Tax' jurisdiction.

Resolution: Add 'Federal Tax' jurisdiction on TRU, rollback and rerun the Archive Periodic Payroll Results process,
then run Generate Payslips process.

3) Ensure that any prior Generate Payslips processes for the same period were rolled back before re-running it.

5 | ORACLE FUSION GLOBAL PAYROLL PAYSLIP TROUBLESHOOTING


Resolution: Roll back prior Generate Payslips process and re-submit it.

4) Check the parameters of the Generate Payslips process as mentioned in 3.3.


Resolution: If date range is incorrect, re-submit process with correct date range.

2.1.1.2 Error message has “Report data size (xxxx bytes) exceeds the maximum limit (xxxx bytes).”
Resolution: Customer to log an SR to increase the report data size.
2.1.1.3 Error message has “oracle.xdo.memoryguard.XDOQueryTimeoutException SQL query time exceeds the
limit (600 sec). Stopped processing.”
1) Check the sequence of running the prerequisite processes is correct as listed in Section 3.
Resolution: Support to find process start time and end time in the log file (see 7.5).

2) Oracle Support to log a bug and attach the AWR report for time slot found in 1).
Resolution: Development to investigate the issue.

2.1.1.4 Error message has java.lang.reflect.InvocationTargetException


1) If your payslip template is customized, make sure those steps in “Test Custom Payslip Template in BI Publisher” in
Oracle Fusion Global Payroll: Customizing the Payslip (Doc ID 1569322.1) have been followed.

2) If there is no customization or the above steps have been checked, customer to log an SR.

Note to Oracle Support: Retrieve log from APPTOP/instance/domains/<domain>/BIDomain/servers/<server>/logs


for Oracle Development to analyze the error.

2.1.1.5 Error message is different from the ones listed above


1) Customer to log an SR with screenshot of error detail.

Note to Oracle Support: Check the health of ESS Server, BI Server and UCM server.

Retrieve log from APPTOP/instance/domains/<domain>/BIDomain/servers/<server>/logs for Oracle Development to


analyze the error.

2.1.2 Error with Archive Payroll Information and Generate Report process
Check the error in the log file and review further steps below.

2.1.2.1 If the log file has the error ‘An assertion failure was detected at location write_bank_account:1’
ERROR
Set Token 1
Name HR_6882_HRPROC_ASSERT
Token1 write_bank_account:1
Token2 null
Token3 null
An assertion failure was detected at location write_bank_account:1.

Cause: This error comes up when the bank account details have been created for a later date than the process run.
As an example, the bank account details was created as of the system date while the process for a past period and
so it will not have picked up these details.
This is not a bug, as normally a new hire would enter their bank details first, and then a payroll flow would be run for
a later date. This usually only occurs in test environments. Customers have the option of switching off this validation
via the payroll action parameter. There is no issue in the process.
Resolution:

6 | ORACLE FUSION GLOBAL PAYROLL PAYSLIP TROUBLESHOOTING


1) Navigator>Setup and Maintenance

2) On the All Tasks tab, search for task Name ‘Manage Common Lookups’

3) Click the Go to Task icon

4) Search on Lookup Type ‘PAY_ACTION_PARAMETER’

5) In the PAY_ACTION_PARAMETER_TYPE: Lookup Codes, search for Lookup Code HISTORIC_PAYMENT

6) If the record does not exist, click the Add icon and add the record as above. For meaning, enter ‘Historic Payment’.

7) Click the Save and Close button

Set the parameter via Manage Payroll Process Configuration

1) Navigator>Setup and Maintenance

2) On the All Task tab, search for task Name ‘Manage Payroll Process Configuration’

3) Click the Go to Task icon

4) Select the Default Group tab

5) Click the Create icon

6) In the Add Parameter pop-up, select the drop-down for Parameter Name.

7) Search and select Historic Payment and set the Default Value to Y

8) Click Save and Close

9) Click Done

2.1.2.2 Error message is different from above


1) Customer to log an SR with all the log files as described in 5.2.

Note to Oracle Support: Check the health of ESS Server, BI Server and UCM server.

2.1.3 Error with Archive Integration with Document of Records process


Errors and Warnings tab looks like below:

Get the process log for Archive Integration with Document of Records and check for errors

2.1.3.1 Log has XML-20221 error

7 | ORACLE FUSION GLOBAL PAYROLL PAYSLIP TROUBLESHOOTING


The issue is fixed in Rel11 PB13. If the application environment does not have Rel11 PB13 or later, a workaround is
to create a process configuration group, set XML_DATA_SOURCE = N. Then rollback payslip for the employee, re-
run payslip for the employee with process configuration group having XML_DATA_SOURCE = N. If you applied Rel
11 PB13 or later and are still facing this error, customer to log an SR with the log files.

2.1.3.2. Log has NumberFormatException

System Document Type of delivery option may be incorrect. Check System Document Type using these steps:

1) Click Data Exchange in Navigator

2) Click Manage HCM Extract Definitions task

3) Enter an LDG, and search for "Payslip" extract definition

4) Click Payslip in search result, click on Deliver tab

5) Check Additional Details section of delivery option having "Documents of Record" type

6) Scroll down and look for System Document Type. Correct value should be "GLB_PAYSLIP".

7) After correcting, rollback the Generate Payslips process and rerun it. If error still occurs, log an SR with all the log
files as described in 5.2.

2.1.3.3 Error message is different from above


Customer to log an SR with all the log files as described in 5.2.

Note to Oracle Support: Check the health of ESS Server, BI Server and UCM server.

2.2 Case 2 Generate Payslips completed successfully but some employees cannot see their payslips
Pick one employee number who cannot see the payslip. Go to Navigator > Payroll Calculations > Person Process Results.
Search for the Person Number and 'Generate Payslip' task for the pay period. On the record, click on View Results and check
if payslip is available.

2.2.1 Payslip is visible through View Results in Person Process Results but not visible to employees
2.2.1.1 Check one of the payslips and verify if Payroll Period and Pay Date is correct.

Please make sure the Payslip View Date for the payroll period is not in the future.

2.2.1.2 If payslip periods are incorrect (payslip period is in the future), check if Generate Prepayments processed
Balance Adjustment along with regular payroll run, and the Balance Adjustments has process date that falls in the
next payroll period.

2.2.2 Payslip is NOT visible through View Results in Person Process Results.

2.2.2.1 Check in BI if payslips are generated using the steps listed in Section 1.

8 | ORACLE FUSION GLOBAL PAYROLL PAYSLIP TROUBLESHOOTING


2.2.2.2 Check if Generate Payslips has errors in “Errors and Warnings’ tab as described in 5.2. It may show error
messages like PAY_PAYPROC_UNKNOWN_ERR or FND_CORE_SYS_ERR.

2.2.2.3 Check if added new delivery option for online payslip.


If customer added new delivery option and BIP job status is ‘Success’, but there is PDF output generated in BI. Then
please check Attribute of 'Key' property in additional details section of delivery option.

Please search with below inputs:

- Parent Data Group - Global Archive Payroll Calc Breakdown

- Attribute - Calculation Breakdown Identifier

- Record - Global CBID Information

- Save and submit changes. Rollback payslip process and re-run it, if still have same issue, please go to
2.2.2.4.

2.2.2.4 Run the SQL listed in 7.1 to find how many payslips are missing from the Document of Records. You will
need flow instance name to run the SQL.

2.2.2.5 Issue not resolved or error still exists.


Customer to log an SR with all the log files as described in 5.2 with the following additional information:

- Flow Instance name given to the Generate Payslips process with screenshot and

- Answers to questions 2.2.2.1 and 2.2.2.2

- Output of SQL run in step 2.2.2.3

- Employee Number whose payslip is missing

Note to Oracle Support:

Check the health of ESS Server, BI Server and UCM server.

Run diagnostic script listed in 7.3 with parameters - Person Number, Payslip Flow name and log a bug on
development to review the data.

2.3 Case 3 Customer added email delivery option, but didn’t receive any email or received same email
several times.

9 | ORACLE FUSION GLOBAL PAYROLL PAYSLIP TROUBLESHOOTING


Refer to Doc ID 1952705.1 (Fusion Global Payroll: How to Configure Payslip By Email) for detailed steps.

2.3.1 No Email Received


You need to check ‘Split By’ and ‘Deliver By’ values in the BI Data Model

Split By: /DATA_DS/G_1/FILE_FRAGMENT/PAYSLIP/PAYMENT_RECORD/REL_ACTION_ID

Deliver By:
/DATA_DS/G_1/FILE_FRAGMENT/PAYSLIP/PAYMENT_RECORD/GLB_ARCH_PR/GLB_PAY_ARCH_EE_INFO/
PERSON_ID

Note: You can’t copy/paste or see the cursor while typing new value. If you want to modify Split By or Deliver By,
you can follow the steps below:
a. Click on the dropdown

b. Pick a different value (any value would do as this is just a temporary step)

c. Click on the dropdown again. Now you would see a new value called “-- Enter --“. Select that value.

d. Once selected, you can type into the field. For further changes, repeat steps a- c above.

2.3.2 Received same email several times


Person without email address can cause email send failure. The BIP job status will be ‘Problem’, BIP job will retry 5
times. Using SQL listed in 7.2 as bursting query in data model to exclude these persons can resolve this issue. You
can refer to steps in Doc ID 1952705.1 to change bursting SQL in data model.

2.4 Case 4 Employees see an error when opening the Payslip PDF file
Resolution: Customer to log an SR with detail of the issue.
Note to Oracle Support: Check the health of ESS Server, BI Server and UCM server. Retrieve UCM server log for Oracle
Development to analyze the error.

10 | ORACLE FUSION GLOBAL PAYROLL PAYSLIP TROUBLESHOOTING


2.5 Case 5 Amount shown on the Payslip is incorrect or is missing
Customer to log an SR with person number, start date of payroll period, payslip flow name and screenshots showing the
issue.

Note to Oracle Support: Run diagnostic script listed in 7.3 with person number and payslip flow name provided by
customer and upload the results for Oracle Development to review.

2.6 Case 6 Generate Payslip running for long time and not completing
Customer to log an SR with payslip flow name and screenshots showing the issue.

Note to Oracle Support:

Check the health of ESS Server, BI Server and UCM server.

Run payslip monitor script listed in 7.4; upload the results for Oracle Development to review.

2.7 Case 7 Missing payment date in payslip


Follow these steps to determine:

1) If net pay is 0, then it’s expected because no payment issued.


2) If net pay > 0, please check if payment process (EFT Payments or Generate Check Payments) was completed
before submit payslip process. Please refer section 3 for correct sequence of prerequisite processes. If payment
process is fine, please go to 3).

3) Check Issued Date mapping in delivery option details, correct value is


/DATA_DS/G_1/FILE_FRAGMENT/PAYSLIP/PAYMENT_RECORD/PAYMENT_DETAILS/PAYMENT_DATE.

4) After changed this value, please rollback and resubmit payslip process. If error still occurs, log an SR with all the log
files as described in 5.2.

2.8 Case 8 Payslip missing for employee has zero net pay
Follow these steps to determine:

1) Check Information Number3 mapping in delivery option details, correct value is


/DATA_DS/G_1/FILE_FRAGMENT/PAYSLIP/PAYMENT_RECORD/NET_PAY_NO_THIRD_PARTY.

11 | ORACLE FUSION GLOBAL PAYROLL PAYSLIP TROUBLESHOOTING


2) After changed this value, please rollback and resubmit payslip process. If error still occurs, log an SR with all the log
files as described in 5.2.

2.9 Case 9 Customer added new delivery option to generate single output (PDF/ADP file), but output
is unavailable on View Results of checklist
Follow these steps to determine:

1) Check data model used in the report, please don’t use seeded PayslipBurstingDataModel directly, copy one
and remove bursting definition.
2) Check permission settings of report and data model, it should have "Generate Payslips" and "BI Consumer"
accounts, with Custom Permissions - Read, Traverse, Run Publisher Report, Schedule Publisher Report,
View Publisher Output.

3 Generate Payslips Process Prerequisites


The following is the correct sequence of running the processes before running Generate Payslips:

1) Calculate Payroll or Calculate QuickPay


2) Calculate Prepayments
3) Archive Periodic Payroll Results
4) Run EFT Payments or Generate Check Payments based on person payment methods
5) Generate Payslips
3.1 Were the prerequisite processes run in correct sequence?
Resolution: Correctly run processes in correct sequence.

3.2 Were payslips generated previously for the same employees for the same period?
Once payslips have been generated for that period, they are locked. You will need to rollback the payslips first, then generate
the payslips again.

3.3 Check the input parameters for the Generate Payslips process
1) Are the date ranges correct? (Note End Date displays above Start Date)

12 | ORACLE FUSION GLOBAL PAYROLL PAYSLIP TROUBLESHOOTING


2) Does the end date of Payroll Archive process fall in this range?

Resolution: Generate Payslips process is based on Payroll Archive results, check parameters of Payroll Archive
process.

3) Is there a Payroll Relationship Group defined, and is it correct?

Resolution: We only support payroll relationship inclusion now.

4 Payroll Archive and Payments Processes


Checking if Archive Periodic Payroll Results and Payment processes were successful before running Generate Payslips
process

4.1 Was Payments process successful?


Follow these steps to determine:

1) Navigate to View Person Process Results


2) Search for the person processed by the Make EFT Payments process or Generate Check Payments process
3) Click on the person to view the Payment Results. Make sure that the Status is marked as 'Paid' and provide a
screenshot.

4.2 Were balances archived in Payroll Archive process?


Follow these steps to determine:

1) Navigate to View Person Process Results


2) Search for the person processed by the Archive Periodic Payroll Results process

13 | ORACLE FUSION GLOBAL PAYROLL PAYSLIP TROUBLESHOOTING


3) Click on the person to view the Payroll Archive results

4) Switch to table view, check if there are balance records, e.g. Global Payroll Relationship Earnings.

5 View Status of Child Processes

5.1 View Process Hierarchy to Determine Status of Child Processes


Follow these steps to view the process hierarchy to locate child processes:

1) Find process id of Archive Payroll Information and Generate Report process


2) Navigate to ‘Payroll Checklist’, in the ‘Overview’ tag, provide ‘Payroll Process Flow Name’, and click ‘Search’ button.

14 | ORACLE FUSION GLOBAL PAYROLL PAYSLIP TROUBLESHOOTING


3) Click on the search result to navigate to details, click ‘Go to Task’ icon.

4) Remember the Process ID, in this case, it’s 13922.

Note: You can also download Archive Payroll Information and Generate Report process log on this tab. Click
on ‘Process 13922’, click on View Log icon, then click log file link on the popup to save it.
5) View status of child processes and download log files

15 | ORACLE FUSION GLOBAL PAYROLL PAYSLIP TROUBLESHOOTING


6) Choose ‘Flat List’ option
7) Provide ‘Process ID’ with the previously process ID 13922.
8) Clear ‘Submission Time’ criteria
9) Click ‘Search’ button
10) Click Name of the row in search results, it will show details section of this process under search results table, you
will find Parent ID is 13921

11) Now, choose ‘Hierarchy’ option


12) Provide ‘Process ID’ with the Parent ID 13921
13) Clear ‘Submission Time’ criteria
14) Click ‘Search’ button

15) Expand the Search result

16 | ORACLE FUSION GLOBAL PAYROLL PAYSLIP TROUBLESHOOTING


16) Write down the Process ID for the two Archive Integration with BI Publisher jobs.
17) Click one by one all the sub processes and download all the logs.

5.2 Check Errors and Warnings Tab from Checklists UI if process status is ‘Error’
Follow these steps to determine:

17 | ORACLE FUSION GLOBAL PAYROLL PAYSLIP TROUBLESHOOTING


1) Go to Payroll -> Checklists, for Payroll Process Flow Name enter payslip flow name and do a search.
2) Click on flow name, click on Go to Task icon on Task Details tab.
3) Switch to Errors and Warnings tab, take screenshot.

6 Investigate BI Publisher Job


Check Payslip BIP job status in BI Publisher server

1) Go to Navigator > Reports and Analytics, click on book icon and then Home.
2) Go to Report Job History (under Browse/Manage).
3) For Owner, select Contains option and enter 'fusion', job name, using Process ID of Archive Integration with BI
Publisher jobs we found in 5.2 and do a search.

4) In the search results, click on Report Job Name. Verify that you can see employee payslips.

5) Check the error message by hovering over or clicking on "X Failed" icon and take a screenshot of error message.

7 Appendix

7.1 SQLs to check Payslip Count


payslip_count_sql
1. SELECT fi.instance_name,
ppa.payroll_action_id,
COUNT(pra.payroll_rel_action_id) AS payslip_count
FROM pay_flow_instances fi,
pay_flow_task_instances pfti,
pay_flow_tasks_vl pft,
pay_tasks pt,
pay_requests pr,
pay_payroll_actions ppa,
pay_payroll_rel_actions pra
WHERE fi.instance_name like '%'||'&&instance_name'||'%'
AND fi.flow_instance_id = pfti.flow_instance_id
AND pfti.base_flow_task_id = pft.base_flow_task_id
AND pft.base_task_id = pt.base_task_id
AND pt.base_task_name = 'PAYSLIP'
AND pfti.flow_task_instance_id = pr.flow_task_instance_id
AND pr.pay_request_id = ppa.pay_request_id
AND ppa.action_type ='XWr'
AND ppa.PAYROLL_ACTION_ID = pra.PAYROLL_ACTION_ID(+)
GROUP BY fi.instance_name,
ppa.payroll_action_id
ORDER BY ppa.payroll_action_id;

2. SELECT fi.instance_name,

18 | ORACLE FUSION GLOBAL PAYROLL PAYSLIP TROUBLESHOOTING


ppa.payroll_action_id,
COUNT(pra.payroll_rel_action_id) AS missing_dor_count
FROM pay_flow_instances fi,
pay_flow_task_instances pfti,
pay_flow_tasks_vl pft,
pay_tasks pt,
pay_requests pr,
pay_payroll_actions ppa,
pay_payroll_rel_actions pra
WHERE fi.instance_name like '%'||'&&instance_name'||'%'
AND fi.flow_instance_id = pfti.flow_instance_id
AND pfti.base_flow_task_id = pft.base_flow_task_id
AND pft.base_task_id = pt.base_task_id
AND pt.base_task_name = 'PAYSLIP'
AND pfti.flow_task_instance_id = pr.flow_task_instance_id
AND pr.pay_request_id = ppa.pay_request_id
AND ppa.action_type ='XWr'
AND ppa.PAYROLL_ACTION_ID = pra.PAYROLL_ACTION_ID(+)
AND NOT EXISTS
(SELECT 1
FROM hr_documents_of_record
WHERE related_object_id =pra.payroll_rel_action_id
AND related_object_id_col ='PAYROLL_REL_ACTION_ID'
)
GROUP BY fi.instance_name,
ppa.payroll_action_id
ORDER BY ppa.payroll_action_id;

7.2 Bursting SQL for email delivery setup


email_bursting_new_sql
SELECT pay_report_delivery.get_key_value(data_ele.information_column ,pai.action_information_id) KEY ,
del_opt.bip_template_name TEMPLATE ,
del_opt.output_type OUTPUT_FORMAT ,

pay_report_delivery.get_output_file_name(del_opt.output_name ,pact.effective_date ,del_opt.ext_delivery_o


ption_id ,del_opt.delivery_type ,pai.action_information_id ,pai.action_context_type ,pai.action_context_id)
OUTPUT_NAME ,
del_opt.calendar_code CALENDAR ,
'true' SAVE_OUTPUT ,
DECODE(del_opt.delivery_type,'DOR',NULL,'NONE',NULL,'HCMCONNECT' ,NULL,del_opt.delivery_type)
DEL_CHANNEL ,

pay_report_delivery.get_del_param_value('1' ,del_opt.ext_delivery_option_id ,del_opt.delivery_type ,pai.acti


on_information_id ,pai.action_context_type ,pai.action_context_id) PARAMETER1 ,

pay_report_delivery.get_del_param_value('2' ,del_opt.ext_delivery_option_id ,del_opt.delivery_type ,pai.acti


on_information_id ,pai.action_context_type ,pai.action_context_id) PARAMETER2 ,

pay_report_delivery.get_del_param_value('3' ,del_opt.ext_delivery_option_id ,del_opt.delivery_type ,pai.acti


on_information_id ,pai.action_context_type ,pai.action_context_id) PARAMETER3 ,

pay_report_delivery.get_del_param_value('4' ,del_opt.ext_delivery_option_id ,del_opt.delivery_type ,pai.acti


on_information_id ,pai.action_context_type ,pai.action_context_id) PARAMETER4 ,

pay_report_delivery.get_del_param_value('5' ,del_opt.ext_delivery_option_id ,del_opt.delivery_type ,pai.acti


on_information_id ,pai.action_context_type ,pai.action_context_id) PARAMETER5 ,

pay_report_delivery.get_del_param_value('6' ,del_opt.ext_delivery_option_id ,del_opt.delivery_type ,pai.acti


on_information_id ,pai.action_context_type ,pai.action_context_id) PARAMETER6 ,

19 | ORACLE FUSION GLOBAL PAYROLL PAYSLIP TROUBLESHOOTING


pay_report_delivery.get_del_param_value('7' ,del_opt.ext_delivery_option_id ,del_opt.delivery_type ,pai.acti
on_information_id ,pai.action_context_type ,pai.action_context_id) PARAMETER7 ,

pay_report_delivery.get_del_param_value('8' ,del_opt.ext_delivery_option_id ,del_opt.delivery_type ,pai.acti


on_information_id ,pai.action_context_type ,pai.action_context_id) PARAMETER8 ,

pay_report_delivery.get_del_param_value('9' ,del_opt.ext_delivery_option_id ,del_opt.delivery_type ,pai.acti


on_information_id ,pai.action_context_type ,pai.action_context_id) PARAMETER9 ,

pay_report_delivery.get_del_param_value('10' ,del_opt.ext_delivery_option_id ,del_opt.delivery_type ,pai.act


ion_information_id ,pai.action_context_type ,pai.action_context_id) PARAMETER10 ,

pay_report_delivery.get_del_param_value('LOCALE' ,del_opt.ext_delivery_option_id ,del_opt.delivery_type ,


pai.action_information_id ,pai.action_context_type ,pai.action_context_id) LOCALE ,

pay_report_delivery.get_del_param_value('TIMEZONE' ,del_opt.ext_delivery_option_id ,del_opt.delivery_typ


e ,pai.action_information_id ,pai.action_context_type ,pai.action_context_id) TIMEZONE
FROM pay_payroll_rel_actions pra_payslip ,
pay_action_interlocks lck ,
pay_payroll_rel_actions pra_archive ,
pay_action_information actinfo ,
pay_action_information pai ,
pay_payroll_actions pact ,
per_ext_delivery_options_b del_opt ,
per_ext_delivery_option_dtls del_det ,
per_ext_data_elements_b data_ele ,
pay_report_records_f prr
WHERE pra_payslip.payroll_action_id = :payrollActionId
AND lck.locking_action_id = pra_payslip.payroll_rel_action_id
AND pra_archive.payroll_rel_action_id = lck.locked_action_id
AND actinfo.action_context_id = pra_archive.payroll_rel_action_id
AND actinfo.action_context_type = 'PRA'
AND actinfo.action_information_category = 'GLB_PAY_ARCH_EE_INFO_FC'
AND del_opt.ext_delivery_option_id = del_det.ext_delivery_option_id
AND del_det.option_type = 'KEY'
AND del_det.option_data_element_id = data_ele.ext_data_element_id
AND data_ele.report_record_id = prr.report_record_id
AND pai.report_record_id = prr.report_record_id
AND pact.payroll_action_id = pra_archive.payroll_action_id
AND pact.effective_date BETWEEN prr.effective_start_date AND prr.effective_end_date
AND del_opt.ext_delivery_option_id = :deliveryOptionId
AND ((pay_report_delivery.get_action_context_type(prr.report_block_id)='PPA'
AND pai.action_context_id = pact.payroll_action_id)
OR (pay_report_delivery.get_action_context_type(prr.report_block_id) ='PRA'
AND pai.action_context_id = pra_archive.payroll_rel_action_id))
AND
pay_report_delivery.get_del_param_value('1' ,del_opt.ext_delivery_option_id ,del_opt.delivery_type ,pai.acti
on_information_id ,pai.action_context_type ,pai.action_context_id) IS NOT NULL

7.3 Diagnostic script


diagnostic_sql
REM HCM_PAYSLIP_QUERY.sql
REM 31-Oct-16 inital version
REM 01-Nov-16 0.1 add underscore in output file name
REM 17-Nov-16 0.2 add action lock info in rel action query,
REM add reserved_input_value in run result query
REM 03-Jan-17 0.3 add dor query
REM 14-Feb-17 0.4 change parameters to person number and payslip flow name
REM 17-Feb-17 0.5 Add ITD dimension in pay archive query
REM 28-Jun-17 0.6 Add delivery option query

20 | ORACLE FUSION GLOBAL PAYROLL PAYSLIP TROUBLESHOOTING


SET TERMOUT ON LINESIZE 200
PROMPT =========================================================================
PROMPT This is extension of a Global Human Resources Employment Data Integrity
PROMPT Diagnostic script for HCM Payroll Payslip.
PROMPT .
PROMPT It runs a series of SELECT statements against the target database and
PROMPT produces a set of spooled putput files.
PROMPT .
PROMPT When run it will ASK FOR A REFERENCE BUG OR SR NUMBER and use that to
PROMPT create a folder where the output files will be stored.
PROMPT .
PROMPT It will also ASK FOR the PERSON NUMBER and PAYSLIP FLOW NAME and use that to
PROMPT fetch data.
PROMPT .
PROMPT On Windows that will be C:\<<ReferenceBugorSRNumber>>* PROMPT
On Linux or Unix that will be $HOME/<<ReferenceBugorSRNumber>>* PROMPT
.
PROMPT The script will attempt to zip the output files for convenience however
PROMPT on occasion the zipping process may fail. In such cases, please manually
PROMPT zip up the output files and provide them back to Oracle Support via
PROMPT bug/SR attachments.
PROMPT .
PROMPT How to run this script ?
PROMPT ------------------------------------------------------------------------
PROMPT This script is best run from the commandline as
PROMPT Put Path here (TBD)
PROMPT .
PROMPT The script can be from from SQL Developer (Windows only) also.
PROMPT Start a new worksheet for the relevant database connection and then type
PROMPT TBD
PROMPT .
PROMPT Running the script from the URL location means you will always pick up
PROMPT the latest version for the same.
PROMPT .
PROMPT Other SQL clients have not been tested.
PROMPT .
PROMPT =========================================================================
PROMPT .
REM Generate a spool directory and file base name
PROMPT &&bug_or_sr_reference
PROMPT &&person_number
PROMPT &&payslip_flow_name
SET termout off feedback off verify off pages 0 heading off underline off serveroutput on escape off
ALTER SESSION SET CURRENT_SCHEMA = FUSION;
COLUMN spoolfilebasename NEW_VALUE spoolfilebase
COLUMN spooldrivename NEW_VALUE spooldrive
COLUMN spooldirname NEW_VALUE spooldir

COLUMN start_date NEW_VALUE start_date


COLUMN end_date NEW_VALUE end_date

SELECT DECODE(program
,'SQL Developer','C:\' -- assume sql developer will run from windows
,'sqlplusw.exe','C:\'
,'sqlplus.exe','C:\'
,'Toad.exe','C:\'
,'$HOME/'
) spooldrivename
,NVL('&&bug_or_sr_reference','BugNumberUnknown')||'_HCM_PAYSLIP_QUERY_'||TO_CHAR(systi
mestamp,'DDMONYY_HH24MISS')||
DECODE(program
,'SQL Developer','\' -- assume sql developer will run from windows
,'sqlplusw.exe','\'

21 | ORACLE FUSION GLOBAL PAYROLL PAYSLIP TROUBLESHOOTING


,'sqlplus.exe','\'
,'Toad.exe','\'
,'/' -- most likely a sqlplus client from unix
) spooldirname
,'PERSON_'||NVL('&&person_number','Unknown')
spoolfilebasename
FROM v$session WHERE sid = USERENV('sid');

select '&spooldrive.&spooldir.&spoolfilebase' from dual;

REM this command is portable across windows and unix


host mkdir &spooldrive.&spooldir

SPOOL &spooldrive.&spooldir.&spoolfilebase._os_specific_cmds.sql
select DECODE(program
,'SQL Developer','host dir &spooldrive.&spooldir' -- assume sql developer will run from windows
,'sqlplusw.exe','host dir &spooldrive.&spooldir'
,'sqlplus.exe','host dir &spooldrive.&spooldir'
,'Toad.exe','\'
,'host ls -ltr &spooldrive.&spooldir' -- most likely a sqlplus client from unix
)
from v$session WHERE sid = USERENV('sid');
SPOOL OFF;
set termout on
PROMPT =========================================================================
PROMPT .
PROMPT &spooldrive.&spooldir
PROMPT Verifying that spool location was created successfully
start &spooldrive.&spooldir.&spoolfilebase._os_specific_cmds.sql
PROMPT .
PROMPT If successful, it should show a file listing of the output folder with
PROMPT with one file &spooldrive.&spooldir.&spoolfilebase._os_specific_cmds.sql
PROMPT .
PROMPT =========================================================================
PROMPT Fetching Diagnostic Data....
REM set options friendly for producing csv files
SET LINESIZE 32767 NUMWIDTH 18 LONG 4000 FEEDBACK OFF ECHO OFF
SET TRIMOUT ON ARRAYSIZE 5000 AUTOCOMMIT OFF FLUSH OFF HEADING ON TERMOUT OFF
SET PAUSE OFF SERVEROUTPUT ON TRIMSPOOL ON VERIFY OFF
SET UNDERLINE OFF PAGESIZE 50000 ESCAPE OFF

REM select star can result in dates being displayed in default date format
ALTER SESSION SET NLS_DATE_FORMAT = 'DD-MON-YYYY HH24:MI:SS';
REM do not assume that the client running will a default of US
ALTER SESSION SET NLS_LANGUAGE = 'AMERICAN';

---
SET TERMOUT OFF
SET COLSEP '|'

REM PAYSLIP QUERIES START

select to_char(ppa.start_date, 'YYYY/MM/DD') start_date,


to_char(ppa.effective_date, 'YYYY/MM/DD') end_date
from
pay_flow_instances pfi,
pay_requests pr,
pay_payroll_actions ppa
where pfi.instance_name like '%' || trim('&&payslip_flow_name') || '%'
and pfi.flow_instance_id = pr.flow_instance_id
and pr.param_name_vals is not null
and pr.pay_request_id = ppa.pay_request_id
and ppa.action_type = 'XWr';

22 | ORACLE FUSION GLOBAL PAYROLL PAYSLIP TROUBLESHOOTING


SPOOL &spooldrive.&spooldir.&spoolfilebase._pay_rel_actions.csv
select distinct pra.*, lck.locked_action_id
from PAY_PAYROLL_REL_ACTIONS pra,
PAY_ACTION_INTERLOCKS lck
where payroll_relationship_id in (select payroll_relationship_id
from PAY_PAY_RELATIONSHIPS_DN prdn, per_all_people_f ppl
where prdn.person_id = ppl.person_id
and ppl.person_number = '&&person_number')
and PRA.PAYROLL_ACTION_ID in (select payroll_action_id from PAY_PAYROLL_ACTIONS PA
where pa.effective_date between to_date('&&start_date', 'YYYY/MM/DD') and
to_date('&&end_date', 'YYYY/MM/DD')
and pa.action_type <> 'G')
and pra.payroll_rel_action_id = lck.locking_action_id(+)
order by pra.payroll_action_id;
SPOOL OFF
SET TERMOUT ON
PROMPT &spooldrive.&spooldir.&spoolfilebase._pay_rel_actions.csv completed.
SET TERMOUT OFF

select to_char(ppa.start_date, 'YYYY/MM/DD') start_date,


to_char(ppa.effective_date, 'YYYY/MM/DD') end_date
from
pay_flow_instances pfi,
pay_requests pr,
pay_payroll_actions ppa
where pfi.instance_name like '%' || trim('&&payslip_flow_name') || '%'
and pfi.flow_instance_id = pr.flow_instance_id
and pr.param_name_vals is not null
and pr.pay_request_id = ppa.pay_request_id
and ppa.action_type = 'XWr';

SPOOL &spooldrive.&spooldir.&spoolfilebase._pay_actions.csv
select (select fi.instance_name from pay_flow_instances fi, pay_requests r
where r.pay_request_id = pa.pay_request_id
and r.flow_instance_id = fi.flow_instance_id) flow_instance_name,
RC.BASE_CATEGORY_NAME, pa.*
from PAY_PAYROLL_ACTIONS pa, PAY_REPORT_CATEGORIES rc
where PA.REPORT_CATEGORY_ID = RC.REPORT_CATEGORY_ID(+)
and pa.action_type <> 'G'
and PA.EFFECTIVE_DATE between to_date('&&start_date', 'YYYY/MM/DD') and to_date('&&end_date',
'YYYY/MM/DD')
and PA.PAYROLL_ACTION_ID in ( select PRA.PAYROLL_ACTION_ID
from PAY_PAYROLL_REL_ACTIONS pra
where payroll_relationship_id in (select payroll_relationship_id
from PAY_PAY_RELATIONSHIPS_DN prdn,
per_all_people_f ppl
where prdn.person_id = ppl.person_id
and ppl.person_number =
'&&person_number'))
order by PA.EFFECTIVE_DATE, PA.PAYROLL_ACTION_ID;
SPOOL OFF
SET TERMOUT ON

PROMPT &spooldrive.&spooldir.&spoolfilebase._pay_actions.csv completed.


SET TERMOUT OFF

select to_char(ppa.start_date, 'YYYY/MM/DD') start_date,


to_char(ppa.effective_date, 'YYYY/MM/DD') end_date
from
pay_flow_instances pfi,
pay_requests pr,
pay_payroll_actions ppa
where pfi.instance_name like '%' || trim('&&payslip_flow_name') || '%'

23 | ORACLE FUSION GLOBAL PAYROLL PAYSLIP TROUBLESHOOTING


and pfi.flow_instance_id = pr.flow_instance_id
and pr.param_name_vals is not null
and pr.pay_request_id = ppa.pay_request_id
and ppa.action_type = 'XWr';

SPOOL &spooldrive.&spooldir.&spoolfilebase._dor.csv
SELECT distinct hdr.documents_of_record_id DOCUMENTS_OF_RECORD_ID ,
hdr.person_id PERSON_ID ,
papf.person_number,
hdr.date_from PERIOD_START_DATE ,
hdr.date_to PERIOD_END_DATE ,
hdr.issued_date PAYMENT_DATE ,
ptp.payslip_view_date PAYSLIP_VIEW_DATE ,
hdr.dei_information_number1 PAYROLL_ID ,
hdr.dei_information_number2 PERIOD_NUMBER ,
hdr.dei_information_number3 AMOUNT ,
hdr.dei_information_number4 TAX_UNIT_ID ,
hdr.dei_information_number5 PREPAY_REL_ACTION_ID ,
hdr.dei_information_number6 CALC_BREAKDOWN_ID ,
hdr.dei_information_number7 ARCHIVE_REL_ACTION_ID ,
hdr.dei_information1 EMAIL_ADDRESS ,
pra.payroll_relationship_id PAYROLL_RELATIONSHIP_ID ,
prd.payroll_relationship_number PAYROLL_RELATIONSHIP_NUMBER ,
ppf.payroll_name PAYROLL ,
ppf.legislative_data_group_id,
pldgv.legislation_code,
hdr.dei_information_number6 TAX_REFERENCE,
hdr.RELATED_OBJECT_ID, hdr.RELATED_OBJECT_NAME,hdr.RELATED_OBJECT_ID_COL
FROM hr_document_types_vl hdt ,
hr_documents_of_record hdr ,
pay_payroll_rel_actions pra ,
pay_pay_relationships_dn prd ,
pay_all_payrolls_f ppf,
pay_time_periods ptp,
per_all_people_f papf,
PER_LEGISLATIVE_DATA_GROUPS_VL pldgv
WHERE hdt.system_document_type like '%PAYSLIP'
AND hdt.category_code = 'PAYROLL'
AND hdt.sub_category_code = 'PAYROLL_PAYMENT'
AND hdr.document_type_id = hdt.document_type_id
AND hdr.DEI_INFORMATION_CATEGORY LIKE '%PAYSLIP%'
AND pra.payroll_rel_action_id = hdr.related_object_id AND
prd.payroll_relationship_id = pra.payroll_relationship_id
AND ppf.payroll_id = hdr.dei_information_number1
AND pldgv.legislative_data_group_id = ppf.legislative_data_group_id
AND hdr.dei_information_date1 BETWEEN ppf.effective_start_date AND
ppf.effective_end_date
AND ptp.payroll_id = ppf.payroll_id
AND ptp.start_date = hdr.date_from
AND ptp.end_date = hdr.date_to
AND ptp.period_category = 'E'
AND prd.person_id =hdr.person_id
AND hdr.person_id =papf.person_id
AND papf.person_number = '&&person_number'
AND hdr.RELATED_OBJECT_NAME = 'PAY_PAYROLL_REL_ACTIONS'
AND hdr.RELATED_OBJECT_ID_COL = 'PAYROLL_REL_ACTION_ID'
AND hdr.date_from >= to_date('&&start_date', 'YYYY/MM/DD');
SPOOL OFF
SET TERMOUT ON
PROMPT &spooldrive.&spooldir.&spoolfilebase._dor.csv completed.
SET TERMOUT OFF

select to_char(ppa.start_date, 'YYYY/MM/DD') start_date,

24 | ORACLE FUSION GLOBAL PAYROLL PAYSLIP TROUBLESHOOTING


to_char(ppa.effective_date, 'YYYY/MM/DD') end_date
from
pay_flow_instances pfi,
pay_requests pr,
pay_payroll_actions ppa
where pfi.instance_name like '%' || trim('&&payslip_flow_name') || '%'
and pfi.flow_instance_id = pr.flow_instance_id
and pr.param_name_vals is not null
and pr.pay_request_id = ppa.pay_request_id
and ppa.action_type = 'XWr';

SPOOL &spooldrive.&spooldir.&spoolfilebase._rel_action_without_dor.csv
select peo.person_number, ppa.payroll_action_id, ppa.effective_date, ppa.start_date
from pay_pay_relationships_dn pr,
pay_payroll_rel_actions ract,
per_all_people_f peo,
pay_payroll_actions ppa,
pay_report_categories rc
where peo.person_id=pr.person_id
and ract.payroll_action_id =ppa.payroll_action_id
and ppa.action_type = 'XWr'
and ppa.EFFECTIVE_DATE between to_date('&&start_date', 'YYYY/MM/DD') and to_date('&&end_date',
'YYYY/MM/DD')
and ppa.report_category_id = rc.report_category_id
and rc.base_category_name = 'Payslip'
and peo.person_number = '&&person_number'
and ract.payroll_relationship_id=pr.payroll_relationship_id
and not exists (select 1
from hr_documents_of_record
where related_object_id=ract.payroll_rel_action_id
and related_object_id_col ='PAYROLL_REL_ACTION_ID');
SPOOL OFF
SET TERMOUT ON
PROMPT &spooldrive.&spooldir.&spoolfilebase._rel_action_without_dor.csv completed.
SET TERMOUT OFF

select to_char(ppa.start_date, 'YYYY/MM/DD') start_date,


to_char(ppa.effective_date, 'YYYY/MM/DD') end_date
from
pay_flow_instances pfi,
pay_requests pr,
pay_payroll_actions ppa
where pfi.instance_name like '%' || trim('&&payslip_flow_name') || '%'
and pfi.flow_instance_id = pr.flow_instance_id
and pr.param_name_vals is not null
and pr.pay_request_id = ppa.pay_request_id
and ppa.action_type = 'XWr';

SPOOL &spooldrive.&spooldir.&spoolfilebase._rel_action_with_dor.csv
SELECT hdr.documents_of_record_id,
hdr.date_from PERIOD_START_DATE,
hdr.date_to PERIOD_END_DATE,
hdr.issued_date PAYMENT_DATE,
hdr.dei_information_number1 PAYROLL_ID ,
hdr.dei_information_number2 PERIOD_NUMBER ,
hdr.dei_information_number3 AMOUNT ,
hdr.dei_information_number4 TAX_UNIT_ID ,
hdr.dei_information_number5 PREPAY_REL_ACTION_ID ,
hdr.dei_information_number6 CALC_BREAKDOWN_ID ,
hdr.dei_information_number7 ARCHIVE_REL_ACTION_ID ,
hdr.dei_information_number6 TAX_REFERENCE,
hdr.dei_information1 EMAIL_ADDRESS,
hdr.DEI_INFORMATION_CATEGORY

25 | ORACLE FUSION GLOBAL PAYROLL PAYSLIP TROUBLESHOOTING


FROM hr_documents_of_record hdr
WHERE related_object_id IN
(SELECT ract.payroll_rel_action_id
FROM pay_pay_relationships_dn pr,
pay_payroll_rel_actions ract,
per_all_people_f peo,
pay_payroll_actions ppa,
pay_report_categories rc
WHERE peo.person_id =pr.person_id
AND ract.payroll_action_id =ppa.payroll_action_id
AND ppa.action_type = 'XWr'
AND ppa.EFFECTIVE_DATE between to_date('&&start_date', 'YYYY/MM/DD') and
to_date('&&end_date', 'YYYY/MM/DD')
AND ppa.report_category_id = rc.report_category_id
AND rc.base_category_name = 'Payslip'
AND peo.person_number = '&&person_number'
AND ract.payroll_relationship_id=pr.payroll_relationship_id
)
AND related_object_id_col ='PAYROLL_REL_ACTION_ID';
SPOOL OFF
SET TERMOUT ON
PROMPT &spooldrive.&spooldir.&spoolfilebase._rel_action_with_dor.csv completed.
SET TERMOUT OFF

select to_char(ppa.start_date, 'YYYY/MM/DD') start_date,


to_char(ppa.effective_date, 'YYYY/MM/DD') end_date
from
pay_flow_instances pfi,
pay_requests pr,
pay_payroll_actions ppa
where pfi.instance_name like '%' || trim('&&payslip_flow_name') || '%'
and pfi.flow_instance_id = pr.flow_instance_id
and pr.param_name_vals is not null
and pr.pay_request_id = ppa.pay_request_id
and ppa.action_type = 'XWr';

SPOOL &spooldrive.&spooldir.&spoolfilebase._xrd_tmp_action.csv
SELECT *
FROM PAY_TEMP_OBJECT_ACTIONS
WHERE PARENT_OBJECT_ID IN
(SELECT TO_CHAR(ract.PAYROLL_REL_ACTION_ID) AS parent_obj_id
FROM pay_pay_relationships_dn pr,
pay_payroll_rel_actions ract,
per_all_people_f peo,
pay_payroll_actions ppa,
pay_report_categories rc
WHERE peo.person_id =pr.person_id
AND ract.payroll_action_id =ppa.payroll_action_id
AND ppa.action_type = 'XWr'
AND ppa.EFFECTIVE_DATE between to_date('&&start_date', 'YYYY/MM/DD') and
to_date('&&end_date', 'YYYY/MM/DD')
AND ppa.report_category_id = rc.report_category_id
AND rc.base_category_name = 'Payslip'
AND peo.person_number = '&&person_number'
AND ract.payroll_relationship_id=pr.payroll_relationship_id
);
SPOOL OFF
SET TERMOUT ON
PROMPT &spooldrive.&spooldir.&spoolfilebase._xrd_tmp_action.csv completed.
SET TERMOUT OFF

select to_char(ppa.start_date, 'YYYY/MM/DD') start_date,


to_char(ppa.effective_date, 'YYYY/MM/DD') end_date

26 | ORACLE FUSION GLOBAL PAYROLL PAYSLIP TROUBLESHOOTING


from
pay_flow_instances pfi,
pay_requests pr,
pay_payroll_actions ppa
where pfi.instance_name like '%' || trim('&&payslip_flow_name') || '%'
and pfi.flow_instance_id = pr.flow_instance_id
and pr.param_name_vals is not null
and pr.pay_request_id = ppa.pay_request_id
and ppa.action_type = 'XWr';

SPOOL &spooldrive.&spooldir.&spoolfilebase._payslip_xml.csv
SELECT distinct per.person_number,
ppa.payroll_action_id,
ppa.action_type,
ppra.payroll_rel_action_id,
ppra.payroll_relationship_id,
ppra.action_status,
ppa.effective_date,
ppa.start_date,
xf.file_detail_id,
LENGTH(xf.FILE_FRAGMENT) file_length
FROM pay_payroll_actions ppa,
pay_payroll_rel_actions ppra,
pay_pay_relationships_dn pprd,
PER_ALL_PEOPLE_F per,
pay_report_categories rc,
pay_file_details xf
WHERE ppa.payroll_action_id = ppra.payroll_action_id
AND ppa.action_type = 'XWr'
AND ppa.EFFECTIVE_DATE between to_date('&&start_date', 'YYYY/MM/DD') and to_date('&&end_date',
'YYYY/MM/DD')
AND ppra.payroll_relationship_id = pprd.payroll_relationship_id
AND ppra.payroll_rel_action_id = xf.source_id(+)
AND xf.source_type = 'PRA'
AND ppa.report_category_id = rc.report_category_id
AND rc.base_category_name = 'Payslip'
AND pprd.person_id = per.person_id
AND per.person_number = '&&person_number';

SPOOL OFF
SET TERMOUT ON
PROMPT &spooldrive.&spooldir.&spoolfilebase._payslip_xml.csv completed.
SET TERMOUT OFF

select to_char(ppa.start_date, 'YYYY/MM/DD') start_date,


to_char(ppa.effective_date, 'YYYY/MM/DD') end_date
from
pay_flow_instances pfi,
pay_requests pr,
pay_payroll_actions ppa
where pfi.instance_name like '%' || trim('&&payslip_flow_name') || '%'
and pfi.flow_instance_id = pr.flow_instance_id
and pr.param_name_vals is not null
and pr.pay_request_id = ppa.pay_request_id
and ppa.action_type = 'XWr';

SPOOL &spooldrive.&spooldir.&spoolfilebase._arch_balances.csv
select distinct ppa.payroll_action_id, ppra.payroll_rel_action_id,
pname.list_name as person_name,
ppa.effective_date, ppa.start_date,ppa.end_date,
info.action_information_category,
info.action_information45 AS CATEGORY_NAME,
info.action_information42 AS BALANCE_NAME,

27 | ORACLE FUSION GLOBAL PAYROLL PAYSLIP TROUBLESHOOTING


info.action_information61 as RUN,
info.action_information65 AS YTD,
info.action_information69 AS TYTD,
info.action_information76 AS ITD,
info.action_information81 AS PAYSLIP,
info.action_information56 AS AMOUNT,
info.action_information54 AS HOURS,
info.action_information60 AS HOURS_YEAR,
info.action_information55 AS MULTIPLE,
info.action_information53 AS RATE,
info.action_information50 AS ZERO_FLAG,
info.action_information57,
info.action_information58
from pay_payroll_actions ppa,pay_payroll_rel_actions ppra,
pay_action_information info,
pay_pay_relationships_dn pprd,
per_person_names_f pname,PER_ALL_PEOPLE_F per
where ppa.payroll_action_id = ppra.payroll_action_id
and info.ACTION_CONTEXT_ID = ppra.payroll_rel_action_id
and ppa.action_type ='PS'
and ppa.EFFECTIVE_DATE between to_date('&&start_date', 'YYYY/MM/DD') and to_date('&&end_date',
'YYYY/MM/DD')
and ppra.payroll_relationship_id = pprd.payroll_relationship_id
and pprd.person_id = pname.person_id
and pname.person_id = per.person_id
and pname.name_type='GLOBAL'
and per.person_number ='&&person_number';
SPOOL OFF
SET TERMOUT ON
PROMPT &spooldrive.&spooldir.&spoolfilebase._arch_balances.csv completed.
SET TERMOUT OFF

select to_char(ppa.start_date, 'YYYY/MM/DD') start_date,


to_char(ppa.effective_date, 'YYYY/MM/DD') end_date
from
pay_flow_instances pfi,
pay_requests pr,
pay_payroll_actions ppa
where pfi.instance_name like '%' || trim('&&payslip_flow_name') || '%'
and pfi.flow_instance_id = pr.flow_instance_id
and pr.param_name_vals is not null
and pr.pay_request_id = ppa.pay_request_id
and ppa.action_type = 'XWr';

SPOOL &spooldrive.&spooldir.&spoolfilebase._arch_payroll.csv
select distinct ppa.payroll_action_id, ppra.payroll_rel_action_id,
pname.list_name as person_name,
ppa.effective_date, ppa.start_date,ppa.end_date,
info.action_information_category,
info.action_information41,
info.action_information42,
info.action_information43,
info.action_information44,
info.action_information45,
info.action_information46,
info.action_information47,
info.action_information48,
info.action_information49,
info.action_information50,
info.action_information51,
info.action_information17,
info.action_information18
from pay_payroll_actions ppa,pay_payroll_rel_actions ppra,

28 | ORACLE FUSION GLOBAL PAYROLL PAYSLIP TROUBLESHOOTING


pay_action_information info,
pay_pay_relationships_dn pprd,
per_person_names_f pname,PER_ALL_PEOPLE_F per
where ppa.payroll_action_id = ppra.payroll_action_id
and info.ACTION_CONTEXT_ID = ppra.payroll_rel_action_id
and info.action_information_category = 'GLB_PAY_ARCH_PR_PAYROLL_FC'
and ppa.action_type ='PS'
and ppa.EFFECTIVE_DATE between to_date('&&start_date', 'YYYY/MM/DD') and to_date('&&end_date',
'YYYY/MM/DD')
and ppra.payroll_relationship_id = pprd.payroll_relationship_id
and pprd.person_id = pname.person_id
and pname.person_id = per.person_id
and pname.name_type='GLOBAL'
and per.person_number ='&&person_number';
SPOOL OFF
SET TERMOUT ON
PROMPT &spooldrive.&spooldir.&spoolfilebase._arch_payroll.csv completed.
SET TERMOUT OFF

select to_char(ppa.start_date, 'YYYY/MM/DD') start_date,


to_char(ppa.effective_date, 'YYYY/MM/DD') end_date
from
pay_flow_instances pfi,
pay_requests pr,
pay_payroll_actions ppa
where pfi.instance_name like '%' || trim('&&payslip_flow_name') || '%'
and pfi.flow_instance_id = pr.flow_instance_id
and pr.param_name_vals is not null
and pr.pay_request_id = ppa.pay_request_id
and ppa.action_type = 'XWr';

SPOOL &spooldrive.&spooldir.&spoolfilebase._payment.csv
select ppa.payroll_action_id, ppra.payroll_rel_action_id,
pname.list_name as person_name,
xf.FILE_DETAIL_ID
from pay_payroll_actions ppa,pay_payroll_rel_actions ppra,
PAY_FILE_DETAILS xf,
pay_pay_relationships_dn pprd, per_person_names_f pname,
PER_ALL_PEOPLE_F per
where ppa.payroll_action_id = ppra.payroll_action_id
and ppa.action_type in ('H', 'M','A','E', 'PP' )
and ppa.EFFECTIVE_DATE between to_date('&&start_date', 'YYYY/MM/DD') and to_date('&&end_date',
'YYYY/MM/DD')
and xf.source_id(+) = ppra.payroll_rel_action_id
and ppra.payroll_relationship_id = pprd.payroll_relationship_id
and pprd.person_id = pname.person_id
and pname.name_type='GLOBAL'
and pname.person_id = per.person_id
and per.person_number = '&&person_number';
SPOOL OFF
SET TERMOUT ON
PROMPT &spooldrive.&spooldir.&spoolfilebase._payment.csv completed.
SET TERMOUT OFF

select to_char(ppa.start_date, 'YYYY/MM/DD') start_date,


to_char(ppa.effective_date, 'YYYY/MM/DD') end_date
from
pay_flow_instances pfi,
pay_requests pr,
pay_payroll_actions ppa
where pfi.instance_name like '%' || trim('&&payslip_flow_name') || '%'
and pfi.flow_instance_id = pr.flow_instance_id
and pr.param_name_vals is not null

29 | ORACLE FUSION GLOBAL PAYROLL PAYSLIP TROUBLESHOOTING


and pr.pay_request_id = ppa.pay_request_id
and ppa.action_type = 'XWr';

SPOOL &spooldrive.&spooldir.&spoolfilebase._prepayment.csv
select distinct ppa.payroll_action_id, ppra.payroll_rel_action_id,
ppa.effective_date, ppa.start_date,ppa.end_date,
pname.list_name as person_name,
payment.PRE_PAYMENT_ID, payment.value
from pay_payroll_actions ppa,pay_payroll_rel_actions ppra,
PAY_PRE_PAYMENTS payment,
pay_pay_relationships_dn pprd,
per_person_names_f pname,PER_ALL_PEOPLE_F per
where ppa.payroll_action_id = ppra.payroll_action_id
and ppa.action_type in ('P','U')
and ppa.EFFECTIVE_DATE between to_date('&&start_date', 'YYYY/MM/DD') and to_date('&&end_date',
'YYYY/MM/DD')
and ppra.payroll_rel_action_id = payment.payroll_rel_action_id(+)
and ppra.payroll_relationship_id = pprd.payroll_relationship_id
and pprd.person_id = pname.person_id
and pname.person_id = per.person_id
and pname.name_type='GLOBAL'
and per.person_number = '&&person_number';
SPOOL OFF
SET TERMOUT ON
PROMPT &spooldrive.&spooldir.&spoolfilebase._prepayment.csv completed.
SET TERMOUT OFF

select to_char(ppa.start_date, 'YYYY/MM/DD') start_date,


to_char(ppa.effective_date, 'YYYY/MM/DD') end_date
from
pay_flow_instances pfi,
pay_requests pr,
pay_payroll_actions ppa
where pfi.instance_name like '%' || trim('&&payslip_flow_name') || '%'
and pfi.flow_instance_id = pr.flow_instance_id
and pr.param_name_vals is not null
and pr.pay_request_id = ppa.pay_request_id
and ppa.action_type = 'XWr';

SPOOL &spooldrive.&spooldir.&spoolfilebase._run_results.csv
SELECT DISTINCT pa.payroll_action_id,
pa.EFFECTIVE_DATE,
pa.action_type,
pa.ACTION_STATUS,
pra.payroll_rel_action_id,
pra.ACTION_STATUS,
pra.RETRO_COMPONENT_ID,
prtype.RUN_TYPE_NAME,
pra.SOURCE_ACTION_ID
, pra.SOURCE_ID,
pname.list_name AS person_name,
rr.run_result_id,
RR.start_date,
rr.end_date,
pet.base_element_name,
pet.element_name,
pet.reporting_name AS ele_reporting_name,
piv.base_name AS input_value_name,
piv.reserved_input_value,
rrv.result_value,
pbt.base_balance_name,
pbt.balance_name,
pbt.reporting_name

30 | ORACLE FUSION GLOBAL PAYROLL PAYSLIP TROUBLESHOOTING


FROM fusion.pay_run_results rr,
fusion.pay_run_result_values rrv,
fusion.pay_payroll_actions pa,
fusion.pay_payroll_rel_actions pra,
fusion.pay_element_types_vl pet,
fusion.pay_input_values_vl piv,
fusion.pay_balance_types_vl pbt,
fusion.pay_balance_feeds_f pbf,
fusion.pay_pay_relationships_dn pprd,
fusion.per_person_names_f pname,
fusion.per_all_people_f per,
fusion.PAY_RUN_TYPES_VL prtype
WHERE pname.name_type ='GLOBAL'
AND per.person_number = '&&person_number'
AND pa.EFFECTIVE_DATE between to_date('&&start_date', 'YYYY/MM/DD') and
to_date('&&end_date', 'YYYY/MM/DD')
AND pname.person_id = per.person_id
AND pa.payroll_action_id = pra.payroll_action_id
AND pra.payroll_rel_action_id = rr.payroll_rel_action_id
AND pprd.payroll_relationship_id=pra.payroll_relationship_id
AND pprd.person_id =pname.person_id
AND rr.run_result_id = rrv.run_result_id
AND rr.element_type_id = pet.element_type_id
AND rrv.input_value_id = piv.input_value_id
AND piv.input_value_id = pbf.input_value_id (+)
AND pbf.balance_type_id = pbt.balance_type_id (+)
AND pra.RUN_TYPE_ID =prtype.RUN_TYPE_ID(+)
ORDER BY pname.list_name,
pra.payroll_rel_action_id,
rr.run_result_id,
pbt.base_balance_name;
SPOOL OFF
SET TERMOUT ON
PROMPT &spooldrive.&spooldir.&spoolfilebase._run_results.csv completed.
SET TERMOUT OFF

SPOOL &spooldrive.&spooldir.&spoolfilebase._element_entries.csv
select distinct
to_char(pee.person_id) as person_id,
peo.person_number,
to_char(pee.element_entry_id) as element_entry_id,
to_char(pet.element_type_id) as element_type_id,
pet.base_element_name,
pet.processing_type as type,
pet.use_at_rel_level as rel,
pet.use_at_term_level as term,
pet.use_at_asg_level as asg,
pet.multiple_entries_allowed_flag as mult,
pee.entry_type,
pee.creator_type,
to_char(pee.creator_id) as creator_id,
pee.multiple_entry_count as mec,
pee.object_version_number as ee_ovn,
to_char(pee.effective_start_date, 'YYYY/MM/DD') as ee_start,
to_char(pee.effective_end_date, 'YYYY/MM/DD') as ee_end,
to_char(peu.entry_usage_id) as usage_id,
to_char(peu.payroll_relationship_id) as relationship_id,
to_char(peu.payroll_term_id) as term_id,
to_char(peu.assigned_payroll_id) as ap_id,
to_char(peu.payroll_assignment_id) as assignment_id,
to_char(peu.date_from, 'YYYY/MM/DD') as date_from,
to_char(peu.date_to, 'YYYY/MM/DD') as date_to,
peu.usage_level,

31 | ORACLE FUSION GLOBAL PAYROLL PAYSLIP TROUBLESHOOTING


to_char(pev.element_entry_value_id) as eev_id,
to_char(pev.effective_start_date, 'YYYY/MM/DD') as eev_start,
to_char(pev.effective_end_date, 'YYYY/MM/DD') as eev_end,
to_char(pev.input_value_id) as iv_id,
pev.object_version_number as ev_ovn,
piv.base_name,
piv.uom,
piv.reserved_input_value,
pev.screen_entry_value,
pev.created_by as pev_creation_date,
pev.creation_date as pev_creation_date,
pev.last_update_date as pev_last_update_date,
pev.last_update_login as pev_last_update_login,
pev.last_updated_by as pev_last_updated_by
from per_all_people_f peo,
pay_element_entries_f pee,
pay_element_entry_values_f pev,
pay_input_values_f piv,
pay_entry_usages peu,
pay_element_types_f pet
where peo.person_number = '&&person_number'
and pee.person_id = peo.person_id
and peu.element_entry_id = pee.element_entry_id
and pev.element_entry_id (+) = pee.element_entry_id
and piv.input_value_id (+) = pev.input_value_id
and pet.element_type_id = pee.element_type_id
order by pee.person_id,
pee.element_entry_id,
ee_start,
peu.entry_usage_id,
date_from,
pev.element_entry_value_id,
eev_start;
SPOOL OFF
SET TERMOUT ON
PROMPT &spooldrive.&spooldir.&spoolfilebase._element_entries.csv completed.
SET TERMOUT OFF

select to_char(ppa.start_date, 'YYYY/MM/DD') start_date,


to_char(ppa.effective_date, 'YYYY/MM/DD') end_date
from
pay_flow_instances pfi,
pay_requests pr,
pay_payroll_actions ppa
where pfi.instance_name like '%' || trim('&&payslip_flow_name') || '%'
and pfi.flow_instance_id = pr.flow_instance_id
and pr.param_name_vals is not null
and pr.pay_request_id = ppa.pay_request_id
and ppa.action_type = 'XWr';

SPOOL &spooldrive.&spooldir.&spoolfilebase._delivery_options.csv
SELECT distinct ext_del.ext_delivery_option_id,
ext_del.BASE_DELIVERY_OPTION_NAME,
ext_del.BIP_report_name,
ext_del.BIP_template_name,
ext_del.output_type,
ext_del.output_name,
ext_del.output_directory_name,
ext_del.delivery_type
FROM fusion.pay_rep_cat_components prcc,
fusion.pay_payroll_actions ppa,
fusion.per_ext_delivery_options_b ext_del,
fusion.per_ext_definitions_b ext

32 | ORACLE FUSION GLOBAL PAYROLL PAYSLIP TROUBLESHOOTING


WHERE ppa.payroll_action_id IN
( SELECT DISTINCT ppa.payroll_action_id
FROM pay_payroll_actions ppa,
pay_report_categories rc
WHERE ppa.action_type = 'XWr'
AND ppa.EFFECTIVE_DATE between to_date('&&start_date', 'YYYY/MM/DD') and
to_date('&&end_date', 'YYYY/MM/DD')
AND ppa.report_category_id = rc.report_category_id
AND rc.base_category_name = 'Payslip'
AND rownum =1
UNION ALL
SELECT -1 FROM dual
)
AND prcc.report_category_id = ppa.report_category_id
AND prcc.style_sheet_id = ext_del.ext_delivery_option_id
AND ext_del.ext_definition_id=ext.ext_definition_id
AND ppa.effective_date BETWEEN NVL(ext_del.date_from,to_date('01/01/0001','DD/MM/YYYY')) AND
NVL(ext_del.date_to,to_date('31/12/4712','DD/MM/YYYY'))
AND ((prcc.enterprise_id =0
AND prcc.legislation_code IS NULL
AND prcc.legislative_data_group_id IS NULL)
OR (prcc.legislation_code IS NOT NULL
AND prcc.legislation_code =NVL(ppa.legislation_code,prcc.legislation_code))
OR (prcc.enterprise_id =ppa.enterprise_id
AND prcc.legislative_data_group_id IS NULL)
OR (prcc.legislative_data_group_id IS NOT NULL
AND prcc.legislative_data_group_id =NVL(ppa.legislative_data_group_id,prcc.legislative_data_group_id)))
AND NOT EXISTS
(SELECT 1
FROM fusion.per_ext_delivery_options_b del_opt2
WHERE del_opt2.override_delivery_option_id=ext_del.ext_delivery_option_id
AND del_opt2.ext_definition_id =ext.ext_definition_id
AND ((ext_del.enterprise_id =0
AND ext_del.legislation_code IS NULL
AND del_opt2.legislation_code IS NOT NULL
AND del_opt2.legislation_code =ppa.legislation_code )
OR (ext_del.enterprise_id =0
AND del_opt2.enterprise_id IS NOT NULL
AND del_opt2.legislative_data_group_id IS NULL
AND del_opt2.enterprise_id =ppa.enterprise_id )
OR (ext_del.enterprise_id =0
AND del_opt2.legislative_data_group_id IS NOT NULL
AND del_opt2.legislative_data_group_id =ppa.legislative_data_group_id )
OR (ext_del.enterprise_id! =0
AND ext_del.legislative_data_group_id IS NULL
AND del_opt2.legislative_data_group_id IS NOT NULL
AND del_opt2.legislative_data_group_id =ppa.legislative_data_group_id ))
);

SPOOL OFF
SET TERMOUT ON
PROMPT &spooldrive.&spooldir.&spoolfilebase._delivery_options.csv completed.
SET TERMOUT OFF

SPOOL &spooldrive.&spooldir.&spoolfilebase._delivery_preference.csv
select peo.person_number,
per_report_preferences.get_del_pref_by_sysdoctype('GLB_PAYSLIP', 'PRINT', peo.person_id,
'PERSON_ID', prl.enterprise_id) as paper_payslip,
per_report_preferences.get_del_pref_by_sysdoctype('GLB_PAYSLIP', 'DOR', peo.person_id, 'PERSON_ID',
prl.enterprise_id) as online_payslip
from PER_ALL_PEOPLE_F peo,
PAY_PAY_RELATIONSHIPS_DN prl
where peo.person_number = '&&person_number'

33 | ORACLE FUSION GLOBAL PAYROLL PAYSLIP TROUBLESHOOTING


and peo.person_id = prl.person_id;
SPOOL OFF
SET TERMOUT ON
PROMPT &spooldrive.&spooldir.&spoolfilebase._delivery_preference.csv completed.
SET TERMOUT OFF
REM PAYSLIP QUERIES END

REM window commands


REM host c:\PROGRA~1\7-Zip\7z.exe a -y &spooldrive.&spooldir.&spoolfilebase._output.zip
&spooldrive.&spooldir.&spoolfilebase.*.*
REM host explorer.exe &spooldrive.&spooldir
REM host start https://bugsftp.us.oracle.com/bug/faces/BugUploadMain.jspx?bug=&&bug_or_sr_reference
REM unix commands
REM host zip -q9m &spooldrive.&spooldir.&spoolfilebase._output.zip &spooldrive.&spooldir.&spoolfilebase.*
REM host ls -ltr &spooldrive.&spooldir
SET TERMOUT ON
PROMPT .
set termout off feedback off pages 0 heading off underline off escape off
SPOOL &spooldrive.&spooldir.&spoolfilebase._os_specific_zip_cmds.sql
select DECODE(program
,'SQL Developer','host c:\PROGRA~1\7-Zip\7z.exe a -y
&spooldrive.&spooldir.&spoolfilebase._output.zip &spooldrive.&spooldir.&spoolfilebase.*.*' -- assume sql
developer will run from windows
,'sqlplusw.exe','host c:\PROGRA~1\7-Zip\7z.exe a -y
&spooldrive.&spooldir.&spoolfilebase._output.zip &spooldrive.&spooldir.&spoolfilebase.*.*'
,'sqlplus.exe','host c:\PROGRA~1\7-Zip\7z.exe a -y &spooldrive.&spooldir.&spoolfilebase._output.zip
&spooldrive.&spooldir.&spoolfilebase.*.*'
,'Toad.exe','host c:\PROGRA~1\7-Zip\7z.exe a -y &spooldrive.&spooldir.&spoolfilebase._output.zip
&spooldrive.&spooldir.&spoolfilebase.*.*'
,'host zip -q9m &spooldrive.&spooldir.&spoolfilebase._output.zip
&spooldrive.&spooldir.&spoolfilebase.*' -- most likely a sqlplus client from unix
)
from v$session WHERE sid = USERENV('sid');
SPOOL OFF;
set termout on
PROMPT .
PROMPT =========================================================================
PROMPT .
PROMPT Attempting to zip output files...
PROMPT .
start &spooldrive.&spooldir.&spoolfilebase._os_specific_zip_cmds.sql
PROMPT .
PROMPT Show/list output files...
set termout off feedback off pages 0 heading off underline off
SPOOL &spooldrive.&spooldir.&spoolfilebase._os_specific_filelist_cmds.sql
select DECODE(program
,'SQL Developer','host explorer.exe &spooldrive.&spooldir' -- assume sql developer will run from
windows
,'sqlplusw.exe','host explorer.exe &spooldrive.&spooldir'
,'sqlplus.exe','host explorer.exe &spooldrive.&spooldir'
,'Toad.exe','host explorer.exe &spooldrive.&spooldir'
,'host ls -ltr &spooldrive.&spooldir' -- most likely a sqlplus client from unix
)
from v$session WHERE sid = USERENV('sid');
SPOOL OFF;
set termout on
start &spooldrive.&spooldir.&spoolfilebase._os_specific_filelist_cmds.sql
PROMPT .
PROMPT ========================================================================
PROMPT This SQL script has now completed. It would have produce one of more
PROMPT output files at this location:
PROMPT .
PROMPT &spooldrive.&spooldir

34 | ORACLE FUSION GLOBAL PAYROLL PAYSLIP TROUBLESHOOTING


PROMPT .
PROMPT The script attempts to use 7zip on windows ,if installed, or zip on unix
PROMPT to create a zipped up file, typically as:
PROMPT .
PROMPT &spooldrive.&spooldir.&spoolfilebase._output.zip
PROMPT .
PROMPT On occasion the zip may fail. If so, please execute a manual archive/zip step.
PROMPT .
PROMPT Please upload the output zip file to the given bug/SR as an attachment and inform Oracle Support.
PROMPT URLs for your reference
PROMPT .
PROMPT Bug https://bug.oraclecorp.com/pls/bug/webbug_print.show?c_rptno=&&bug_or_sr_reference
PROMPT SR
https://support.us.oracle.com/oip/faces/secure/srm/srview/SRViewStandaloneCerberus.jspx?sr=&&bug_or_s
r_reference
PROMPT Thank you!
PROMPT ========================================================================
UNDEFINE bug_or_sr_reference
UNDEFINE person_number
UNDEFINE payslip_flow_name

Note: This script requires 2 mandatory parameters: PERSON NUMBER and PAYSLIP FLOW NAME flow name.

Follow these steps to run diagnostic script:

1) Connect to the database using SQL*Plus (SQLplus), for the environment associated to this bug/SR.
2) Using SQL*Plus (linux or windows) run the following command:
"START Diagnostic.SQL"

It will prompt for SR or bug reference. It uses that to store the output in a distinct directory for each run.

It will also ask for the PERSON NUMBER and PAYSLIP FLOW NAME and use that to fetch data.

If you need to ask Cloud Ops to execute the script, please specific application environment name and parameter
values.

Example:

Please help to run Diagnostic.SQL on pod HCDL with following parameters.

For cloud ops, please check Diagnostic_script_READ_ME_for_cloud_ops.txt for instructions.

Parameter values for script:

person_number: 955160008181673

payslip_flow_name: SS_Payslip_Jan2014_CDRM_13thDec

7.4 Payslip Monitor SQL


payslip_monitor_sql
SELECT T_A.INSTANCE_NAME,
T_A.XMLEXTRACT_SUCCESS_COUNT
||'/'
||T_A.XMLEXTRACT_TOTAL_COUNT AS "XML
Extract_Processed/Total", T_A.XMLEXTRACT_START_DATE
AS "XML Extract_Start Time",
T_A.XMLEXTRACT_END_DATE AS "XML Extract_End Time",

35 | ORACLE FUSION GLOBAL PAYROLL PAYSLIP TROUBLESHOOTING


||'/'
||T_A.BIP_TOTAL_COUNT AS "BIP_Processed/Total",
T_A.BIP_START_DATE AS "BIP_Start Time",
T_A.BIP_END_DATE AS "BIP_End Time",
T_A.DOR_SUCCESS_COUNT
||'/'
||T_A.DOR_TOTAL_COUNT AS "DOR_Processed/Total",
T_A.DOR_START_DATE AS "DOR_Start Time",
T_A.DOR_END_DATE AS "DOR_End Time",
nvl(T_B.MISSING_PAYSLIP_COUNT, 0) AS "MISSING_PAYSLIP_COUNT"
FROM
(SELECT INSTANCE_NAME AS INSTANCE_NAME,
SUM(XMLEXTRACT_SUCCESS_COUNT) AS XMLEXTRACT_SUCCESS_COUNT,
SUM(XMLEXTRACT_TOTAL_COUNT) AS XMLEXTRACT_TOTAL_COUNT,
MIN(XMLEXTRACT_START_DATE) AS XMLEXTRACT_START_DATE,
MAX(XMLEXTRACT_END_DATE) AS XMLEXTRACT_END_DATE,
SUM(BIP_SUCCESS_COUNT) AS BIP_SUCCESS_COUNT,
SUM(BIP_TOTAL_COUNT) AS BIP_TOTAL_COUNT,
MIN(BIP_START_DATE) AS BIP_START_DATE,
MAX(BIP_END_DATE) AS BIP_END_DATE,
SUM(DOR_SUCCESS_COUNT) AS DOR_SUCCESS_COUNT,
SUM(DOR_TOTAL_COUNT) AS DOR_TOTAL_COUNT,
MIN(DOR_START_DATE) AS DOR_START_DATE,
MAX(DOR_END_DATE) AS DOR_END_DATE
FROM
(SELECT T_A.INSTANCE_NAME
||'-'
||T_A.flow_task_name AS INSTANCE_NAME,
T_A.JOB_TYPE,
T_A.START_TIME,
T_A.END_TIME,
T2.action_status,
T2.rel_action_id
FROM
( SELECT DISTINCT fi.INSTANCE_NAME,
ft.flow_task_name,
DECODE(REQ_HIS.DEFINITION,
'JobDefinition://oracle/apps/ess/hcm/processFlows/core/FlowEssJobDefn', 'Flow',
'JobDefinition://oracle/apps/ess/hcm/batchProcesses/core/ArchiveWriteJob', 'XML Extract',
'JobDefinition://oracle/apps/ess/hcm/batchProcesses/core/BIPDelivery', 'BIP',
'JobDefinition://oracle/apps/ess/hcm/batchProcesses/core/ArchiveRepDelJob', 'DOR', 'Unknown') AS
JOB_TYPE,
TO_CHAR(REQ_HIS.PROCESSSTART, 'YYYY-MM-DD HH24:MI:SS')
AS START_TIME,
TO_CHAR(req_his.PROCESSEND, 'YYYY-MM-DD HH24:MI:SS')
AS END_TIME
FROM pay_flow_instances fi,
pay_flow_task_instances fti,
pay_flow_tasks_vl ft,
pay_tasks pt,
pay_requests pr,
fusion_ora_ess.request_history req_his
WHERE fi.CREATION_DATE >= sysdate - 7
AND fi.flow_instance_id = fti.flow_instance_id
AND fti.base_flow_task_id = ft.base_flow_task_id
AND ft.base_task_id = pt.base_task_id
AND pt.base_task_name = 'PAYSLIP'
AND fti.flow_task_instance_id = pr.flow_task_instance_id
AND req_his.INSTANCEPARENTID =pr.call_id
AND CALL_TYPE = 'FLOW_ESS'
) T_A,
(SELECT INSTANCE_NAME,
flow_task_name,

36 | ORACLE FUSION GLOBAL PAYROLL PAYSLIP TROUBLESHOOTING


JOB_TYPE,
action_status,
rel_action_id
FROM
(SELECT pfi.instance_name,
pft.flow_task_name,
pa.payroll_action_id,
DECODE(pa.action_type, 'XWr', 'XML Extract', NULL) AS JOB_TYPE,
pra.payroll_rel_action_id AS rel_action_id,
pra.action_status
FROM pay_flow_instances pfi,
pay_flow_task_instances pfti,
pay_flow_tasks_vl pft,
pay_tasks pt,
pay_requests pr,
pay_payroll_actions pa,
pay_payroll_rel_actions pra
WHERE pfi.CREATION_DATE >= sysdate - 7
AND pfi.flow_instance_id = pfti.flow_instance_id
AND pfti.base_flow_task_id = pft.base_flow_task_id
AND pft.base_task_id = pt.base_task_id
AND pt.base_task_name = 'PAYSLIP'
AND pfti.flow_task_instance_id = pr.flow_task_instance_id
AND pr.pay_request_id = pa.pay_request_id
AND pa.action_type = 'XWr'
AND pa.payroll_action_id = pra.payroll_action_id(+)
UNION ALL
SELECT pfi.instance_name,
pft.flow_task_name,
pa.payroll_action_id,
DECODE(pa.action_type, 'XRD', 'DOR', NULL) AS JOB_TYPE,
ptoa.TEMP_OBJECT_ACTION_ID AS rel_action_id,
ptoa.action_status
FROM pay_flow_instances pfi,
pay_flow_task_instances pfti,
pay_flow_tasks_vl pft,
pay_tasks pt,
pay_requests pr,
pay_payroll_actions pa,
pay_temp_object_actions ptoa
WHERE pfi.CREATION_DATE >= sysdate - 7
AND pfi.flow_instance_id = pfti.flow_instance_id
AND pfti.base_flow_task_id = pft.base_flow_task_id
AND pft.base_task_id = pt.base_task_id
AND pt.base_task_name = 'PAYSLIP'
AND pfti.flow_task_instance_id = pr.flow_task_instance_id
AND pr.pay_request_id = pa.pay_request_id
AND pa.action_type = 'XRD'
AND PA.PAYROLL_ACTION_ID = PTOA.PAYROLL_ACTION_ID(+)
)
) T2
WHERE T_A.INSTANCE_NAME = T2.INSTANCE_NAME(+)
AND T_A.FLOW_TASK_NAME = T2.FLOW_TASK_NAME(+)
AND T_A.JOB_TYPE = T2.JOB_TYPE(+)
) PIVOT ( COUNT(
CASE
WHEN action_status = 'C'
THEN REL_ACTION_ID
ELSE NULL
END) AS SUCCESS_COUNT, COUNT(REL_ACTION_ID) AS TOTAL_COUNT, MIN(START_TIME) AS
START_DATE, MAX(END_TIME) AS END_DATE FOR JOB_TYPE IN ('XML Extract' AS XMLExtract,'BIP'
AS BIP,'DOR' AS DOR))
GROUP BY INSTANCE_NAME

37 | ORACLE FUSION GLOBAL PAYROLL PAYSLIP TROUBLESHOOTING


) T_A,
(SELECT FI.INSTANCE_NAME
||'-'
||PFT.FLOW_TASK_NAME AS INSTANCE_NAME,
COUNT(pra.payroll_rel_action_id) AS MISSING_PAYSLIP_COUNT
FROM pay_flow_instances fi,
pay_flow_task_instances pfti,
pay_flow_tasks_vl pft,
pay_tasks pt,
pay_requests pr,
pay_payroll_actions ppa,
pay_payroll_rel_actions pra
WHERE fi.creation_date >= sysdate - 7
AND fi.flow_instance_id = pfti.flow_instance_id
AND pfti.base_flow_task_id = pft.base_flow_task_id
AND pft.base_task_id = pt.base_task_id
AND pt.base_task_name = 'PAYSLIP'
AND pfti.flow_task_instance_id = pr.flow_task_instance_id
AND pr.pay_request_id = ppa.pay_request_id
AND ppa.action_type ='XWr'
AND ppa.PAYROLL_ACTION_ID = pra.PAYROLL_ACTION_ID(+)
AND NOT EXISTS
(SELECT 1
FROM hr_documents_of_record dor
WHERE dei_information_category LIKE '%PAYSLIP%'
AND dor.related_object_id =pra.payroll_rel_action_id
AND upper(dor.related_object_id_col) = 'PAYROLL_REL_ACTION_ID'
)
GROUP BY fi.instance_name
||'-'
||pft.flow_task_name
) T_B
WHERE T_A.INSTANCE_NAME = T_B.INSTANCE_NAME(+)
ORDER BY T_A.INSTANCE_NAME;

This query will return details of payslip processes submitted in last 7 days.

7.5 Get additional information from Archive Payroll Information and Generate Report process log

38 | ORACLE FUSION GLOBAL PAYROLL PAYSLIP TROUBLESHOOTING


We can get follow information from this log file:

1) XWr (Archive Payroll information and Generate Report) process id is 52198


2) pay_request_id: 300100094029973
3) Two BI Publisher jobs were submitted:

39 | ORACLE FUSION GLOBAL PAYROLL PAYSLIP TROUBLESHOOTING


Process BIP Delivery Delivery Status
ID Job Option Type
Name Name
52199 52199 US DOR Succeeded
Online
Payslip
52200 52200 US PRINT Succeeded
Printed
Payslip
Note: BIP Job name is same as process ID

4) XRD (Report Delivery, aka DOR, Archive Integration with Document of Records) process id is 52201, and
status is completed.

5) Process Start Time and Process End Time


6) BIP job and DOR job duration
- PROC_BIP_JOBS_START_DATE - PROC_BIP_JOBS_END_DATE

- PROC_DEL_UCM_DOR_START_DATE - PROC_DEL_UCM_DOR_END_DATE

7) Number of persons processed (Action Totals section)

40 | ORACLE FUSION GLOBAL PAYROLL PAYSLIP TROUBLESHOOTING


Oracle Fusion Global Payroll: Copyright © 2018, Oracle and/or its affiliates. All rights reserved.
Payslip Troubleshooting
This document is provided for information purposes only, and the contents hereof are subject to change
April 2018 without notice. This document is not warranted to be error-free, nor subject to any other warranties or
conditions, whether expressed orally or implied in law, including implied warranties and conditions of
Oracle Corporation merchantability or fitness for a particular purpose. We specifically disclaim any liability with respect to
World Headquarters this document, and no contractual obligations are formed either directly or indirectly by this document.
500 Oracle Parkway This document may not be reproduced or transmitted in any form or by any means, electronic or
Redwood Shores, CA 94065 mechanical, for any purpose, without our prior written permission.
U.S.A.
Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be
Worldwide Inquiries: trademarks of their respective owners.
Phone: +1.650.506.7000
Fax: +1.650.506.7200 Intel and Intel Xeon are trademarks or registered trademarks of Intel Corporation. All SPARC
trademarks are used under license and are trademarks or registered trademarks of SPARC International,
oracle.com
Inc. AMD, Opteron, the AMD logo, and the AMD Opteron logo are trademarks or registered
trademarks of Advanced Micro Devices. UNIX is a registered trademark of The Open Group. 0113

You might also like