Está en la página 1de 29

www.SAPHRUnleashed.

com

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

Identify Locked
Personnel Numbers
before Executing
Contents
Payroll Runs Using Variants for
Simplifying Data

O
ne problem that payroll managers or administrators repeatedly 5 Input - A Guide for
face (every month or so) while running payroll is the result of SAP HR Users and
users who have locked the master data of employees. If a user has Consultants
locked any number of employees’ master data through maintenance trans-
actions, the payroll driver generates an error and the payroll cannot be exe- Quickly Access
cuted. This error is then followed by the frustrated payroll administrator Complex IMG Paths
9
placing phone calls or sending emails to those users involved, saying, via Direct
“Please unlock the personnel number _____ that you have locked, so that Transaction Codes
the payroll can be executed.” Time Evaluation
To identify those personnel numbers that have been locked by users, 13
Made Easy
SAP provides the standard program HFIUCPL0. A number of powerful
Employee Quick
options are available in the program, giving the payroll administrator total
19 Search Shortcut
control over the master data of their employees. This report program
Strings
lets you:
1) view a list of locked personnel numbers, along with the name of Recording Changes
the user who has locked them, Made in Personnel
23
2) send the user(s) an email requesting the release (unlock) of the Development
given employees, Infotypes
3) forcefully delete the sessions of the users responsible for the locking. Dynamic Actions -
The report program may be executed via standard transaction 27 Valuable Tips and
PC00_M44_UCPL. Tricks
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 particu-
larly 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.
www.SAPHRUnleashed.com Indentify Locked Personnel Numbers before Executing Payroll Runs

The selection screen of the program is shown The program has three powerful options that
in figure 1. can be chosen by selecting the three radio-button
You may restrict the program’s selection by options shown under Additional Selection in
entering suitable values for the fields provided, figure 1.
such as personnel number, personnel area,
subarea, etc.

Figure 1: Selection screen


of program HFIUCPL0

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


report program.

1
You may simply display a list of all employ- In figure 2, the personnel number 50995 has
ees (personnel numbers) that are locked. been locked by the user STUDENT102.
The report also displays the employee num-
ber, the user name, and the various user details as
shown in figure 2.

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

2
You may also send an SAP office mail to their SAP inbox as shown in figure 3.
the users who have locked the personnel The email may be viewed in the SBWP transac-
numbers. In this case, an express message tion, or the user may go there directly by choos-
is sent to the user who has locked the employee(s) ing the Inbox button from the express pop-up
in question, stating that an email has arrived in shown in figure 3. The text of the email is shown
in figure 4.

2 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 3


www.SAPHRUnleashed.com Indentify Locked Personnel Numbers before Executing Payroll Runs

3
You may also forcefully kill (delete) Note: In order to end the sessions of the
the user sessions that have locked any locking users, the required authorization must
be provided to the role of the user running
personnel numbers. Choosing the Delete the program.
Locking Users’ Sessions kills the session of
each user involved in the locking. The session If no personnel numbers are locked by any
ending function using this option is similar to users, the program simply generates the message
that of transaction SM04. The user running the “All personnel numbers are unlocked,” as
program must have the required authorization in shown in figure 5.
order to use this session-killing option.

Figure 5: Message showing


no employees are locked

Your Ad Here.

Email us at Advertising@SAPHRUnleashed.com

4 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
S
AP reports may contain a number of input Note: You may define variants for both standard
fields. This may be confusing for users. All SAP reports and customer-defined reports.
fields may not be required for all users at all
times. One way of avoiding the display of unnec- Accessing the Already-existing
essary fields is via the usage of variants. Variants’ Variants
In order to access the various variants of a pro-
basic function is to specify input default values
gram, click the icon from the toolbar of the pro-
for fields, but they may also be used to hide
gram selection screen. The screen appears as
unnecessary report screen fields.
shown in figure 1.
Most people are unaware of the numerous ways
You may either enter the variant or the user
a screen field may be modified by using variants.
who created it last, or change the variant in order
In this article, I will show the various options that
to narrow down your selection. Clicking the
are applicable for fields used in variant creations.
Execute icon will display a list of the variants
I will also discuss the steps required in creating
applicable to the program as shown in figure 2.
variants for a given report program
Selecting a particular variant populates the
The advantages of variant creation are as follows:
fields with the relevant values defined in the vari-
• They simplify the input screen as unnec-
ant. Moreover, the system also hides fields that
essary fields may be hidden.
are set as visible and makes fields mandatory that
• Variants make the user’s life easier and
are defined as such within the variant definition.
work faster. They relieve the user from
You may then use the Execute button in order
remembering the default values that are
to run the program according to the selection
to be entered in the various screen fields.
field values defined in the variant.
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.

Figure 1: Finding a Variant

March 2009/Volume #1/Issue #1 All Rights Reserved 5


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 the Save icon. Alternately, you may also choose
the keyboard shortcut CTRL - S. This leads you
Report Program
to the variant attributes screen as shown in
In this section, we will look at the steps
figure 3.
required in creating a variant for a given report

3
program. Let us take a closer look.

1
Setting the Attributes of the Variant and
Entering the Relevant Data in the
the Screen Fields: This is the most
Desired Fields of the Report: The first
important of the all the steps required in
step in defining variants involves running
creating the variant. In this step, we specify the
the report program either via the transaction
name and description of the variant, as well as
SE38 or via the report transaction, and then
specifying which of the screen fields are to be
entering (default) values in the various fields
hidden, set as compulsory, or made read-only.
of the program selection screen. These default
On the screen shown in figure 3, there are var-
values are to be stored in the variant and made
ious attributes of the variant as well as the indi-
available to the user when the relevant variant
vidual fields contained in the table structure
is imported.
below. First, you need to enter a suitable name

2
and description of the variant in the fields provid-
Defining the Variant: Once the field ed. You then need to set (if required) the follow-
values have been entered in the relevant ing indicators pertinent to the variant:
fields on the report selection screen, press

Figure 3: Variant Attributes


Screen

6 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 7


www.SAPHRUnleashed.com Using Variants for Simplifying Data Input - A Guide for SAP HR Users and Consultants

Only for Background Processing: If this shows the Form name field in grey (protected)
checkbox is not selected, the corresponding vari- using this indicator.
ant may be used both in foreground and the back- Hide Field. As the name indicates, this indica-
ground mode. If the indicator is checked, the tor is used for hiding a field from the selection
variant may only be executed in the background screen. This is a useful function and may be used
mode. In case you have a variant that is scheduled for making unnecessary fields invisible from
to be run in background, this indicator must be the user.
set. This will prevent users from changing the Required Field. If you like a field to be
variant by mistake in the foreground mode. mandatory, the required field must be checked.
Protect Variant: As the name indicates, this The respective field(s) then becomes mandatory.
checkbox is used for protecting (preventing The user has to definitely enter a value in the
changes in) the variant by other users. If this field that is mandatory in order to execute
checkbox is set, the variant may only be changed the program.
by the user who has created the variant. If the Save Field Without Values. Checking this
particular user has left the company, the variant indicator will not affect the contents of the rele-
may be accessed or changed with the help of the vant field when a particular variant is imported.
security team members. Rather, the field value already entered is not
Only Display in Catalog: If this indicator is replaced with a blank space or with any other
checked, the corresponding variant will not value from the imported variant.
appear in the list of variants shown in figure 2. For example, if we set this checkbox for a field
In case you want to access or change this par- named FORM, and the field has the value XF01
ticular variant, the procedure is somewhat diffi- when the relevant variant is imported, the same
cult. The variant may be accessed by choosing the value will remain in the field after the import is
Variants option in SE38 for the given program performed.
and then accessing the total variants list via the

4
Variant g Catalog menu path. Saving the Variant: Finally when you have
Apart from the variant-specific attributes, a made the necessary settings according to
number of checkboxes are available for each field your requirement, you must save the vari-
that resides on the selection screen of the pro- ant using the Save button or the keyboard short-
gram in question. For each field, the following cut CTRL – S. This takes you back to the pro-
indicators (check boxes) are provided: gram selection screen.
Protect Field. Checking the Protect field The variant will be created and added to the list
indicator locks (protects) the relevant field for applicable to the program in question. You may
any entries by the user. In short, the default value execute the program afterwards using the proce-
assigned to the field may not be changed and dure defined in the previous section.
is shown in grey color. For example, figure 4

Figure 4: Protecting the Form


Name from being Changed

8 All Rights Reserved March 2009/Volume #1/Issue #1


www.SAPHRUnleashed.com

Quickly Access Complex


IMG Paths via Direct
Transaction Codes

T
he IMG is a complex place and contains a is an assigned transaction code that allows direct
plethora of nodes representing configura- access to the activity. Within the table, the activi-
tion activities for all modules. Searching ty key and the transaction code are stored in fields
through the IMG for a particular activity node ACTIVITY and TCODE, respectively.
may be a time-consuming and laborious activity. The steps required in finding the direct transac-
Fortunately, SAP provides you a way to directly tion code are shown below:
access the activity node. This access is via direct

1
transaction codes specific to each activity. In this In the first step, you switch on the
article, I will discuss the procedure for finding out Additional information setting in order to
these direct transaction codes. view the key pertaining to the IMG activity
in question. This may be done via the menu path
Note: You may enter the transaction codes in Additional Information g Display Key g
your Favorites of the SAP menu for quick access. IMG Activity as shown in figure 1.
Switching on the additional data displays the
The activity information is stored as entries in technical name (key) of the IMG activity as
table CUS_IMGACH. In the database, each shown in figure 2.
activity (and text) is denoted by a key such as For example, the key for IMG activity Infotype
OHIX0626. To each key record in the table, there 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 9


www.SAPHRUnleashed.com Quickly Access Complex IMG Paths via Direct Transaction Codes

Figure 2:
Technical Name
Shown in Front
of Activity Text

2
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 trans-
action 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

A
n important and complicated part of the The absences or attendance of employees are
SAP HR module is its Time Evaluation entered in the infotypes 2001 and 2002 respec-
component. In a company, there may be tively. In case any additional payment (overtime)
employees working on monthly salary. Such is to be paid to the employees, the respective
employees may be eligible for a fixed monthly amount must be computed manually and entered
salary and the actual times worked on each day (or in the 2010 (Remuneration) infotype, or 0015
breaks within working hours) may not be impor- (Additional Payments) infotype under a suitable
tant for salary calculation. wage type.
On the other hand, a company may have The payroll is then executed, taking the over-
employees working on a daily or hourly rate. In time amount into account. The payroll schema
such cases, the Time In and Time Out of employ- will manage all payments including the overtime
ees may be recorded, and the breaks during work- amount.
ing hours may also be monitored. In addition, the
extra time worked each day or within a period Note: In the No Time Evaluation scenario,
must also be determined. For example, if employ- no automated computations are involved for
overtime. In the case where overtime is to be
ees are entitled to work 10 hours a day, when they paid, manual calculations must be done by
work more than 10 hours they must be paid over- users. No Time Evaluation program or time
time. Time Evaluation is useful in the latter schemas or rules are used. The payroll schema
scenario. It provides automated calculation and (and rules) may be customized in order to meet
evaluation of time data. For situations where time requirements.

2
data is important, there may be three different
scenarios involved. With Time Evaluation Along With
In this article, three different scenarios within Time Recording: Let us now discuss
Time Management will be examined. another scenario. You may have employee
Time Evaluation along with Time recording. In
this case, the Time In and Time Out of employ-
The Three Scenarios Within Time ees is recorded daily in a time recording system.
Management This time data is then sent to the SAP system for
Let us look at the various scenarios within Time evaluation. The actual clock times worked are
Management. These are discussed below: stored in the infotype 2011 (Time Events).
The Time Evaluation program is then executed

1
Without Time Evaluation (and Without using a suitable time schema. The schema com-
Time Recording): Before diving into the pares the actual working times of the employees
details of Time Evaluation, let us see how within a given period of the planned working
life is without Time Evaluation. This is the sim- time. In this scenario, the breaks between working
plest case. In this case, no time recording system times are also taken into account.
is involved and no Time Evaluation program is
executed.

March 2009/Volume #1/Issue #1 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 This is suitable for calculations where actual
results, including additional hours worked by time (time in and out) is not important for pay-
employees (such as overtime), are stored in the ment calculations. In this scenario, the data are
time clusters. During the Time Evaluation run, entered (in number of hours) in the infotype
the system generates time wage types for addi- 2002 (Attendance). The Time Evaluation pro-
tional payments (overtime). gram is then run using the time schema based on
After the Time Evaluation program, the Payroll the standard SAP schema TM04.
program is run. The time results stored in clusters Apart from customizing the schema, some con-
may then be gathered by the Payroll program for figuration entries must be made in order to eval-
processing employee payments. uate the time data. The evaluation program calcu-
This scenario requires customizing of the time lates the overtime and other results and stores
schema and rules, as well as certain configurations them in the time clusters. The payroll is then exe-
in the IMG. cuted .The time results stored in clusters may
then be gathered by the payroll program for pro-

3
Using Time Evaluation Without Time cessing employee payments.
Recording: This scenario is midway The behavior of the Time Evaluation program,
between the first two options. In this case, the schema used for the time data processing, as
the Time In and Time Out are not recorded. well as the underlying configuration required, dif-
Rather, the emphasis is on the hours worked by fer from the previous scenario.
an employee.

14 All Rights Reserved March 2009/Volume #1/Issue #1


Time Evaluation Made Easy www.SAPHRUnleashed.com

Note: Similar to Payroll, Time Evaluation has Note: Prior to defining Time types, you need
schemas which contain rules and operation to define appropriate personnel subarea
pertaining to time calculations. For the Time groupings.
Evaluation With Clock Times scenario, SAP pro-
vides the schema TM00. TM04 is the schema Suppose the employees of a particular person-
for the Time Evaluation Without Clock Times nel subarea grouping have a planned working
scenario.
time of 10 hours a day. However, they work for
11 hours each day of a particular month.
Note: The time cluster acts as an interface
A Time type called Compensation Time may
between the Time Evaluation and the Payroll
program. The Payroll reads the time cluster
be defined to store the total difference of addi-
results in order to process payments. tional hours worked by the employees within the
given month.
A few examples of Time types are shown in
Important Terms in Figure 1.

Time Evaluation The standard system contains commonly used


Now let us discuss some of the important Time types. Time types used may differ according
terms related to Time Evaluation. to the type of scenario involved (with clock times
or without clock times). The Time types’ calcula-
Personnel Subarea Groupings tions are specified by the rules contained within
As with work schedules and other configura- the Time Evaluation schema. In case the standard
tion in the Time Management module, Time
Time types are not sufficient, you may create your
Evaluation also allows you to define groupings
based on personnel subarea. This lets you specify own Time types.
how the time data of employees that lie within a
certain subarea are to be evaluated. Note: New Time types must only be created
when the standard Time types are not enough
Time Types and Processing Types to fulfill your requirements.
i) Time Types
Time types are defined as the basic units used The maintenance screen of a Time type called
for denoting time durations (time spans). Absence 0020 is shown in Figure 2.
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.

Code Description
0010 Attendance (generated or accessed from time events infotypes 2011)
Figure 1:
0020 Absences (infotype 2001) Some
Time Type
0030 Attendance Hours (stored in infotype 2002) Codes and
Meanings
0040 Overtime Hours
0050 Total Hours Worked

March 2009/Volume #1/Issue #1 All Rights Reserved 15


www.SAPHRUnleashed.com Time Evaluation Made Easy

Figure 2:
Time type
0020

There are two important indicators on this Note: The Processing types are used to create
screen, namely Save as Day Balance and groups of attendance or absence types that are
Cumulate as Period Balance. The indicators to be processed similarly. This assignment or
linkage is made in the IMG configuration
are assigned value 1, meaning that the Time type
is used both in the day balance as well as period Figure 3 shows some standard Processing types
balance. that are available
ii) Processing types
Along with Time types, Processing types are You may also define your own Processing types.
also important. The Processing type is an indica-
tor that is assigned to an absence code or atten-
dance 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 Processing
Meaning
balances computed from them are posted to the Type
Figure 3:
same Time type. Some P Attendance
Standard
Processing
Types A Absence

I Illness

M Over Time

16 All Rights Reserved March 2009/Volume #1/Issue #1


Time Evaluation Made Easy www.SAPHRUnleashed.com

Time Evaluation Program


(RPTIME00)
This program is the main program of Time
Evaluation. It may also be accessed via the trans-
action PT60. The screen of the program is shown
in Figure 4.
One of the important input fields of this pro-
gram is the Time evaluation schema (specifying
the relevant schema to be used). The schema con-
tains rules that define the various steps (and cal-
culations) 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 pro-
cessing 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

R
emembering individual employees’ person- semantics of these shortcut strings. Since the
nel numbers may be difficult for SAP users. Shortcut method is an enhancement of Search
This may become even more challenging help, I will also discuss basic Search help method.
when a new SAP implementation is carried out,
and the SAP system assigns fresh numbers to Basic Search Help Method
employee records when data from the previous Before diving into the details of the Shortcut
system are loaded. When maintaining employee codes, let me discuss the Search help functionali-
data using transactions PA30 and PA20, the usual ty. While processing an employee’s data via trans-
means that users employ for searching for action PA30 or PA20, users employ the F4 help
employees’ numbers is via the Search help. (Search help) provided on the personnel number
Most functional consultants and users are not field. This will open the dialog box comprising of
aware that an even faster method for accessing a number of Search helps. If you want to select
employee numbers exists. This is via the usage of all employees whose last name is Admon and
Employee Shortcut Code Strings. This method first name begins with S, you will select the Last
simplifies the Search help procedure and provides name –First name Search help tab and enter val-
quick access to the desired numbers. In this ues as shown in Figure 1.
article, I will discuss how to write the syntax and

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 per- The =n represents the code for accessing Last
sonnel number field (on transaction PA30 or name – first name Search help (this code will
PA20) with the relevant employee number. vary according to the Search help to be used).
This is the basic Search help method. One dis- Each dot (.) represents the fields provided on the
advantage to this method is that you have to nav- relevant Search help (in this case, last name and
igate through the Search help dialog box, select first name sequentially). The value that is to be
the relevant Search help of your choice, and enter passed for the field is written after the correspon-
values in the appropriate fields before reaching ding field period (dot). You may simply use a
the list of employee values. In next section, we period without a value or blank space if no value
will discuss the Shortcut code method based on is to be passed for a given field. In =n..Sarah, the
Search helps. first period followed by no value means that we
do not impose a selection restriction based on the
Employee Shortcut Code Strings
last name.
SAP provides a quick way of getting to the
Keep in mind the following:
employee (number) using Shortcut code strings.
• In case we need to search for the employ-
These provide direct access to a desired set of
ee number having the first name Sarah
employee records by simply entering the string in
and last name Admon, we will enter the
the personnel number field contained in the main
shortcut code =n.Admon.Sarah.
screen of transaction PA30 or PA20. For exam-
• The =n.Admon. or =n.Admon.. have
ple, in order to search for all employees whose
the same effect, i.e, the program reads all
first name is Sarah, the necessary code to be
employees having last name Admon. In
entered in the personnel number field is shown in
case the latter fields are not being used in
Figure 3.
the selection, their corresponding periods
may be omitted.
• Within Search helps, we use an asterisk (*)
Figure 3:
Searching to select all text beginning with a certain
for All pattern. The * is not used in Shortcut
Employees codes. For example, corresponding to the
Having the
First Name search shown in Figure 1, we will pass
“Sarah” =n.Admon.S as the string in order to
search for all employees having last name
Admon and first name beginning with S.

20 All Rights Reserved March 2009/Volume #1/Issue #1


Employee Quick Search Shortcut Strinigs www.SAPHRUnleashed.com

Entering the code string in the field and press-


ing 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 num-
ber 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
To get all employees from Cost Center
Subarea).(Employee
123456, enter =k…….123456. The seven
Organizational Group).(Employee
dots indicate empty values supplied for the
Assignment Subgroup).(Payroll Area).(Company
six fields before the Cost center, whereas the
Code).(Cost Center).(Organization
seventh dot indicates the cost center value
Unit)
Name =n.(Last Name).(First Name) Discussed in this article
Applicant =r.(Applicant Number).(Personnel =r.1234 must be entered to get the
Number) Personnel Number of employee whose
relevant Applicant Number is 1234
User ID =u.(Communication The relevant subtype of infotype 105 must
Type).(ID/Number) 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

L
ike Personnel Administration, the changes Entries for Switching On
made in the Personnel Development (PD) Tracking of Changes
infotypes must also be logged. You may In order to switch on the tracking of changes
record which fields were changed, the dates on made in Personnel Development data, you need
which they were changed as well as the user who to create some customizing entries in the stan-
made the changes. This facility was introduced by dard SAP table T77CDOC_CUST. One of the
SAP in Release 4.7. Changes made in infotypes IMG paths for accessing the maintenance screen
1000, 1001 and 1002 could be monitored at first, of table T77CDOC_CUST is Personnel
but this facility was later provided for other info-
Management g Personnel Development g
types as well.
Basic Settings g Activate Change
Most users and functional consultants are
Documents.
unaware of this functionality. In this article we
Transaction SM31 may also be used by entering
will discuss various entries for switching on the
the table name in the field provided and clicking
tracking of changes made in Personnel
on the Maintain button.
Development data, and how the entries are
Selecting either of the two options will take you
displayed.
to the maintenance screen of table
By default, the Changes tracking functionality is
T77CDOC_CUST. Click the New Entries
switched off for all infotypes. You need to switch
button.
it on for infotype and subtypes of choice. This
The various fields (and the values to be entered)
is done by making entries in table
on the table T77CDOC_CUST are discussed
T77CDOC_CUST. Once these changes are
below:
made and recorded, they may be viewed using a
Plan Version. The value 01 for the plan ver-
standard SAP report RHCDOC_DISPLAY. The
sion denotes the active version. Other than 01
changes made to PD infotypes are recorded as
version, the change log may not be required. This
Change documents in tables CDHDR and
is normally ste as 01 (since only change log for
CDPOS. The object name class involved is
version 01 may be required).
HR_ITnnnn, where nnnn is the infotype number
Object type. As the name indicates, the field
(for example, HR_IT1001 for infotype 1001)
Object type denotes the objects whose changes
are to be logged. The relevant code (comprising
Note: You may use the steps mentioned in of one or two characters) representing the object
order to track changes made in OM as well as type must be entered in the field (for example, O
Training and Event Management data. for Organizational Object, S for Position and
likewise). If an asterisk (*) is entered in the object
type field, the infotype change log will be updat-
ed for changes made in all objects of that info-

March 2009/Volume #1/Issue #1 All Rights Reserved 23


www.SAPHRUnleashed.com Recording Changes Made in Personnel Development Infotypes

type. For example, if you want to monitor The Subtype field must be filled with an aster-
changes made to all objects for infotype 1000, isk (*) for Infotypes to which subtypes are not
you will enter ‘*’ in the field Object type. applicable. Infotype 1000 is a typical example.
Infotype. In this column, the four digit number Active checkbox – The Active checkbox is
denoting the infotype to be monitored is speci- meant for switching the Infotype tracking on or
fied. For example, 1000 must be entered to spec- off. The entry does not have to be deleted in
ify Basic Definitions infotype, whereas 1001 is order to deactivate Infotype monitoring; the
entered for Relationships infotypes, and so on. Active indicator is simply switched off.
Subtype. In case you want the Change log to
be filled only when a particular subtype record of Tip: The Active check box turns Infotype
an infotype is changed, you must specify the rele- Change logging on and off, which makes it
simple to deactivate an entry in table
vant subtype number in this field. For example, if T77CDOC_CUST (without deleting it).
you want to limit the generation of Change doc-
uments for the infotype 1001 only to subtype After creating the appropriate entries on the
A012, the entry will look like the one shown in maintenance screen of table T77CDOC_CUST,
Figure 1. 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


Recording Changes Made in Personnel Development Infotypes www.SAPHRUnleashed.com

Viewing the Change Log tion based on the Object type and Object
Now you have made all the necessary configu- ID. Enter suitable values in the Plan ver-
ration settings related to the tracking of changes sion, Object type and ID fields. (The ID
made to PD data. The system will automatically field may also be left blank).
create the log for changes that are done. The pro- • Then, you must enter infotype-specific
gram RHCDOC_DISPLAY may be used to dis- data within the Infotype block. The val-
play the changes that have been made to PD data. ues entered here dynamically change the
The selection screen of the program is shown in input fields of this block. A typical exam-
Figure 2. ple of this is when the number of a lan-
Since the selection screen lets you restrict the guage-dependent infotype (such as 1000)
displayed data in a number of ways, it is a good is inputted in the Infotype field. In this
idea to become familiar with its input fields. Let case, a language key field is added on the
us take a closer look: screen. The language (such as EN for
• In the upper part, you will find the Object English, and DE for German) may then
Section. This lets you restrict your selec- 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 speci- New Values) is displayed. When the
fied in the infotype field in the Infotype block, Display Field Contents checkbox is not
two additional fields (Object type and Object ID on, a single line is shown in the Output
of related object) appear. In these fields, you
may enter the related object’s type and/or ID. for each change that is made
The output of the program will be comprised of The Output of the report RHCDOC_DIS-
the modifications made in Infotype 1001 PLAY is shown in Figure 3.
records having relationship with the specified At the beginning is the Object type (OT) col-
object type and ID. umn. The relevant icon indicating the Object
type is displayed in it. (In our example, organiza-
• The Change Data block is used to spec-
tional unit ). The second column is the Object
ify the change document selection based
ID, the eight-digit number identification number
on the ID of the user who modified the
assigned by the system when the user creates
infotype data, as well as the date and time
objects via transactions such as PPOME, PP01.
on which the change was made. The cur-
After that, the name of the changed object and
rent date is entered as the default for the
relevant infotype are displayed, followed by the
start and end date fields (but these may be
start and end dates of the modified record. The
changed according to your requirements).
Name column tells the name of the user who has
• At the end is the Output area. In this sec-
modified the infotype record in question. The
tion, you specify the format in which the
date and time of the change are denoted by the
data are to be displayed. There are two
Date and Time columns, respectively
ways to do this, namely Technical View
The illustration in Figure 4 is pertinent to the
and Summarized View. If the Technical
case when the Display Field Contents indicator
View is chosen, the data are displayed in
was checked on the main program screen. That is
technical form, i.e., the change docu-
why the label, the older value as well as the new
ments stored in the database. On the
value (of each changed field) are displayed.
other hand, the Summarized View will
display a single (summarized) document
Note: SAP does not provide any transaction
for multiple documents stored for a par- for executing the PD audit program
ticular set of data. RHCDOC_DISPLAY. The program may be
The Display Field Contents indica- executed directly via transaction SE38 or SA38.
tor (within the Output block) lets you However, many organizations may not allow
specify the level of detail to be displayed. access to SA38 or SE38. The program may be
provided to users through a custom-defined
If the indicator is selected, a detailed transaction code (Z transaction or Y transaction).
report showing every infotype field that
has been modified (along with Old and
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

D
ynamic Actions are statements executed Here are some useful tips for writing effective
automatically by the R/3 system during dynamic actions:
the maintenance mode of infotypes. You

1
may write your own dynamic actions (stored in You should not use blank spaces within the
table T588Z) in order to trigger activities auto- variable function part component of your
matically linked to infotype maintenance. actions. This may cause your dynamic
There are times when dynamic actions fail to actions to fail. For example, the following is not
achieve their purpose. I have heard people saying correct:
that “Our actions are not getting triggered.” One P RP50M-FIELD1 < RP50M-FIELD2
reason for this is that SAP does not provide any
syntax checking mechanism for guaranteeing the The correct form is:
accuracy of dynamic actions, and the consultant P RP50M-FIELD1<RP50M-FIELD2
actions are syntactically incorrect. Since there are (without any blank spaces in between)
no syntax checkers associated within the dynamic
action editor, it makes it necessary for you to

2
write syntactically and semantically accurate The correct use of brackets as well as
actions. commas should be made. A common error
In this article we will cover some important tips that consultants commit is the incorrect
and tricks related to dynamic actions that will usage of commas and brackets while writing
allow you to write correct actions and avoid mis- constant values and field names within P, I and W
takes commonly made by consultants. I have statements
assumed that the reader is familiar with the basics In figure 1, I have compiled an easy guide
of dynamic actions. If you need an explanation of for helping you to write error-free P, I and W
the basics of dynamic actions, send an email to statements.
editor@saphrunleashed.com.

Can quotation marks be used Brackets allowed while


Statement
while specifying constants? specifying field names?

P Allowed Not Allowed


Figure 1:

I Not Allowed Allowed

W 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) Let us consider another example. Suppose to


P (RP50M-FIELD)<(RP50M-FIELD2) the previous condition you want to add RP50M-
FIELD1. Say you want to trigger the action of
The correct forms are shown below: the country grouping MOLGA, 01 or (OR) the
I INS,9001,,,(P0001-BEGDA),(P0001-ENDDA) value of RP50M-FIELD1 is equal to 02, and
(AND) the value of PSAVE-STAT2 is equal to 2.
P RP50M-FIELD<RP50M-FIELD2 The statements are as follows:
P T001P-MOLGA=’01’/X
P RP50M-FIELD1=’02’/X

3
Apart from syntax errors, semantic errors P PSAVE-STAT2=’2’
must also be avoided. These are logical mis- I …..
takes that will cause the dynamic action to W ….
fail. This is typically true for OR and AND state- The I statement is executed if (T001P-
ments. MOLGA equals 01 or RP50M-FIELD1 equals
Let me first clarify what OR statements and 02) and PSAVE-STAT2 is equal to 2.
AND statement mean within the variable part of Many consultants generally forget to include
dynamic actions /X from P statements that are to be connected
• OR. When a number of P statements are with OR condition. If they do, the required pur-
connected via OR, the statement follow- pose will not be served. For example, consider
ing the P statements is executed if any the statements below:
one of the conditions specified by the P P PSAVE-STAT2=’02’/X
statement is true. P T001P-MOLGA=’01’
• AND statement. On the other hand, the I …………….
statement followed by P statements In the above case, the second P statement does
linked via AND will be executed only if not end with /X, so the OR condition is not met
all the P statement conditions hold true. and the AND condition is implied. The I state-
In plausibility checks (P statements) use the ment is executed when T001P-MOLGA equals
addition /X at the end of the variable function 01 and PSAVE-STAT2 is equal to 01.
part that you want to connect via OR condition.

4
In case no /X is specified, the statement is con- Another example of a common error done
sidered as an AND condition. You may use the by consultants is omitting the required
OR and AND together in order to create condi- (mandatory) field values while writing W
tions for representing your company’s scenario. and I statements. This is especially a problem
For clarification, let us look at a few examples: when the dynamic action has to be run in back-
P PSAVE-STAT2=’2’ ground mode. The necessary screen does not pop
P T001P-MOLGA=’01’ up and the necessary action does not take place.
I ….. Two examples are:
W …. • The Subtypes values for subtypes are not
The above statements mean that the system provided in case of infotypes that have a
checks the value of the country grouping and an mandatory subtype field.
employee’s employment status. The I and W • In the case of W statements , one or more
statement are executed if T001P-MOLGA equals mandatory fields have not be specified,
01 and PSAVE-STAT2 is 2.

28 All Rights Reserved March 2009/Volume #1/Issue #1


Dynamic Actions - Valuable Tips and Tricks www.SAPHRUnleashed.com

5
Another common syntax error is the incor-
rect 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

También podría gustarte