Academy: HCMA04 Lawson Add-ins for Microsoft Office for Human

Academy: HCMA04
Lawson Add-ins for Microsoft Office for
Human Capital Management - Advanced
Lawson Add-ins for Microsoft Office for Human Capital Management - Advanced
Lawson Add-ins for Microsoft Office for Human
Resources Academy - Advanced
This academy is targeted for experienced users of Lawson Add-ins for Microsoft
Office. We will discuss queries using alternative indexes and conditions and
practice by creating a GL balancing report. Next, we will learn how to override
warnings in an upload. Finally, we will learn and practice the upload to PA52.
Lesson 1: Logging into the CUE server

Login to the Query Wizard

Login to the Upload Wizard
Lesson 2: Database concepts

Indexes

Conditions

Relations

Data file text
Lesson 3: Using the Query Wizard

Using the Query Wizard to create a GL balancing report
Demo
Hands-on
Lesson 4: Using the Upload Wizard

Overriding warnings/soft edits

Demo and Hands-on with HR02
Lesson 5: Uploading Personnel Actions

Using the Upload Wizard to load pending personnel actions to PA52
Lawson Add-ins for Microsoft Office for Human Capital Management - Advanced
Lesson 1
Logging into the CUE server
After you complete this lesson, you will be able to:

Log into the Query Wizard

Log into the Upload Wizard
Lawson Add-ins for Microsoft Office for Human Capital Management - Advanced
1-1
Log into Query Wizard and Upload Wizard
The server name is http://cue.lawson.com
The username is cue### (given to you in class).
The password is lawson12
You will be presented with the Query Wizard/Upload Wizard welcome screen.
1-2
Lesson 1: Logging into the CUE server
Lesson 2
Database concepts
After completing this lesson, you will be familiar with the following concepts:

Indexes

Conditions

Relations

Data file text
Lawson Add-ins for Microsoft Office for Human Capital Management - Advanced
2-1
Indexes
Indexes are a set of fields that can be used to quickly find data. Lawson tables
usually have more than one index. If you have access, you can view the indexes
via the Lawson dbdef utility.
To get to the list of indexes: Enter the productline, press F6, choose files, enter
the table name, press F6, choose Indexes. Press F4 to see the list of indexes.
2-2
Lesson 2: Database Concepts
Conditions
Conditions are additional criteria used to limit query results. Conditions limit
results by specifying a set of values for one of more fields.
Example: Open Payments (Status = 0)
Conditions can also be used on an index, like the “Open” condition on
PYMSET5. Using PYMSET5 will only pull records where the Status = 0.
To get to the list of conditions: Enter the productline, press F6, choose files, enter
the table name, press F6, choose Conditions.
Lawson Add-ins for Microsoft Office for Human Capital Management - Advanced
2-3
Relations
To get to the list of relations: Enter the productline, press F6, choose relations,
enter the filename and press F6 to choose a related table
Data file text
Data file text and Technical text can be accessed via the Lawson Knowledge
Base. The Data file text can show you everything that we have seen in dbdef
except for conditions that are not used on indexes.
Review the following excerpts from data file text.
2-4
Lesson 2: Database Concepts
Lawson Knowledge Base
Field description with value list
Index
Relation
Lawson Add-ins for Microsoft Office for Human Capital Management - Advanced
2-5
Lesson 3
Lesson 3: Using the Query Wizard
After completing this lesson, you will be able to:

Use the Query Wizard to create reports using multiple tables

Create a GL Balancing report

Apply the knowledge learned in Lesson 2
Lawson Add-ins for Microsoft Office for Human Capital Management - Advanced
3-1
Demo and Hands-on
GL Balancing Report
If you need assistance completing this exercise, please check the Appendix at
the back of this packet for screen shots.
Step 1: Log into the Query Wizard. Remember to use the full domain!
Step 2, Fields tab: Choose the productline, PR system code, and PAYMASTR
table
Step 3, Fields tab: Choose the following fields from the PAYMASTR table:
Company, Employee, Check-Id, Check-Nbr
Step 4, Fields tab: Click on the Relations button and Choose the PRDISTRIB
table. Select the following fields from the PRDISTRIB table: DIST-AMT, DISTCOMPANY, DST-ACCT-UNIT, DST-ACCOUNT, DST-SUB-ACCT, DED-CODE,
PCD-SEQ-NBR
Step 5, Criteria tab: Choose the index PYMSET6. For the Company index key,
enter your HR company number. For the Date Stamp index key, enter the date
that you ran the PR197 (the actual run date, not the GL Date, not the pay period
end date). The date format should be YYYYMMDD. Leave the rest of the index
keys blank.
Step 6, Criteria tab: Change the “Maximum Primary Records to Return” so that
it is at least as large as the number of payments closed by PR197. Change the
“Maximum OTM Values to Return” to 100 (or higher if you have more than 100
distributions per check).
Step 7, Subtotals tab: Setup the following subtotals: At each change in
CHECK-ID, Use function Sum, Add subtotal to PRDISTRIB.DIST-AMT
Step 8, Sort tab: Sort By Employee, then by Check Id
Step 9: Click Finish.
Step 10: Change the formatting of the column that includes the distribution
amount (PRDISTRIB.DIST-AMT, by default) to Number to remove the scientific
notation.
Step 11: Collapse the data to the overall total by clicking the level 1 subtotal
button. If the total is 0, then the entire payroll is in balance. View the total for
each employee by clicking the level 2 subtotal button. The total for each
employee should be 0. See the screen shot in the appendix for the location of
the subtotal buttons.
3-2
Lesson 3: Using the Query Wizard
Lesson 4
Lesson 4: Overriding Edits (warnings)
After completing the lesson, you will be able to:

Find the numeric identifier for a message

Find the hidden field used to track warnings (soft edits)

Override warnings in the HR suite
Lawson Add-ins for Microsoft Office for Human Capital Management - Advanced
4-1
Overview of overriding warnings in the HR Suite
Edits are given to prevent a problem. We have ways around edits. First, you
need some background.
There are two types of edits in Lawson, Hard (errors) and Soft (warnings). You
cannot get around hard edits without fixing the problem that caused the edit. This
is true in Portal and in the Upload Wizard. Soft edits, also known as “Double
Transmits” are meant to be warnings. If you read the warning and want to
proceed, you just click the same action button again. (This is why they are called
double transmits- the edit is given on the first attempt, but if you transmit the
action a second time, you don’t get the edit.)
The application must keep track of whether or not you have seen the edit. This is
done through hidden fields. Every time one of these edits is given, the value of a
corresponding field is checked.
Within the HR suite, a convention is followed to track warning messages. When
you see the warning, a value is passed back to a hidden field on the form.
Typically, XMIT is part of the field name. Within the HR suite, the value given to
the field is a 1. So, if the field value is a 1, you have seen the warning already,
and if it is a 0, then you have not seen the warning.
In order to convince the application that you have seen the message, you must
map this field in your upload and give it a value of 1.
We can use this to our advantage in the Upload Wizard. We only need to know
which hidden fields corresponds to a particular edit and we can populate them on
the spreadsheet.
There are two ways that you can find the field name. You can either guess the
name of the field and then confirm how it is used in the program code or you can
find the warning in the program code and determine which field is used to
override it.
4-2
Lesson 4: Overriding Edits
Guess and Confirm
Guess
Look through the available fields in the Upload Wizard “Map Fields” list. The
XMIT fields are usually at the beginning of the field list. The field name implies
its use. Let’s walk through an example:
On HR02, you receive the warning: “Inactivation edit takes time to process; OK to
continue” when changing the status from A to I (inactive). In the Upload Wizard,
we see the field “PT-XMIT-ST-CHG”. Notice that “ST-CHG” looks like an
abbreviation of Status Change. Therefore, that is probably the field that is used
to override the warning. Add this column to your spreadsheet with the value of 1
before you upload.
Lawson Add-ins for Microsoft Office for Human Capital Management - Advanced
4-3
Confirm
Create the source code for the program using the bldsh utility. See your IS
department for specifics at your company. In this example, the syntax is bldsh
prodline hr hr02. This creates the HR02.cbl file. We can open that file and
search for the field that we found in the Upload Wizard. Search for the field PTXMIT-ST-CHG. Right below the field, we see:
MOVE 109
TO CRT-ERROR-NBR.
This means that message number 109 is related to this field.
4-4
Lesson 4: Overriding Edits
Next we must find the text for message 109.
Run the bldmsg utility. Again, see your IS department for the syntax at your
company. In this example, we will run: bldmsg –c prodline hr hr02 | lashow
Next, search for the message number and see if the text matches the warning
you received. Note that there may be more that one message with that number,
so look at all of them.
Finally, we have confirmed that PT-XMIT-ST-CHG is the field used to override
the warning “Inactivation edit takes time to process; OK to continue”. The best
practice is to leave the XMIT field blank on the first upload because you want to
see the message the first time. It may indicate a condition that you want to fix
(i.e. Duplicate Social Number on HR11).
Interpret source code
The second way to determine the field used to override a warning is to read
source code. This is essentially the “Guess and Confirm” method in reverse.
First, use the bldmsg utility to find the message number.
Second, use the bldsh utility to create the program source code. Find the
message number in the source code. You can usually find it by searching for
MOVE ### where ### is the message number. In this example, you would
search for MOVE 109.
Finally, find the XMIT field that is related to that message. It will be located very
close to the MOVE statement that you searched for. Again, a message number
can be used more than one place, so it might not be the first one that you find.
Lawson Add-ins for Microsoft Office for Human Capital Management - Advanced
4-5
Demo and Hands-on
Overriding warnings/soft edits- HR02
The goal of this exercise is to inactivate a department on HR02.
Step 1: Go to HR02 in the Portal and attempt to inactivate a department. Use
the department with the same name as your login id. Notice the edit that is
given. Change the status back to Active.
Step 2: Create a spreadsheet to upload to HR02 to inactivate your department.
Include company, and the following fields from the detail area: FC, process level,
department, description, and status. Also include a field to override the warning.
Step 3: Map the fields in the upload wizard. Determine the fields
names/numbers that you need by using Ctrl-Shift-O in the Portal. To find the edit
override, look for a field with “XMIT” as part of the name. If you need help, you
can find the answer in the Appendix.
Step 4: Upload your data using the Change Only option.
Step 5: Check your work in the Portal
4-6
Lesson 4: Overriding Edits
Lesson 5
Uploading personnel actions to PA52
This lesson gives detailed instructions for successfully using the Query Wizard
and the Upload Wizard to load records to PA52.1.
PA52 is one of the most complicated forms to use with the Upload Wizard. This
lesson describes the intricacies of the form and the process to work around them.
After you complete this lesson, you will be able to:

Query the setup fields from PA50

Map the required fields to PA52.1

Handle program messages

Determing the value of _HK
Lawson Add-ins for Microsoft Office for Human Capital Management - Advanced
5-1
Uploading Personnel Actions
Background information
Why is uploading to PA52 difficult?
If you transfer to PA52, populate the key fields at the top of the form, and click
Add, you receive the message, “Must inquire before using this function code”.
Likewise, if you map the “obvious” fields and attempt to load to PA52.1, you
receive the same message. How can you get around this?
Hidden fields
When you inquire on the form, hidden fields that track the company, employee,
action code, and effective date are populated. When you add on the form, the
visible key fields are compared to the corresponding hidden fields. If the fields
match, the application believes that you have inquired. If they do not match, the
application believes you have not inquired.
By populating these fields on the spreadsheet and mapping them in the upload,
you are tricking the application into thinking that you have inquired first.
Work done by the application when you inquire
Now that you have convinced the application that you have performed the Inquire
action, you need to think like a programmer. Why does it make you inquire before
adding? Is it to make using the Upload Wizard difficult? No, there is much work
done when you inquire. Some of this work includes:

Looking up the fields that belong on this action (the setup on PA50)

Looking up the current values of the employee’s fields

Checking to see if there are other pending actions
The most important activity that is performed when you inquire is determining
which fields belong on this personnel action. These fields are tracking in…yes,
more hidden fields. We need an efficient way to include these on the
spreadsheet. The fields on a personnel action are stored as field numbers
(referencing records in the PADICT database table). These are the same records
that are available in setting up employee groups and HR Writer reports. PA50
stores this setup information in the PERSACTYPE database table. We can use
the Query Wizard to query this table and populate the values on the spreadsheet
for us.
5-2
Lesson 5: Uploading Personnel Actions
Required Fields
Now that we’ve covered the background, we can discuss the minimum fields
needed to get a successful upload.
You need all of the key fields

Company

Employee

Action code

Effective date
You need the hidden fields to compare to the key fields

Orig Company

Orig Employee

Orig Action code

Orig Effective Date

_HK (the concatenation of the company, employee, action code, and
effective date fields)
You need the hidden field numbers that tell PA52 which fields are used on the
personnel action

There are 36 of these fields. There are twelve each of PAT-FLDNBR-1, PAT-FLD-NBR-2, and PAT-FLD-NBR-3. As of 8.1.0, these
are in field numbers 13 through 48
You need the fields to hold the new values. There are 36 fields, grouped into
three groups of 12. Each group is named to include the tab number. For the first
two tabs, the format is [tab number][row on tab]

The Selected Items 1 tab correspond to PCT-NEW-VALUE-11
through PCT-NEW-VALUE-112

The Selected Items 2 tab correspond to PCT-NEW-VALUE-21
through PCT-NEW-VALUE-212

The Selected Items 3 tab correpond to the 12 instances of PCTNEW-VALUE-3. In 8.1.0, these correpond to field numbers _f295,
_f299, _f303, …, _f229
This may seem confusing now, but keep reading and you’ll see an example.
Lawson Add-ins for Microsoft Office for Human Capital Management - Advanced
5-3
Other tips
5-4

The best date format to use is CCYYMMDD.

All fields on the spreadsheet should be formatted as Text, even if
you are entering numbers or dates. You don’t want Excel playing
with the values that you enter.

The _HK field is a concatenation of company, employee, action
code, and effective date. You can use the build in CONCATENATE
function to create this value. (Here’s the exception to the “all fields
should be formatted as text” rule. This field needs to have the default
formula format. The fields in _HK must account for the full length.
That means a 4 digit company, a 9 digit employee, a 10 character
action code, and an 8 digit date. The company and employee should
be zero filled at the beginning and the action code should be space
filled at the end. When the spreadsheet cells for numbers are
formatted as text, you can enter the leading zeros and they will
remain in the cell for use in the concatenation. Here is an example of
what _HK should look like for company 1, employee 66, action code
HIRE, and effective date 20050101: 0001000000066HIRE
20050101

You upload the new values based on where the field shows up on
the form. For example, you can’t just map a field to “Pay Rate”. Pay
rate doesn’t mean anything to PA52. What matters is where the pay
rate field shows up. For example, if the pay rate field shows up (for a
particular action) on the 11th row of the second tab, you would
populate the pay rate value on the field that you mapped to PCTNEW-VALUE-211 (tab 2, row 11).

There are too many fields on PA52 to give descriptive names to all of
the fields. That’s why you see PCT-NEW-VALUE-3 for every row on
tab three. (This is also why the “value list” button doesn’t show up on
the third tab, by the way.)
Lesson 5: Uploading Personnel Actions
Handling edits (messages)
Here are the soft edits that can be given in PA52.1 and the corresponding hidden
field that can “override” them.
In the first column, you see the actual messages. In the second column, you see
the hidden field that can override the edit.
Common PA52.1 Warnings
Field to Map
“Warning- Employee Has Same Soc Nbr; OK to cont”
XMIT-HREMP-BLOCK
“Warning-Social Nbr is invalid; OK to continue”
XMIT-HREMP-BLOCK
“Warning- Rate Outside of Rng; OK to cont”
XMIT-HREMP-BLOCK
“Warning-alt rates exist with prior currency; OK to cont”
XMIT-HREMP-BLOCK
“Warning-currency change, some amounts have not; OK to cont” XMIT-HREMP-BLOCK
“Warning-tax errors;partial tax update; use PR13.8;OK to cont” XMIT-HREMP-BLOCK
“Warning, Deduction dates equal, OK to continue”
XMIT-DEDDAT
“Warning, Deduction dates overlap, OK to continue”
XMIT-DEDDAT
“Warning! Action will be immediate; OK to continue”
XMIT-IMMED
“Warning, Req Deds will be updated for term emp, OK to cont” XMIT-REQDED
“Action with this date already exists, OK to continue”
XMIT-ACTEXISTS
Lawson Add-ins for Microsoft Office for Human Capital Management - Advanced
5-5
There are five hidden fields:
XMIT-HREMP-BLOCK
XMIT-DEDDAT
XMIT-IMMED
XMIT-REQDED
XMIT-ACTEXISTS
XMIT-DEDDAT, XMIT-IMMED, XMIT-REQDED, and XMIT-ACTEXISTS are all
one digit fields. To use them, populate a 1 in the spreadsheet and map the
column to the appropriate field.
XMIT-HREMP-BLOCK is a complex field. It is 10 digits long. When no overrides
are being passed, it is a string of 10 zeros. (This is the default value and is the
same as not mapping that field at all.)
Each of the ten characters in the string has a different purpose and controls a
different edit. A zero or blank value for a particular character means to impose
the edit that it controls and a value of one enables the upload to override the edit
that it controls.
The function of each character in the string is shown in the table below.
Digit
Related Warning
1st
ALL soft edits
2nd
“Warning- Employee Has Same Soc Nbr; OK to cont”
3rd
“Warning-Social Nbr is invalid; OK to continue”
4th
“Warning- Rate Outside of Rng; OK to cont”
5th
“Warning-alt rates exist with prior currency; OK to cont”
6th
“Warning-currency change, some amounts have not; OK to cont”
7th
“Warning-tax errors;partial tax update; use PR13.8;OK to cont”
8th
Internally used for changes to an employee’s work country
9th
Not used
10th
Not used
Entering a one as the first character disables ALL warnings – that is not
recommended as those warnings are there for a reason. I’d recommend running
the upload without this field at all to see the edits and then either disable the edits
or update the spreadsheet data as necessary to rectify them.
If you get the edit “Warning- Rate Outside of Rng; OK to cont”, you need to
override the 4th edit controlled by that field – the one about a rate outside the
established wage range. Add a new column to your spreadsheet for that field and
populate it for the employee who received the edit. All other digits in the value
are filled by zero (remember that the column should be in text rather than
numeric format to show leading zeroes). This would look like 0001000000 on the
spreadsheet.
5-6
Lesson 5: Uploading Personnel Actions
A picture is worth a thousand words
OK, but I think that must have been about a thousand words already…
Notice that the order of the fields on PA50 is the same order on PA52. This is a
key to easily map the query of PERSACTYPE (the table that holds PA50 data) to
the upload to PA52.1
Lawson Add-ins for Microsoft Office for Human Capital Management - Advanced
5-7
When you query the PERSACTYPE table, include the company and action code
and all field numbers in order. (They are in the Fields list alphabetically, so you
need to manually pick them in the proper order. It’s a bit cumbersome, but you
only need to do this once!)
The criteria should include the company and the action code. (You could also
include all actions and have a master spreadsheet. Then you can pull out the line
that you want.)
You can specify where you want the output to appear on the spreadsheet. I put
the data in the default location (starting in column A) and then moved it over
manually. Here is my thought process; feel free to substitute your own:
5-8
Lesson 5: Uploading Personnel Actions
In the big picture, your users probably don’t care about the field numbers. What
you care more about are the employee number, the effective date, and the new
values. All of these can be on the first columns of the spreadsheet and the field
numbers can be all the way to the right. Below you see that I put the two sets of
company, employee, action code, and effective date fields first (one as key fields,
the other as the hidden fields). Instead of re-typing columns E, F, G, and H, you
can just make E equal A as shown below. Do the same for columns F, G, and H.
After shifting the results of the Query Wizard to the right, the company field
ended up in column AR2. In this case, the concatenation formulate to create _HK
is =CONCATENATE(A2,B2,C2,D2). Notice that columns A-D are all in text
format and therefore can show leading zeros for the employee field. Please do
not use a custom numeric format that makes it look like 9 positions. This is only
the display format and will not carry over into the concatenation result.
Below are the screen shots of my mapping for 8.1. The actual field numbers may
be different in other versions. Note that between columns AS and AT you could
have the Company and Action Code (from the query). I deleted them from that
location and only have them at the beginning of the spreadsheet (columns A, C,
E, and G). One option is to leave them in that position and just not map anything
to it. I find it “cleaner” to have the company and action code at the beginning of
the spreadsheet.
Additional fields that appear on PA52.1 and the fields to override the soft edits
can be included in any position as needed. The fields shown below are simply
the minimum needed to get any upload to work successfully.
In applications version 8.1, the fields for overriding soft edits are in _f4 through
_f8.
Lawson Add-ins for Microsoft Office for Human Capital Management - Advanced
5-9
5-10
Lesson 5: Uploading Personnel Actions
Appendix
Appendix
Screen shots (answers) to selected hands-on
activities
Lesson 3, Step 2 - 4
Lawson Add-ins for Microsoft Office for Human Capital Management - Advanced
A-1
Lesson 3, Step 5 - 6
Lesson 3, Step 7
A-2
Appendix
Lesson 3, Step 8
Lesson 3, Step 11
The
subtotal
buttons are
the 1,2,
and 3
Lesson 4, Hands-on: Mapping for HR02 upload
(taken from 8.1 applications)
Lawson Add-ins for Microsoft Office for Human Capital Management - Advanced
A-3