HCM - Form - Reporting Line Change Form
HCM - Form - Reporting Line Change Form
HCM - Form - Reporting Line Change Form
Transfer (International)
(Reference to Standard SAP Help Document)
This is a standard SAP sample scenario. As we are planning to copy this scenario, we
must first understand what it does.
Purpose
The Transfer process supports an employee's organizational reassignment to a new
position outside of the current manager's area of responsibility. After the process is
run, the employee's master data is up to date. The business roles of Sending
Manager, Receiving Manager, Supervisor of Sending Manager, and HR
Administrator are actively involved in performing the process. The affected
employee is kept informed about the process by e-mail.
Using the Transfer process accelerates and optimizes the transfer procedure, since
the system integration of all roles guarantees that work items are forwarded as soon as
possible, and that all parties are informed at all times.
Prerequisites
To be able to use this sample process for test purposes, you must have performed the
Customizing activities for HR Administrative Services as described in
Configuration of Forms/Processes Sample Processes for HCM Processes
and Forms.
Technical Objects for Implementing and Executing the Process
Object Type
ID
Name
Process
ORG_CHANGE
Transfer
Workflow Template
WS17900427
Transfer
ISR Scenario
SOC1
Transfer
Interface
ISR_IF_SOC1
Transfer
Form Scenario
SOC1
Transfer
Form
ISR_HRASR_SOC1
Transfer
Scenario Steps
SENDING_MANAGER
RECEIVING_MANAGER
APPROVE
HR_ADMIN
Request
Accept/process
Approve
Complete processing
Attachment Types
SFREEATTM
General attachments
Standard Service
SAP_PA
Generic Services
S_MGRS_POSITIONS
S_USER_NAME
Back-End Services
Process Flow
...
A. Manager logs into the portal. Manager clicks on Manager Self-Service (this is the
new MSS BP 1.3.1) > Team > HCM Processes and Forms > Start Process
B. The HCM start application is launched in the new window. The manager chooses an
employee reporting to him that he wishes to transfer away.
C. The manager then chooses the Transfer form. These are the process scenarios
configured for the manager role HRASRB. (more on this later)
10
D. Now the manager fills in the form. He inserts the username of the receiving
manager, and the transfer reason.
E. Clicking on the Derive Data Button triggers a call back to the backend
system
11
12
A. The receiving manager logs into the portal. He clicks on MSS > Work Overview and
the UWL is visible. The manager then clicks on Tasks, and hell see the work item in
the list.
B. Clicking on it opens the form in a new window. The information filled in by the
sending manager is still visible.
13
Result
The process has the following results:
Transfer Carried Out: The employee's master data has been updated according to the
entries on the form.
Transfer Rejected: No changes have been made to the employee's master data.
14
Process ORG_CHANGE
Multiple versions can be defined for a process. You can define different start and end
dates for different versions, and they can automatically be active during the period.
Permit Parallel Run > should be activated in development/testing environment. This
will allow the same process to be triggered many times.
You can define process group and group different scenarios together. You can attach
this process to the process group defined.
Workflow
Link the workflow to the process.
15
Role Assignment
Who can start the process?
Form SOC1
Fields:
These are all the fields to be interacted by the scenario, and to be edited or display
information in the form.
Input Help can be defined from backend services or manual. You can enter a manual
list in here.
Default values can also be entered in here, or in reference to a backend services.
Data binding are like calling functions. The value of this field is passed to the input of
the backend service, or the reverse.
16
Form:
The form attached to the form scenario.
Clicking on the icons can preview / change / display the form.
Ensure this is Active.
17
18
Attachments
Define if attachments are allowed and what attachment types are allowed.
Rules
You can define the rules. These are just Boolean conditions. They are attached to the
operations mentioned above.
Message Mapping
Show or hide messages.
19
Design
When building HCM Process and Forms, the planning process is very important.
HCM P&F development is indeed quite complex. Everyone involved with
configuring/developing the process and forms must have good understanding with the
entire bespoke scenario. It is difficult to isolate the development components as they
are tightly coupled.
For example:
It would be difficult for the workflow developer to build the workflow without
knowing how the form scenario was defined. Everything is controlled from workflow.
They need to know how the scenarios steps are defined, what functionality the user
can do, such as review, edit, reject etc.
It would be difficult for the form developer to build the form without understanding
the form scenario and scenario steps involved, as they have to be aware of who will
be using the form, when fields are switched on or off. This will impact layout of the
form.
Finally, the person responsible for the portal configuration must know who will be
doing what before he can decide what roles/iViews to assign. Fortunately the portal
administrator will only be required during the initial configuration.
Define all the fields that are going to be variable to the scenario. If a field is to
be edited by a user, it is best to create two separate fields, one <VARIABLE>
and another <VARIABLE>_NEW in order to distinguish between the two.
Define the number of users involved with this scenario. In the sample
scenario, we have (1) original manager (2) receiving manager (3) approval
manager (4) HR Admin, a total of 4 users involved in the whole process. As
such we have to define 4 different scenarios.
Who can edit and see what? Should the fields be automatically populated? Etc.
Understand the backend services available and delivered by SAP. If they are
not adequate for the bespoke scenario, then we have to define generic services
to meet the requirement.
20
Roles
Process Designer
This role is normally by functional consultants who understand the business
requirements. They should be able to picture and design how the overall process
should work, both from a system perspective and from an end-user perspective.
This role requires good understanding of HCM P&F, with a bit of ABAP (preferable
but not a must), good workflow understanding, and portal understanding to put this
together. Good functional knowledge is assumed.
They should have a good understanding of the backend generic services delivered
by SAP.
With the assistance of a developer, they should be able to define the form scenario
and process scenario in the design time.
Form UI Developer
This role is responsible for building the actual form. They must have good
understanding of the form scenario, and the users who will be using this form.
The forms are built using the Adobe Life Cycle Designer.
Workflow Developer
This is probably one of the most important roles. Workflow controls the entire
process, what happens behind the background, who the form should go to next, what
functionality the next user can get, etc etc. You can consider this as the brains of the
process.
This role will be responsible for building the actual workflow. Once again they must
have good understanding of the form scenario, how the overall business process
should be modelled, and who will be interacting with the form.
Portal Administrator
This role is responsible for configuring the portal for end user to access the forms.
They also need to know who needs to do what. There are three main streamlines of
users: employee, managers, HR administrators. They need to be aware of how to
configure the start process iView to restrict the process group or the initiator role.
21
They also need to have good understanding of Universal worklist configuration and
administration.
22
23
Step by Step
Step 1: Planning
As mentioned before, planning is one of the most important aspects of HCM P&F
development.
First we examine the difference between the standard Transfer scenario and TWUL
Reporting Line Change scenario.
Scenario differences:
Forms are slightly different, but almost identical.
There is no need for process approval by manager of sending manager.
There is no need for automatic update of infotypes as a result of the process.
The form is sent to the HR Administrator for review and will call transaction PA40
with parameters.
Form differences:
Standard SAP scenario:
Process scenario: ORG_CHANGE
Form scenario: SOC1
ISR Scenario: SOC1
Form: ISR_HRASR_SOC1
The forms are almost identical, with some cosmetic changes involved.
Cosmetic changes involves:
Renaming texts
Hiding/Deleting texts
Hiding fields
Replacing logo
Replace text in the button
Removing HR Admin section
The main change I see is
1) Input help required for locating the receiving managers username
2) Ensuring the receiving manager is a chief position
3) There is no need for automatic update of infotypes as a result of the process.
Well be requiring a new generic service for the managers username search help.
Remove the SAP_PA generic services for some of the fields.
Remove the scenario step APPROVE
24
Workflow differences:
TWUL Scenario
Line Manager
completes
form via MSS
No
Yes
Workflow: WS17900427
TWUL scenario is a lot simpler compared to that delivered by the SAP sample
scenario. (See workflow template WS17900427)
Changes:
There is no need for manager of sending manager to approve the process.
There is no need for automatic update of infotypes as a result of the process.
The form is sent to the HR Administrator for review and will call transaction PA40
with parameters.
We require the following scenario steps
1) Sending Manager
1. Sending manager will pick the employee to transfer (same)
2. Sending manager can fill in form for the transfer dates, receiving
managers username or name. (different)
2) Receiving Manager (identical to the standard scenario)
3. Receiving manager will action on the item in UWL. (same)
4. Receiving manager can pick the position to move the employee into.
(same)
5. The receiving manager can reject the request. (same)
3) HR Administrator
6. HR Administrator gets the work item in the UWL. (same)
7. He can view the form, or click on a action which takes them to PA40
with the relevant information (different)
25
Now we have established that the TWUL scenario is very similar to the standard
SOC1 scenario, we have to copy SOC1 into our bespoke scenario before we can start
editing.
A form scenario is required for every HCM P&F.
Form scenario defines the fields involve, as well as different scenario this form can be
used. In maintaining the properties of this form, the form behaviour can be dictated
for example, what fields are enabled/disabled, which fields are mandatory, which
fields are visible etc. We can also dictate the default values for some of these fields.
Form scenario is the backbone to the whole process.
Person Responsible
The process designer should carry out this step, with the help of developers if
necessary.
Details
26
Remember to save the form scenario! This will create a customizing request.
The process designer should carry out this step, with the help of developers if
necessary.
Details
Now the process designer can pass the information to all relevant developers to start
their developments.
28
There is a requirement to be able to search for managers. The user can either enter the
receiving managers username or the name, and the form should automatically find
the right manager and populate the correct values.
The standard form uses backend services S_USER_NAME at the moment, which is
linked to the fields RCV_MGR_FORMATTED_NAME and RCV_MGR_UNAME.
As the user enters the managers username in the form and click on the button
Derive Data, the backend service S_USER_NAME is triggered, which will
29
populate the RCV_MGR_FORMATTED with the name of the manager. Should the
username not be found, it will return an error.
*NOTE: Generic services defined and delivered by SAP are known as Back End
Services. All custom back end services are known as generic services.
Personal Responsible
ABAP Developer
Details
We need a generic service that can determine who the receiving manager is using the
input data.
Process Designer: You should treat the generic service as a black box. It will take in
some fields and output the result. You have to know when this generic service will be
triggered. You also need to define the operation are you going to trigger, and the
fields/field group you want to pass in and out.
ABAP Developer: You should make this generic service as generic as possible, so that
it can be reused by other scenarios. Notice that the generic services are all changing
parameters. It does not have a concept of import/export.
CHANGING PARAMETERS:
1. Receiving Managers username (pattern)
2. Receiving Managers full name (we know this is for output only)
Logic
Using the input (username, first, last), determine the actual username, first, last and
full name of the receiving manager.
In IMG:
30
31
32
Coding
Go to SE19
Now implement the methods inside the implementation class. (See the next section
for details of the methods)
A good starting point would be to try to understand the standard backend service
S_USER_NAME. I start by copying all methods and attributes of the implementation
class CL_HRASR00_GS_USER_NAME to my newly created implementation class
ZCL_HRASR00_ZHR_USER_NAME.
Now we start changing it:
method IF_HRASR00GEN_SERVICE~GET_OPERATIONS.
First of all we have to add some code to this method. It is used to define what
operations are supported by this GS. Youll also need to specify the fields (just field
names) being used by this operation. This is effectively defining the import/export
interface of this GS (but remember above GS only deals with changing parameters).
Therefore in our case, we are going to have one operation
GET_FORMATTED_NAME, and four fields
USER_NAME
FORMATTED_NAME
How to test this:
33
Method IF_HRASR00GEN_SERVICE~GET_FIELD_INFO.
For each of the fields of operation we have defined above, now we need to define the
properties for each field. Properties are:
Field name
Data Element of field
Supports Value Help?
Supports default value?
List of dependent fields for default value
List of dependent fields for value help
For operation GET_FORMATTED_NAME, the fields will have the following
properties.
USER_NAME of type UNAME
FORMATTED_NAME of type AD_NAMTEXT
How to test this:
The way to test this is go into the designer (HRASR_DT) and try to add a service.
If you see your operation in here, and the associated fields, it means your code works!
34
Method IF_HRASR00GEN_SERVICE~DO_OPERATIONS
Note: This method is called on every round-trip, whenever an event is triggered from
the form.
We want to implement our logic in here.
Logic
35
This method is optional. You only implement this method if the Generic
Service requires special fields. "Special fields" are further parameters that are
generally important for the Generic Service and that should, therefore, always
be available. For processes that involve the employee, this could be the
personnel number (field PERNR), for example.
Determine Information for Supported Fields (GET_FIELD_INFO)
This method is mandatory. You must always implement it. It defines the
properties of the fields that the Generic Service uses.
Initialize (INITIALIZE)
This method is optional. Only implement this method if you want to provide
default values for fields when forms are initialized. If the default value of a
field is dependent on the value of a different field, the method must also
provide this information.
In contracts to the DO_OPERATIONS method, this method is not called for
every roundtrip.
Perform Operations (DO_OPERATIONS)
This method is optional. Only implement this method if you define operations
for the Generic Service. If the Generic Service does not support any operations
and is only to be used to prove default values and input help, you do not need
this method.
In the method, you define the corresponding coding for each of the operations.
This is called repeatedly when a form scenario is run - that is, for every
roundtrip to the back end.
Determine Values for Input Help (GET_HELP_VALUES)
This method is optional. Only implement this method if you want to provide input
help for fields. If the input help of a field is dependent on the value of a different
field, the method must also provide this information.
The first three methods specify the scope of the functions of the generic service and
communicate this to the calling framework. The last three methods then implement
this function scope.
36
Part 2B
Part 2A covered building a generic service to search for the managers username.
There is an additional requirement to enhance the drop down for the new position
used by the receiving manager.
This document will cover this new generic service.
Reason
Currently when the receiving manager selects the drop down for the new position, it
only shows the text for the position.
There is a requirement to show the position number, and whether it is vacant in the
drop down box as well.
We have to copy the generic service provided by SAP (S_MGRS_POSITIONS) to
meet our needs.
Personal Responsible
ABAP Developer
37
Details
38
39
Go to SE19
40
41
Method GET_MGRS_POSITIONS
As everything is the same, we dont have to touch any other methods.
This method already returns a list of positions in a name value pair table.
All we have to do is enhance this method to bring back more information in the drop
down values.
42
Part 3
After understanding Part 2, we now have all the building blocks to start developing
the HCM P&F for Reporting Line Change.
This document will cover:
- Configuring the Form Scenario
- Configuring the HCM process
At the end of this document, the new process and form should be visible in the portal.
43
We need to change the form scenario ZRLC (copied from ZOC1) to meet the business
requirement.
Person Responsible
The process designer must be clear about what fields are used in the form.
They need to know:
- Define fields you want to appear in the form if they display variable data, such
as employee number, position id, text etc.
- Define fields you need to help update backend system if necessary
- How these fields will be determined/calculated
- The different scenarios this form is going to be used.
- How these fields are going to appear/used by different scenarios.
Scenario Steps
Rules
We have to define some rules (Boolean expressions/conditions) for the scenario to
know what to do depending on the circumstances.
We have defined two rules, ZIS_STEP_HR_ADMIN,
ZPOSITION_SELECTION_ALLOWED.
44
You can only test this after youve defined the process. See below.
45
8. Finally, we must map this generic service to the input help. Click on the input
help column, and select ZHR_MGRS_POSITIONS
46
47
For our Receiving Manager username field, we only want the sending manager (the
originator) to change this. Therefore we change the
Go to Scenario Steps > SENDING_MANAGER > Fields, change the fields
RCV_MGR_UNAME to MANDATORY, and the other position fields to be invisible.
48
For our Position fields, we only want the receiving manager (the originator) to
change this. We also dont want the receiving manager to change the user name.
Therefore we change the it as follows.
Go to Scenario Steps > RECEIVING_MANAGER > Fields, change the fields
RCV_MGR_UNAME to READONLY, and the position field to be MANDATORY.
49
Person Responsible
Process designer
Details
50
51
Ensure the initiating role is a manager if you want the manager to start the process.
How to test:
52
The generic service was built in the previous step, however the method
DO_OPERATION could not be tested.
Now that we have the form up and running you can trigger DO_OPERATION.
Person Responsible
Note that this form is still the one copied from SOC1. It is not our final form, however
the fields we are interested in still exist.
Type in MSS* and click on the Derive Data button.
Note that you can debug by setting an external breakpoint at the start of
DO_OPERATION. (for the user you are logged in as in the portal).
53
I get a warning message saying its found more than one user with my search string,
and it has picked MSSUSER01 for now.
54
This step is just to highlight you can maintain your HCM configuration outside of the
design time. For example, you might want to quickly switch off a form from the
portal, rather than changing this inside the design time, you can activate/deactivate
forms via configuration.
Person Responsible
Process designer
Details
You can activate or deactivate processes using Versions in the design time
environment.
An alternative approach other than the Design Time is described below.
Now we are ready to test the form
55
By checking/unchecking the validity checkbox, you can switch the forms on/off.
56
Part 4
After understanding Part 3, we now have to change the form to meet business
requirement.
Step 8: Form
Reason
Form Developer
Details
The form developer must have at least Adobe Life Cycle Designer 7.1 (with patch)
installed. Version 8.0 with patches will also work.
57
If you open the form now, you should see a new tab in the Library.
You MUST use these controls otherwise the in the form scenario field configuration,
it will always show a warning.
58
It only matters when you want these UI controls to be controlled using from the form
scenario configuration. Standard SAP forms dont use these controls, and hence they
all have this warning. It is recommended that you use the correct controls. Note the
green plus icon in the diagram. It means the UI control is adequate for the field.
[Note***: Depending on the Adobe LifeCycle Designer version, this warning flat is
not always accurate]
59
Click on the change button and it will take you to the form designer (effectively
transaction SFP).
You can also include scripts for example, the script behind the button Derive Data:
Also, when we are in approve or display mode, the button is not visible.
Remember to activate your form.
Should you need to change the fields in the form scenario, remember to reactivate
your form so that the form interface is in synch with the form.
Ive replaced the text edit UI control for the Receiving Managers user name.
61
http://help.sap.com/erp2005_ehp_03/helpdata/en/43/1d639b3fce3566e10000000a114
66f/frameset.htm
I had to replace the drop down list box for new position.
First I drag the Drop Down list box control from the HR Admin Controls Library into
the form.
Finally change the item values mapping. Click on Specify Item Values.
62
You can either click on the preview button, or load the form from the portal to view
your changes. (see unit testing section of previous document)
63