You are on page 1of 29

www.SAPHRUnleashed.

com
www.SAPHRUnleashed.com
March 2009
Volume #1/Issue #1

Slogan Here

Identify Locked
Personnel Numbers
before Executing
Payroll Runs

ne problem that payroll managers or administrators repeatedly


face (every month or so) while running payroll is the result of
users who have locked the master data of employees. If a user has
locked any number of employees master data through maintenance transactions, the payroll driver generates an error and the payroll cannot be executed. This error is then followed by the frustrated payroll administrator
placing phone calls or sending emails to those users involved, saying,
Please unlock the personnel number _____ that you have locked, so that
the payroll can be executed.
To identify those personnel numbers that have been locked by users,
SAP provides the standard program HFIUCPL0. A number of powerful
options are available in the program, giving the payroll administrator total
control over the master data of their employees. This report program
lets you:
1) view a list of locked personnel numbers, along with the name of
the user who has locked them,
2) send the user(s) an email requesting the release (unlock) of the
given employees,
3) forcefully delete the sessions of the users responsible for the locking.
The report program may be executed via standard transaction
PC00_M44_UCPL.
Alternately, it can be executed via transactions SE38 or SA38 or from
a custom-defined Z transaction. Report program HFIUCPL0 can either
be executed online or scheduled in the background. The latter is particularly useful for companies whose payrolls are set to run at a specific
(planned or set) date and time of each period. Program HFIUCPL0 may
then be scheduled to run before the payroll, and emails may be generated
to notify users that they must unlock any employee records that they have
blocked.

Contents

Using Variants for


Simplifying Data
Input - A Guide for
SAP HR Users and
Consultants

Quickly Access
Complex IMG Paths
via Direct
Transaction Codes

13

Time Evaluation
Made Easy

19

Employee Quick
Search Shortcut
Strings

23

Recording Changes
Made in Personnel
Development
Infotypes

27

Dynamic Actions Valuable Tips and


Tricks

www.SAPHRUnleashed.com

Indentify Locked Personnel Numbers before Executing Payroll Runs

The selection screen of the program is shown


in figure 1.
You may restrict the programs selection by
entering suitable values for the fields provided,
such as personnel number, personnel area,
subarea, etc.

The program has three powerful options that


can be chosen by selecting the three radio-button
options shown under Additional Selection in
figure 1.

Figure 1: Selection screen


of program HFIUCPL0

Let us have a look in detail at these three options available in the


report program.

You may simply display a list of all employees (personnel numbers) that are locked.
The report also displays the employee number, the user name, and the various user details as
shown in figure 2.

In figure 2, the personnel number 50995 has


been locked by the user STUDENT102.

Figure 2: Output of
Program HFIUCPL0
showing personnel
number and user details

You may also send an SAP office mail to


the users who have locked the personnel
numbers. In this case, an express message
is sent to the user who has locked the employee(s)
in question, stating that an email has arrived in

their SAP inbox as shown in figure 3.


The email may be viewed in the SBWP transaction, or the user may go there directly by choosing the Inbox button from the express pop-up
shown in figure 3. The text of the email is shown
in figure 4.

All Rights Reserved

March 2009/Volume #1/Issue #1

Indentify Locked Personnel Numbers before Executing Payroll Runs

www.SAPHRUnleashed.com

Your Ad Here.
Email us at Advertising@SAPHRUnleashed.com

Figure 3: SAP office


express message

Figure 4: Email text


informing user to unlock
the personnel number(s)

March 2009/Volume #1/Issue #1

All Rights Reserved

www.SAPHRUnleashed.com

Indentify Locked Personnel Numbers before Executing Payroll Runs

You may also forcefully kill (delete)


the user sessions that have locked any
personnel numbers. Choosing the Delete
Locking Users Sessions kills the session of
each user involved in the locking. The session
ending function using this option is similar to
that of transaction SM04. The user running the
program must have the required authorization in
order to use this session-killing option.

Note: In order to end the sessions of the


locking users, the required authorization must
be provided to the role of the user running
the program.

If no personnel numbers are locked by any


users, the program simply generates the message
All personnel numbers are unlocked, as
shown in figure 5.
Figure 5: Message showing
no employees are locked

Your Ad Here.
Email us at Advertising@SAPHRUnleashed.com

All Rights Reserved

March 2009/Volume #1/Issue #1

www.SAPHRUnleashed.com

Using Variants for Simplifying


Data Input - A Guide for SAP
HR Users and Consultants

AP reports may contain a number of input


fields. This may be confusing for users. All
fields may not be required for all users at all
times. One way of avoiding the display of unnecessary fields is via the usage of variants. Variants
basic function is to specify input default values
for fields, but they may also be used to hide
unnecessary report screen fields.
Most people are unaware of the numerous ways
a screen field may be modified by using variants.
In this article, I will show the various options that
are applicable for fields used in variant creations.
I will also discuss the steps required in creating
variants for a given report program
The advantages of variant creation are as follows:
They simplify the input screen as unnecessary fields may be hidden.
Variants make the users life easier and
work faster. They relieve the user from
remembering the default values that are
to be entered in the various screen fields.
This avoids remembering and retyping of
values that are to be entered.
You may also make fields read-only as
well as mandatory, depending on the
requirements.

Note: You may define variants for both standard


SAP reports and customer-defined reports.

Accessing the Already-existing


Variants
In order to access the various variants of a program, click the icon from the toolbar of the program selection screen. The screen appears as
shown in figure 1.
You may either enter the variant or the user
who created it last, or change the variant in order
to narrow down your selection. Clicking the
Execute icon will display a list of the variants
applicable to the program as shown in figure 2.
Selecting a particular variant populates the
fields with the relevant values defined in the variant. Moreover, the system also hides fields that
are set as visible and makes fields mandatory that
are defined as such within the variant definition.
You may then use the Execute button in order
to run the program according to the selection
field values defined in the variant.

Figure 1: Finding a Variant

March 2009/Volume #1/Issue #1

All Rights Reserved

www.SAPHRUnleashed.com

Using Variants for Simplifying Data Input - A Guide for SAP HR Users and Consultants

Figure 2: Variant List

Defining a Variant for a


Report Program
In this section, we will look at the steps
required in creating a variant for a given report
program. Let us take a closer look.
Entering the Relevant Data in the
Desired Fields of the Report: The first
step in defining variants involves running
the report program either via the transaction
SE38 or via the report transaction, and then
entering (default) values in the various fields
of the program selection screen. These default
values are to be stored in the variant and made
available to the user when the relevant variant
is imported.

Defining the Variant: Once the field


values have been entered in the relevant
fields on the report selection screen, press

the Save icon. Alternately, you may also choose


the keyboard shortcut CTRL - S. This leads you
to the variant attributes screen as shown in
figure 3.

Setting the Attributes of the Variant and


the Screen Fields: This is the most
important of the all the steps required in
creating the variant. In this step, we specify the
name and description of the variant, as well as
specifying which of the screen fields are to be
hidden, set as compulsory, or made read-only.
On the screen shown in figure 3, there are various attributes of the variant as well as the individual fields contained in the table structure
below. First, you need to enter a suitable name
and description of the variant in the fields provided. You then need to set (if required) the following indicators pertinent to the variant:

Figure 3: Variant Attributes


Screen

All Rights Reserved

March 2009/Volume #1/Issue #1

Using Variants for Simplifying Data Input - A Guide for SAP HR Users and Consultants

www.SAPHRUnleashed.com

Your Ad Here.
Email us at Advertising@SAPHRUnleashed.com

March 2009/Volume #1/Issue #1

All Rights Reserved

www.SAPHRUnleashed.com

Using Variants for Simplifying Data Input - A Guide for SAP HR Users and Consultants

Only for Background Processing: If this


checkbox is not selected, the corresponding variant may be used both in foreground and the background mode. If the indicator is checked, the
variant may only be executed in the background
mode. In case you have a variant that is scheduled
to be run in background, this indicator must be
set. This will prevent users from changing the
variant by mistake in the foreground mode.
Protect Variant: As the name indicates, this
checkbox is used for protecting (preventing
changes in) the variant by other users. If this
checkbox is set, the variant may only be changed
by the user who has created the variant. If the
particular user has left the company, the variant
may be accessed or changed with the help of the
security team members.
Only Display in Catalog: If this indicator is
checked, the corresponding variant will not
appear in the list of variants shown in figure 2.
In case you want to access or change this particular variant, the procedure is somewhat difficult. The variant may be accessed by choosing the
Variants option in SE38 for the given program
and then accessing the total variants list via the
Variant g Catalog menu path.
Apart from the variant-specific attributes, a
number of checkboxes are available for each field
that resides on the selection screen of the program in question. For each field, the following
indicators (check boxes) are provided:
Protect Field. Checking the Protect field
indicator locks (protects) the relevant field for
any entries by the user. In short, the default value
assigned to the field may not be changed and
is shown in grey color. For example, figure 4

shows the Form name field in grey (protected)


using this indicator.
Hide Field. As the name indicates, this indicator is used for hiding a field from the selection
screen. This is a useful function and may be used
for making unnecessary fields invisible from
the user.
Required Field. If you like a field to be
mandatory, the required field must be checked.
The respective field(s) then becomes mandatory.
The user has to definitely enter a value in the
field that is mandatory in order to execute
the program.
Save Field Without Values. Checking this
indicator will not affect the contents of the relevant field when a particular variant is imported.
Rather, the field value already entered is not
replaced with a blank space or with any other
value from the imported variant.
For example, if we set this checkbox for a field
named FORM, and the field has the value XF01
when the relevant variant is imported, the same
value will remain in the field after the import is
performed.

Saving the Variant: Finally when you have


made the necessary settings according to
your requirement, you must save the variant using the Save button or the keyboard shortcut CTRL S. This takes you back to the program selection screen.
The variant will be created and added to the list
applicable to the program in question. You may
execute the program afterwards using the procedure defined in the previous section.

Figure 4: Protecting the Form


Name from being Changed

All Rights Reserved

March 2009/Volume #1/Issue #1

www.SAPHRUnleashed.com

Quickly Access Complex


IMG Paths via Direct
Transaction Codes

he IMG is a complex place and contains a


plethora of nodes representing configuration activities for all modules. Searching
through the IMG for a particular activity node
may be a time-consuming and laborious activity.
Fortunately, SAP provides you a way to directly
access the activity node. This access is via direct
transaction codes specific to each activity. In this
article, I will discuss the procedure for finding out
these direct transaction codes.
Note: You may enter the transaction codes in
your Favorites of the SAP menu for quick access.

The activity information is stored as entries in


table CUS_IMGACH. In the database, each
activity (and text) is denoted by a key such as
OHIX0626. To each key record in the table, there

is an assigned transaction code that allows direct


access to the activity. Within the table, the activity key and the transaction code are stored in fields
ACTIVITY and TCODE, respectively.
The steps required in finding the direct transaction code are shown below:

In the first step, you switch on the


Additional information setting in order to
view the key pertaining to the IMG activity
in question. This may be done via the menu path
Additional Information g Display Key g
IMG Activity as shown in figure 1.
Switching on the additional data displays the
technical name (key) of the IMG activity as
shown in figure 2.
For example, the key for IMG activity Infotype
Menu shown in figure 2 is OHIX0626. \

Figure 1:
Menu path
for
Displaying
IMG
Activity Key

March 2009/Volume #1/Issue #1

All Rights Reserved

www.SAPHRUnleashed.com

Quickly Access Complex IMG Paths via Direct Transaction Codes

Figure 2:
Technical Name
Shown in Front
of Activity Text

Once you have the technical name, you may


then get the corresponding value of the
direct transaction code from the table
CUS_IMGACH. Use keyboard short cut CTRL +
Y to copy the name of the activity key. Then use the
transaction SE16 or SE16N to find the TCODE
value for the given value of ACTIVITY.
For example, the row corresponding to
ACTIVITY OHIX0626 is shown in figure 3.

Figure 3: Table Row Corresponding to


Activity CUS_IMGACH

10

All Rights Reserved

March 2009/Volume #1/Issue #1

Quickly Access Complex IMG Paths via Direct Transaction Codes

www.SAPHRUnleashed.com

Your Ad Here.
Email us at Advertising@SAPHRUnleashed.com

March 2009/Volume #1/Issue #1

All Rights Reserved

11

www.SAPHRUnleashed.com

Quickly Access Complex IMG Paths via Direct Transaction Codes

The required transaction code is stored in the


TCODE field (in our example, the value is
S_AHR_61011206).
The transaction code S_AHR_61011206 is the
direct transaction code used for accessing the
Infotype Menu activity node. Running this transaction directly will skip the initial IMG screens
and take you directly to the list of (sub)activities
pertaining to the Infotype menu node as shown
in figure 4.

Figure 4:
Activities
Pertaining to
Infotype Menu
Node

12

All Rights Reserved

March 2009/Volume #1/Issue #1

www.SAPHRUnleashed.com

Time Evaluation Made Easy

n important and complicated part of the


SAP HR module is its Time Evaluation
component. In a company, there may be
employees working on monthly salary. Such
employees may be eligible for a fixed monthly
salary and the actual times worked on each day (or
breaks within working hours) may not be important for salary calculation.
On the other hand, a company may have
employees working on a daily or hourly rate. In
such cases, the Time In and Time Out of employees may be recorded, and the breaks during working hours may also be monitored. In addition, the
extra time worked each day or within a period
must also be determined. For example, if employees are entitled to work 10 hours a day, when they
work more than 10 hours they must be paid overtime. Time Evaluation is useful in the latter
scenario. It provides automated calculation and
evaluation of time data. For situations where time
data is important, there may be three different
scenarios involved.
In this article, three different scenarios within
Time Management will be examined.

The Three Scenarios Within Time


Management
Let us look at the various scenarios within Time
Management. These are discussed below:

Without Time Evaluation (and Without


Time Recording): Before diving into the
details of Time Evaluation, let us see how
life is without Time Evaluation. This is the simplest case. In this case, no time recording system
is involved and no Time Evaluation program is
executed.

March 2009/Volume #1/Issue #1

The absences or attendance of employees are


entered in the infotypes 2001 and 2002 respectively. In case any additional payment (overtime)
is to be paid to the employees, the respective
amount must be computed manually and entered
in the 2010 (Remuneration) infotype, or 0015
(Additional Payments) infotype under a suitable
wage type.
The payroll is then executed, taking the overtime amount into account. The payroll schema
will manage all payments including the overtime
amount.
Note: In the No Time Evaluation scenario,
no automated computations are involved for
overtime. In the case where overtime is to be
paid, manual calculations must be done by
users. No Time Evaluation program or time
schemas or rules are used. The payroll schema
(and rules) may be customized in order to meet
requirements.

With Time Evaluation Along With


Time Recording: Let us now discuss
another scenario. You may have employee
Time Evaluation along with Time recording. In
this case, the Time In and Time Out of employees is recorded daily in a time recording system.
This time data is then sent to the SAP system for
evaluation. The actual clock times worked are
stored in the infotype 2011 (Time Events).
The Time Evaluation program is then executed
using a suitable time schema. The schema compares the actual working times of the employees
within a given period of the planned working
time. In this scenario, the breaks between working
times are also taken into account.

All Rights Reserved

13

www.SAPHRUnleashed.com

Time Evaluation Made Easy

Your Ad Here.
Email us at Advertising@SAPHRUnleashed.com

The time data is evaluated and the evaluation


results, including additional hours worked by
employees (such as overtime), are stored in the
time clusters. During the Time Evaluation run,
the system generates time wage types for additional payments (overtime).
After the Time Evaluation program, the Payroll
program is run. The time results stored in clusters
may then be gathered by the Payroll program for
processing employee payments.
This scenario requires customizing of the time
schema and rules, as well as certain configurations
in the IMG.

Using Time Evaluation Without Time


Recording: This scenario is midway
between the first two options. In this case,
the Time In and Time Out are not recorded.
Rather, the emphasis is on the hours worked by
an employee.

14

This is suitable for calculations where actual


time (time in and out) is not important for payment calculations. In this scenario, the data are
entered (in number of hours) in the infotype
2002 (Attendance). The Time Evaluation program is then run using the time schema based on
the standard SAP schema TM04.
Apart from customizing the schema, some configuration entries must be made in order to evaluate the time data. The evaluation program calculates the overtime and other results and stores
them in the time clusters. The payroll is then executed .The time results stored in clusters may
then be gathered by the payroll program for processing employee payments.
The behavior of the Time Evaluation program,
the schema used for the time data processing, as
well as the underlying configuration required, differ from the previous scenario.

All Rights Reserved

March 2009/Volume #1/Issue #1

www.SAPHRUnleashed.com

Time Evaluation Made Easy

Note: Similar to Payroll, Time Evaluation has


schemas which contain rules and operation
pertaining to time calculations. For the Time
Evaluation With Clock Times scenario, SAP provides the schema TM00. TM04 is the schema
for the Time Evaluation Without Clock Times
scenario.
Note: The time cluster acts as an interface
between the Time Evaluation and the Payroll
program. The Payroll reads the time cluster
results in order to process payments.

Important Terms in
Time Evaluation

Now let us discuss some of the important


terms related to Time Evaluation.

Personnel Subarea Groupings


As with work schedules and other configuration in the Time Management module, Time
Evaluation also allows you to define groupings
based on personnel subarea. This lets you specify
how the time data of employees that lie within a
certain subarea are to be evaluated.
Time Types and Processing Types
i) Time Types
Time types are defined as the basic units used
for denoting time durations (time spans).
However, the most important function of types
is to store the cumulate time balances computed
during the Time Evaluation program run. Within
the definition of a Time type in the IMG, you
may specify whether the balances are cumulate on
a daily or monthly basis.

Note: Prior to defining Time types, you need


to define appropriate personnel subarea
groupings.

Suppose the employees of a particular personnel subarea grouping have a planned working
time of 10 hours a day. However, they work for
11 hours each day of a particular month.
A Time type called Compensation Time may
be defined to store the total difference of additional hours worked by the employees within the
given month.
A few examples of Time types are shown in
Figure 1.
The standard system contains commonly used
Time types. Time types used may differ according
to the type of scenario involved (with clock times
or without clock times). The Time types calculations are specified by the rules contained within
the Time Evaluation schema. In case the standard
Time types are not sufficient, you may create your
own Time types.
Note: New Time types must only be created
when the standard Time types are not enough
to fulfill your requirements.

The maintenance screen of a Time type called


Absence 0020 is shown in Figure 2.

Code

Description

0010

Attendance (generated or accessed from time events infotypes 2011)

0020

Absences (infotype 2001)

0030

Attendance Hours (stored in infotype 2002)

0040

Overtime Hours

0050

Total Hours Worked

March 2009/Volume #1/Issue #1

All Rights Reserved

Figure 1:
Some
Time Type
Codes and
Meanings

15

www.SAPHRUnleashed.com

Time Evaluation Made Easy

Figure 2:
Time type
0020

There are two important indicators on this


screen, namely Save as Day Balance and
Cumulate as Period Balance. The indicators
are assigned value 1, meaning that the Time type
is used both in the day balance as well as period
balance.
ii) Processing types
Along with Time types, Processing types are
also important. The Processing type is an indicator that is assigned to an absence code or attendance code, in order to denote how the code is to
be interpreted and handled. The attendance and
absence codes that fall in the same category are
grouped together (via processing types) and the
balances computed from them are posted to the
same Time type.

16

Note: The Processing types are used to create


groups of attendance or absence types that are
to be processed similarly. This assignment or
linkage is made in the IMG configuration

Figure 3 shows some standard Processing types


that are available
You may also define your own Processing types.

Figure 3:
Some
Standard
Processing
Types

All Rights Reserved

Processing
Type

Meaning

Attendance

Absence

Illness

Over Time
March 2009/Volume #1/Issue #1

www.SAPHRUnleashed.com

Time Evaluation Made Easy

Time Evaluation Program


(RPTIME00)
This program is the main program of Time
Evaluation. It may also be accessed via the transaction PT60. The screen of the program is shown
in Figure 4.
One of the important input fields of this program is the Time evaluation schema (specifying
the relevant schema to be used). The schema contains rules that define the various steps (and calculations) that are to be performed within the
Time Evaluation run.
The Time program processes the recorded
times, and creates time balances. The absence or
attendances that are found having similar processing types are cumulated in the same Time
types. The program then generates the Wage
types based on the Processing type and Time
type. The generated Wage types are then used for
computing the gross salary of employees in
Payroll.

Figure 4:
Main
Screen of
Program
RPTIME00

March 2009/Volume #1/Issue #1

All Rights Reserved

17

www.SAPHRUnleashed.com

Time Evaluation Made Easy

Your Ad Here.
Email us at Advertising@SAPHRUnleashed.com

18

All Rights Reserved

March 2009/Volume #1/Issue #1

www.SAPHRUnleashed.com

Employee Quick Search


Shortcut Strings

emembering individual employees personnel numbers may be difficult for SAP users.
This may become even more challenging
when a new SAP implementation is carried out,
and the SAP system assigns fresh numbers to
employee records when data from the previous
system are loaded. When maintaining employee
data using transactions PA30 and PA20, the usual
means that users employ for searching for
employees numbers is via the Search help.
Most functional consultants and users are not
aware that an even faster method for accessing
employee numbers exists. This is via the usage of
Employee Shortcut Code Strings. This method
simplifies the Search help procedure and provides
quick access to the desired numbers. In this
article, I will discuss how to write the syntax and

semantics of these shortcut strings. Since the


Shortcut method is an enhancement of Search
help, I will also discuss basic Search help method.

Basic Search Help Method


Before diving into the details of the Shortcut
codes, let me discuss the Search help functionality. While processing an employees data via transaction PA30 or PA20, users employ the F4 help
(Search help) provided on the personnel number
field. This will open the dialog box comprising of
a number of Search helps. If you want to select
all employees whose last name is Admon and
first name begins with S, you will select the Last
name First name Search help tab and enter values as shown in Figure 1.

Figure 1:
Searching
Employees
With Last
Name Admon
and First Name
Starting With
S

The system will then list the value(s) found.

March 2009/Volume #1/Issue #1

All Rights Reserved

19

www.SAPHRUnleashed.com

Employee Quick Search Shortcut Strings

Figure 2:
Entry
Found
Displayed

Clicking a particular row will populate the personnel number field (on transaction PA30 or
PA20) with the relevant employee number.
This is the basic Search help method. One disadvantage to this method is that you have to navigate through the Search help dialog box, select
the relevant Search help of your choice, and enter
values in the appropriate fields before reaching
the list of employee values. In next section, we
will discuss the Shortcut code method based on
Search helps.

Employee Shortcut Code Strings


SAP provides a quick way of getting to the
employee (number) using Shortcut code strings.
These provide direct access to a desired set of
employee records by simply entering the string in
the personnel number field contained in the main
screen of transaction PA30 or PA20. For example, in order to search for all employees whose
first name is Sarah, the necessary code to be
entered in the personnel number field is shown in
Figure 3.

Figure 3:
Searching
for All
Employees
Having the
First Name
Sarah

20

The =n represents the code for accessing Last


name first name Search help (this code will
vary according to the Search help to be used).
Each dot (.) represents the fields provided on the
relevant Search help (in this case, last name and
first name sequentially). The value that is to be
passed for the field is written after the corresponding field period (dot). You may simply use a
period without a value or blank space if no value
is to be passed for a given field. In =n..Sarah, the
first period followed by no value means that we
do not impose a selection restriction based on the
last name.
Keep in mind the following:
In case we need to search for the employee number having the first name Sarah
and last name Admon, we will enter the
shortcut code =n.Admon.Sarah.
The =n.Admon. or =n.Admon.. have
the same effect, i.e, the program reads all
employees having last name Admon. In
case the latter fields are not being used in
the selection, their corresponding periods
may be omitted.
Within Search helps, we use an asterisk (*)
to select all text beginning with a certain
pattern. The * is not used in Shortcut
codes. For example, corresponding to the
search shown in Figure 1, we will pass
=n.Admon.S as the string in order to
search for all employees having last name
Admon and first name beginning with S.

All Rights Reserved

March 2009/Volume #1/Issue #1

www.SAPHRUnleashed.com

Employee Quick Search Shortcut Strinigs

Entering the code string in the field and pressing Enter will display a list of values pertaining to
your selection criteria, as shown in Figure 4.

Figure 4:
Selection
Criteria
Values

In case there is only one personnel number


matching the specified criteria, the relevant number is directly populated in the personnel number
field without any list dialog displayed (such as
shown in Figure 2).
For the sake of illustration, I have used the last
name and first name Search help. However, you
may use the shortcut technique for other Search
helps as well. The various codes and format of
shortcut strings and some other examples of usage
are illustrated in Figure 5.

March 2009/Volume #1/Issue #1

All Rights Reserved

21

www.SAPHRUnleashed.com

Employee Quick Search Shortcut Strings

Figure 5: Search Helps, Their Relevant Codes and Example Shortcut Strings

Search Help

Syntax for Shortcut String

Usage Example

=k.(Personnel Area).(Personnel
Subarea).(Employee
Organizational Group).(Employee
Subgroup).(Payroll Area).(Company
Assignment
Code).(Cost Center).(Organization
Unit)

To get all employees from Cost Center


123456, enter =k.123456. The seven
dots indicate empty values supplied for the
six fields before the Cost center, whereas the
seventh dot indicates the cost center value

Name

=n.(Last Name).(First Name)

Discussed in this article

Applicant

=r.(Applicant Number).(Personnel
Number)

=r.1234 must be entered to get the


Personnel Number of employee whose
relevant Applicant Number is 1234

User ID

=u.(Communication
Type).(ID/Number)

The relevant subtype of infotype 105 must


be passed against the communication type,
along with the relevant ID. For searching the
personnel number of user ID JAMES, the
shortcut string =u.0001.JAMES must be
entered. (the subtype 0001 represents User
Name in infotype 105)

Your Ad Here.
Email us at Advertising@SAPHRUnleashed.com

22

All Rights Reserved

March 2009/Volume #1/Issue #1

www.SAPHRUnleashed.com

Recording Changes Made in


Personnel Development
Infotypes

ike Personnel Administration, the changes


made in the Personnel Development (PD)
infotypes must also be logged. You may
record which fields were changed, the dates on
which they were changed as well as the user who
made the changes. This facility was introduced by
SAP in Release 4.7. Changes made in infotypes
1000, 1001 and 1002 could be monitored at first,
but this facility was later provided for other infotypes as well.
Most users and functional consultants are
unaware of this functionality. In this article we
will discuss various entries for switching on the
tracking of changes made in Personnel
Development data, and how the entries are
displayed.
By default, the Changes tracking functionality is
switched off for all infotypes. You need to switch
it on for infotype and subtypes of choice. This
is done by making entries in table
T77CDOC_CUST. Once these changes are
made and recorded, they may be viewed using a
standard SAP report RHCDOC_DISPLAY. The
changes made to PD infotypes are recorded as
Change documents in tables CDHDR and
CDPOS. The object name class involved is
HR_ITnnnn, where nnnn is the infotype number
(for example, HR_IT1001 for infotype 1001)

Note: You may use the steps mentioned in


order to track changes made in OM as well as
Training and Event Management data.

March 2009/Volume #1/Issue #1

Entries for Switching On


Tracking of Changes
In order to switch on the tracking of changes
made in Personnel Development data, you need
to create some customizing entries in the standard SAP table T77CDOC_CUST. One of the
IMG paths for accessing the maintenance screen
of table T77CDOC_CUST is Personnel
Management g Personnel Development g
Basic Settings g Activate Change
Documents.
Transaction SM31 may also be used by entering
the table name in the field provided and clicking
on the Maintain button.
Selecting either of the two options will take you
to the maintenance screen of table
T77CDOC_CUST. Click the New Entries
button.
The various fields (and the values to be entered)
on the table T77CDOC_CUST are discussed
below:
Plan Version. The value 01 for the plan version denotes the active version. Other than 01
version, the change log may not be required. This
is normally ste as 01 (since only change log for
version 01 may be required).
Object type. As the name indicates, the field
Object type denotes the objects whose changes
are to be logged. The relevant code (comprising
of one or two characters) representing the object
type must be entered in the field (for example, O
for Organizational Object, S for Position and
likewise). If an asterisk (*) is entered in the object
type field, the infotype change log will be updated for changes made in all objects of that info-

All Rights Reserved

23

www.SAPHRUnleashed.com

Recording Changes Made in Personnel Development Infotypes

type. For example, if you want to monitor


changes made to all objects for infotype 1000,
you will enter * in the field Object type.
Infotype. In this column, the four digit number
denoting the infotype to be monitored is specified. For example, 1000 must be entered to specify Basic Definitions infotype, whereas 1001 is
entered for Relationships infotypes, and so on.
Subtype. In case you want the Change log to
be filled only when a particular subtype record of
an infotype is changed, you must specify the relevant subtype number in this field. For example, if
you want to limit the generation of Change documents for the infotype 1001 only to subtype
A012, the entry will look like the one shown in
Figure 1.

The Subtype field must be filled with an asterisk (*) for Infotypes to which subtypes are not
applicable. Infotype 1000 is a typical example.
Active checkbox The Active checkbox is
meant for switching the Infotype tracking on or
off. The entry does not have to be deleted in
order to deactivate Infotype monitoring; the
Active indicator is simply switched off.
Tip: The Active check box turns Infotype
Change logging on and off, which makes it
simple to deactivate an entry in table
T77CDOC_CUST (without deleting it).

After creating the appropriate entries on the


maintenance screen of table T77CDOC_CUST,
save your entries.

Figure 1.
Change
Documents

Your Ad Here.
Email us at Advertising@SAPHRUnleashed.com

24

All Rights Reserved

March 2009/Volume #1/Issue #1

www.SAPHRUnleashed.com

Recording Changes Made in Personnel Development Infotypes

Viewing the Change Log


Now you have made all the necessary configuration settings related to the tracking of changes
made to PD data. The system will automatically
create the log for changes that are done. The program RHCDOC_DISPLAY may be used to display the changes that have been made to PD data.
The selection screen of the program is shown in
Figure 2.
Since the selection screen lets you restrict the
displayed data in a number of ways, it is a good
idea to become familiar with its input fields. Let
us take a closer look:
In the upper part, you will find the Object
Section. This lets you restrict your selec-

tion based on the Object type and Object


ID. Enter suitable values in the Plan version, Object type and ID fields. (The ID
field may also be left blank).
Then, you must enter infotype-specific
data within the Infotype block. The values entered here dynamically change the
input fields of this block. A typical example of this is when the number of a language-dependent infotype (such as 1000)
is inputted in the Infotype field. In this
case, a language key field is added on the
screen. The language (such as EN for
English, and DE for German) may then
be specified in this field.

Figure 2:
Screen of Program
RHCDOC_DISPLAY

March 2009/Volume #1/Issue #1

All Rights Reserved

25

www.SAPHRUnleashed.com

Recording Changes Made in Personnel Development Infotypes

Note: If Relationships infotype (1001) is specified in the infotype field in the Infotype block,
two additional fields (Object type and Object ID
of related object) appear. In these fields, you
may enter the related objects type and/or ID.
The output of the program will be comprised of
the modifications made in Infotype 1001
records having relationship with the specified
object type and ID.

The Change Data block is used to specify the change document selection based
on the ID of the user who modified the
infotype data, as well as the date and time
on which the change was made. The current date is entered as the default for the
start and end date fields (but these may be
changed according to your requirements).
At the end is the Output area. In this section, you specify the format in which the
data are to be displayed. There are two
ways to do this, namely Technical View
and Summarized View. If the Technical
View is chosen, the data are displayed in
technical form, i.e., the change documents stored in the database. On the
other hand, the Summarized View will
display a single (summarized) document
for multiple documents stored for a particular set of data.
The Display Field Contents indicator (within the Output block) lets you
specify the level of detail to be displayed.
If the indicator is selected, a detailed
report showing every infotype field that
has been modified (along with Old and

New Values) is displayed. When the


Display Field Contents checkbox is not
on, a single line is shown in the Output
for each change that is made
The Output of the report RHCDOC_DISPLAY is shown in Figure 3.
At the beginning is the Object type (OT) column. The relevant icon indicating the Object
type is displayed in it. (In our example, organizational unit ). The second column is the Object
ID, the eight-digit number identification number
assigned by the system when the user creates
objects via transactions such as PPOME, PP01.
After that, the name of the changed object and
relevant infotype are displayed, followed by the
start and end dates of the modified record. The
Name column tells the name of the user who has
modified the infotype record in question. The
date and time of the change are denoted by the
Date and Time columns, respectively
The illustration in Figure 4 is pertinent to the
case when the Display Field Contents indicator
was checked on the main program screen. That is
why the label, the older value as well as the new
value (of each changed field) are displayed.
Note: SAP does not provide any transaction
for executing the PD audit program
RHCDOC_DISPLAY. The program may be
executed directly via transaction SE38 or SA38.
However, many organizations may not allow
access to SA38 or SE38. The program may be
provided to users through a custom-defined
transaction code (Z transaction or Y transaction).

Figure 3: Output of Program RHCDOC_DISPLAY

Figure 4: Output When Display Field Contents


Indicator is On

26

All Rights Reserved

March 2009/Volume #1/Issue #1

www.SAPHRUnleashed.com

Dynamic Actions Valuable Tips and Tricks

ynamic Actions are statements executed


automatically by the R/3 system during
the maintenance mode of infotypes. You
may write your own dynamic actions (stored in
table T588Z) in order to trigger activities automatically linked to infotype maintenance.
There are times when dynamic actions fail to
achieve their purpose. I have heard people saying
that Our actions are not getting triggered. One
reason for this is that SAP does not provide any
syntax checking mechanism for guaranteeing the
accuracy of dynamic actions, and the consultant
actions are syntactically incorrect. Since there are
no syntax checkers associated within the dynamic
action editor, it makes it necessary for you to
write syntactically and semantically accurate
actions.
In this article we will cover some important tips
and tricks related to dynamic actions that will
allow you to write correct actions and avoid mistakes commonly made by consultants. I have
assumed that the reader is familiar with the basics
of dynamic actions. If you need an explanation of
the basics of dynamic actions, send an email to
editor@saphrunleashed.com.

Figure 1:

Here are some useful tips for writing effective


dynamic actions:

You should not use blank spaces within the


variable function part component of your
actions. This may cause your dynamic
actions to fail. For example, the following is not
correct:
P

RP50M-FIELD1 < RP50M-FIELD2

The correct form is:


P

RP50M-FIELD1<RP50M-FIELD2
(without any blank spaces in between)

The correct use of brackets as well as


commas should be made. A common error
that consultants commit is the incorrect
usage of commas and brackets while writing
constant values and field names within P, I and W
statements
In figure 1, I have compiled an easy guide
for helping you to write error-free P, I and W
statements.

Statement

Can quotation marks be used


while specifying constants?

Brackets allowed while


specifying field names?

Allowed

Not Allowed

Not Allowed

Allowed

Allowed

Not Allowed

March 2009/Volume #1/Issue #1

All Rights Reserved

27

www.SAPHRUnleashed.com

Dynamic Actions - Valuable Tips and Tricks

I INS,9001,,,(P0001-BEGDA),(P0001-ENDDA)
P (RP50M-FIELD)<(RP50M-FIELD2)
The correct forms are shown below:
I INS,9001,,,(P0001-BEGDA),(P0001-ENDDA)
P RP50M-FIELD<RP50M-FIELD2

Apart from syntax errors, semantic errors


must also be avoided. These are logical mistakes that will cause the dynamic action to
fail. This is typically true for OR and AND statements.
Let me first clarify what OR statements and
AND statement mean within the variable part of
dynamic actions
OR. When a number of P statements are
connected via OR, the statement following the P statements is executed if any
one of the conditions specified by the P
statement is true.
AND statement. On the other hand, the
statement followed by P statements
linked via AND will be executed only if
all the P statement conditions hold true.
In plausibility checks (P statements) use the
addition /X at the end of the variable function
part that you want to connect via OR condition.
In case no /X is specified, the statement is considered as an AND condition. You may use the
OR and AND together in order to create conditions for representing your companys scenario.
For clarification, let us look at a few examples:
P PSAVE-STAT2=2
P T001P-MOLGA=01
I ..
W .
The above statements mean that the system
checks the value of the country grouping and an
employees employment status. The I and W
statement are executed if T001P-MOLGA equals
01 and PSAVE-STAT2 is 2.

28

Let us consider another example. Suppose to


the previous condition you want to add RP50MFIELD1. Say you want to trigger the action of
the country grouping MOLGA, 01 or (OR) the
value of RP50M-FIELD1 is equal to 02, and
(AND) the value of PSAVE-STAT2 is equal to 2.
The statements are as follows:
P T001P-MOLGA=01/X
P RP50M-FIELD1=02/X
P PSAVE-STAT2=2
I ..
W .
The I statement is executed if (T001PMOLGA equals 01 or RP50M-FIELD1 equals
02) and PSAVE-STAT2 is equal to 2.
Many consultants generally forget to include
/X from P statements that are to be connected
with OR condition. If they do, the required purpose will not be served. For example, consider
the statements below:
P
PSAVE-STAT2=02/X
P
T001P-MOLGA=01
I
.
In the above case, the second P statement does
not end with /X, so the OR condition is not met
and the AND condition is implied. The I statement is executed when T001P-MOLGA equals
01 and PSAVE-STAT2 is equal to 01.

Another example of a common error done


by consultants is omitting the required
(mandatory) field values while writing W
and I statements. This is especially a problem
when the dynamic action has to be run in background mode. The necessary screen does not pop
up and the necessary action does not take place.
Two examples are:
The Subtypes values for subtypes are not
provided in case of infotypes that have a
mandatory subtype field.
In the case of W statements , one or more
mandatory fields have not be specified,

All Rights Reserved

March 2009/Volume #1/Issue #1

www.SAPHRUnleashed.com

Dynamic Actions - Valuable Tips and Tricks

Another common syntax error is the incorrect placement of commas within the I
statements. In case of I statements, you
have to be careful about the placement and
sequence of commas. The correct format of an I
statement is:
(Operation) , ( Infotype number) , ( Subtype),
( Object ID), ( Start Date) ,( End date)
The above sequence should be strictly followed.
In case a given field value is not provided, a
comma should always be included. Here are a few
examples of valid statements for I statements
I INS,9001,,,(P0001-BEGDA),(P0001-ENDDA)
I COP,0014,,,(P0000-BEGDA),(P0000-ENDDA)
I INS,9002,0012,,,

March 2009/Volume #1/Issue #1

All Rights Reserved

29

You might also like