Login
Register
Search
Home
Forums
Jobs
LawsonGuru
LawsonGuru Letter
LawsonGuru Blog
Worthwhile Reading
Infor Lawson News Feed
Store
Store FAQs
About
Forums
Human Capital Management
Lawson S3 HR/Payroll/Benefits
Position History
Home
Forums
Jobs
LawsonGuru
LawsonGuru Letter
LawsonGuru Blog
Worthwhile Reading
Infor Lawson News Feed
Store
Store FAQs
About
Who's On?
Membership:
Latest:
Chris Radcliffe
Past 24 Hours:
0
Prev. 24 Hours:
0
Overall:
5187
People Online:
Visitors:
344
Members:
0
Total:
344
Online Now:
New Topics
S3 Customization/Development
Cobol - Extract Current Time
4/24/2024 7:21 PM
How do you extract just the Current System Time in
Lawson Landmark
LPL INSTR Functions
4/5/2024 8:32 PM
I'm writing a simple report using the Create R
Infor SCM
Translating 856 to get the ~ REF^CN^ field
4/3/2024 8:24 PM
We are trying to get the tracking number which is
IPA/ProcessFlow
Sample XML file create Flow
4/3/2024 3:43 PM
Hello everyone, I am new to creating XML files
Lawson S3 HR/Payroll/Benefits
bn105 error message
3/26/2024 6:40 PM
I need to change some of the set ups in our Life I
IPA/ProcessFlow
IPA executing Job
3/13/2024 7:08 PM
New to the IPA world and was wondering, can an IPA
Lawson S3 HR/Payroll/Benefits
Life Age Reduction on benefits plans
3/12/2024 7:15 PM
For our optional life we have an age based coverag
Lawson S3 HR/Payroll/Benefits
BN53.1 Add-In
3/7/2024 3:31 PM
We are migrating to Solstice. They require a
Lawson Business Intelligence/Reporting/Crystal
Domain Name Change
3/5/2024 7:45 PM
Our domain name needs to change and was hoping I c
S3 Customization/Development
Cobol calling Shell Script
2/29/2024 1:27 PM
Has anyone created or modified a Lawson Cobol prog
Top Forum Posters
Name
Points
Greg Moeller
4184
David Williams
3349
JonA
3288
Kat V
2984
Woozy
1973
Jimmy Chiu
1883
Kwane McNeal
1437
Ragu Raghavan
1351
Roger French
1311
mark.cook
1244
Forums
Unanswered
Active Topics
Most Liked
Most Replies
Search Forums
Search
Advanced Search
Topics
Posts
Prev
Next
Forums
Lawson S3 HR/Payroll/Benefits
Position History
Sort:
Oldest First
Most Recent First
You are not authorized to post a reply.
Author
Messages
jph826
Advanced Member
Posts: 28
6/24/2013 6:27 PM
I need to write a Crystal report that shows each job an employee has ever had, the start date, and the amount of years/mths in that position. The PAEMPPOS table is difficult to report off of, as there is a position record for every raise, pl/dept or super change. The HRHISTORY table, FLD NBR 19 has the data, but I'm not sure how to calculate the amount of time in the position. For example, employee 1000:
Beg Date 10/18/2004, Position 0194
Beg Date 10/21/2007, Position 0171
Beg Date 10/21/2007, Position 0194 (the 0171 must have been a mistake, and a correction was entered on the same date)
Beg Date 9/21/2008, Position 0326
Beg Date 3/24/13, Position 3564
Beg Date 6/1/2013, Position 0194
The report needs to show the Beg Date, the Position and length of time in the position. If they were in a position more than once, each needs to be listed individually. Any help would be most appreciated. Thank you
Mary Porter
Veteran Member
Posts: 337
6/24/2013 6:35 PM
Are you using Assignment date in PA13? If so you could use DATE_ASSIGN in the PAEMPPOS table since that doesn't change when salary changes ... it's been helpful for me when I've had to pull that.
jph826
Advanced Member
Posts: 28
6/24/2013 7:37 PM
Thanks for your response Mary. I checked, and it doesn't look like we are using that field.
Shane Jones
Veteran Member
Posts: 460
7/20/2013 10:55 PM
Not sure if this is what you are looking for but if you have the report sorted ascending by the "Beg_Date" and you use a formula with previous(Beg_Date) it will let you use the previous Beg_Date to calculate the length of time in a position. [The last column shows what you would see with a formula showing previous(Beg_Date).]
Beg Date 9/21/2008, Position 0326, NULL
Beg Date 3/24/13, Position 3564, 9/21/2008
Beg Date 6/1/2013, Position 0194, 3/24/2013
However, to make this work you might want to think a bit about how to do the formulas to adjust for the first and last records and to show the title with the right information. You can use the previous() for other fields to display information on the next line if needed.
Good luck!
Dave Curtis
Veteran Member
Posts: 136
7/21/2013 9:34 PM
I have a SQL statement that pulls this type of report. It "cleans up" the repeat records in PAEMPPOS. Are you on Oracle?
PattyG
Advanced Member
Posts: 22
7/22/2013 11:38 AM
I would like a copy of the SQL statement please. patriica.goforth@msj.org
Dave Curtis
Veteran Member
Posts: 136
7/22/2013 12:09 PM
SELECT jd.company
,jd.employee
,jd.last_name
,jd.first_name
,jd.adj_hire_date
,jd.date_hired
,jd.term_date
,jd.status
,jd.position
,jd.job_code
,jd.title
,jd.process_level
,jd.department
,jd.dept_name
,jd.effect_date
,jd.job_end_date
,ROUND((MONTHS_BETWEEN(NVL(jd.job_end_date,SYSDATE),jd.effect_date))/12,2) as years_in_job
,jd.prev_position
,jd.prev_job_code
,jd.prev_title
,jd.prev_process_level
,jd.prev_department
,jd.prev_dept_name
FROM (SELECT po.*
,CASE WHEN (CASE WHEN po.end_date = to_date('01011700','mm/dd/yyyy') THEN NULL
ELSE (LEAD(po.effect_date, 1)
OVER(PARTITION BY po.employee ORDER BY po.effect_date))-1 END) IS NULL
THEN po.term_date
ELSE (CASE WHEN po.end_date = to_date('01011700','mm/dd/yyyy') THEN NULL
ELSE (LEAD(po.effect_date, 1)
OVER(PARTITION BY po.employee ORDER BY po.effect_date))-1 END) END as job_end_date
FROM (SELECT p.*
,LAG(p.position, 1) OVER(PARTITION BY p.employee ORDER BY p.effect_date) as prev_position
,LAG(p.fte, 1) OVER(PARTITION BY p.employee ORDER BY p.effect_date) as prev_fte
,LAG(p.job_code, 1) OVER(PARTITION BY p.employee ORDER BY p.effect_date) as prev_job_code
,LAG(p.title, 1) OVER(PARTITION BY p.employee ORDER BY p.effect_date) as prev_title
,LAG(p.process_level, 1) OVER(PARTITION BY p.employee ORDER BY p.effect_date) as prev_process_level
,LAG(p.department, 1) OVER(PARTITION BY p.employee ORDER BY p.effect_date) as prev_department
,LAG(p.dept_name, 1) OVER(PARTITION BY p.employee ORDER BY p.effect_date) as prev_dept_name
FROM (SELECT p.company
,p.employee
,trim(e.last_name) as last_name
,trim(e.first_name) as first_name
,e.adj_hire_date
,e.date_hired
,NULLIF(e.term_date, to_date('01011700','mm/dd/yyyy')) as term_date
,e.emp_status as status
,p.position
,p.pos_level
,p.fte
,p.effect_date
,p.end_date
,p.job_code
,j.description as title
,p.process_level
,p.department
,d.r_name as dept_name
FROM paemppos p
JOIN jobcode j ON (p.job_code = j.job_code)
JOIN deptcode d ON (p.process_level = d.process_level AND
p.department = d.department)
JOIN employee e ON (p.employee = e.employee)
WHERE pos_level = 1
ORDER BY p.employee,p.pos_level,p.effect_date) p) po
WHERE po.job_code <> po.prev_job_code
OR po.prev_job_code IS NULL) jd
--Created By Dave Curtis
--Jan-2012
--This SQL statement is intended to be used to pull job history and provide the length of
--time spent in a specific job
--the statement uses PAEMPPOS to pull the history
--The statement is set up to only pull position level 1
Dave Curtis
Veteran Member
Posts: 136
7/22/2013 12:16 PM
This is the basic SQL statement used. I alter it as needed, - like when I need to run a report that shows how long someone was in a specific position (defined as in a specific job within a specific department) - then I alter the SQL so the WHERE clause at the bottom is
WHERE (po.process_level <> po.prev_process_level
OR po.prev_process_level IS NULL)
OR (po.department <> po.prev_department
OR po.prev_department IS NULL)
OR (po.job_code <> po.prev_job_code
OR po.prev_job_code IS NULL)
Depending on how you use positions and how/if you use multiple positions, you may also want to change the SQL so it includes position levels other than 1. This can add another level of complexity to it, but it can be altered to pull in multiple positions as well.
Feel free to e-mail me if you have questions about the SQL statement I posted. I would be more than willing to help if I can.
dave.curtis.theq@gmail.com
Attachments
001_job_hist_data.txt
Dave Curtis
Veteran Member
Posts: 136
7/22/2013 12:20 PM
PattyG - I tried to e-mail you the statement but my e-mail kept returning the e-mail saying it was not able to deliver the e-mail.
PattyG
Advanced Member
Posts: 22
7/22/2013 12:29 PM
can you tell me the table name? patricia.goforth@msj.org
Mis-spelled my name last reply
Dave Curtis
Veteran Member
Posts: 136
7/22/2013 2:20 PM
PAEMPPOS is the table
You are not authorized to post a reply.