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:
BDell92
Past 24 Hours:
0
Prev. 24 Hours:
0
Overall:
5275
People Online:
Visitors:
511
Members:
0
Total:
511
Online Now:
New Topics
Lawson S3 Financials
Applying credits to open AP invoices
4/28/2025 1:26 PM
Hello, I am new to the Lawson system and after ru
Lawson S3 Financials
Lawson APIA
4/28/2025 1:22 PM
Has anybody recently installed Lawson's APIA m
Lawson S3 Procurement
Tolerance Settings
3/31/2025 2:01 PM
I've been trying to set a tolerance for some t
Dealing with Lawson / Infor
Printing Solutions other than MHC
3/27/2025 1:00 PM
What are others using for printing solutions besid
Lawson S3 Procurement
Green check marks in Lawson 9.0.1
3/20/2025 4:55 PM
Hi, How to remove green check mark on items when o
Lawson S3 HR/Payroll/Benefits
Pay Rate History to Show All Positions
2/26/2025 3:34 PM
Does anyone know how to modify payratehistory.htm
Infor CloudSuite
How to build a Pre-Prod tenant
2/7/2025 1:28 AM
After we finished our implementation and ended our
Lawson S3 Procurement
Browser issue with RQC Shopping
1/28/2025 5:49 PM
Since the recent Chrome/Edge updates, our RQC shop
Lawson S3 Procurement
S3-Procurement New Company
1/22/2025 10:38 PM
My Accounting Department has created a new Company
S3 Customization/Development
JUSTIFIED RIGHT
1/15/2025 7:41 PM
Is there a way in Lawson COBOL to make a character
Top Forum Posters
Name
Points
Greg Moeller
4184
David Williams
3349
JonA
3291
Kat V
2984
Woozy
1973
Jimmy Chiu
1883
Kwane McNeal
1437
Ragu Raghavan
1375
Roger French
1315
mark.cook
1244
Forums
Filtered Topics
Unanswered
Unresolved
Announcements
Active Topics
Most Liked
Most Replies
Search Forums
Search
Advanced Search
Topics
Posts
Prev
Next
Forums
Human Capital Management
Lawson S3 HR/Payroll/Benefits
Position History
Please
login
to post a reply.
10 Replies
1
Subscribed to this topic
68 Subscribed to this forum
Sort:
Oldest First
Most Recent First
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
Split
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
Split
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
Split
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
Split
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
Split
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
Split
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
Split
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
Split
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
Split
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
Split
PAEMPPOS is the table
Please
login
to post a reply.