In this lesson, you create a two-step Organizational Management (OM) process, which allows to you to complete the following activities:
Create a Position
.
Assign the position automatically to the Organizational Unit
to which it belongs.
When you create the process, you test it at three different stages to make sure that each component of the process is error free.
This OM process is composed of the following steps:
Create a form scenario using the Back-End service SAP_PD.
Define the object types and operations.
Define the relationships between the object types.
Define the form scenario fields and operations.
Create the process (with no workflow template and no form) using the form scenario you have created.
Test the process to ensure the form scenario and form fields are error free.
Create and define the form.
Test the process (now including a form) in the Portal to ensure the form is error free.
Create and define the workflow template (using tasks specific for OM processes).
Test the process (now including a form and a workflow template) in the Portal to ensure that the workflow is error free.
Use the following figure as a template for the form you create.
You create a form scenario for an OM process in the same way you create one for a PA process, with one exception: you use a different Back-End service, SAP_PD.
Start Design Time for Processes and Forms (transaction HRASR_DT
)
In the object selection area, choose Form Scenario
.
In the ID
field, enter ZJ01 and choose Display
.
The Create Object
dialog box appears.
Choose Yes
to create the object.
The Create Form Scenario
dialog box appears.
Enter in the following information:
Form Scenario
: ZJ01
Name
: Create Position, Assign to Org. Unit
ISR
: ZJ01
Form
: ZJ01
Back-End Service
: SAP_PD
Save your entries. The Create Form
dialog box appears.
Choose Yes
to create the form scenario and the ISR scenario.
Design Time for Processes and Forms displays the hierarchy for your form scenario.
The form scenario of an OM process looks different to that of a PA process. Note that under the Backend Services
folder there is an extra view, PD Objects
, which contains a default folder, LEAD_OBJECT_ID
.
In an OM process, you must define the object type of the leading object.
In this process, the leading object is of Organizational Unit
object type. No operation is performed on it; the process simply displays the organizational unit's Attribute
and Text
fields. The organizational unit must be the leading object in this process; the position (the secondary object), which the process creates, requires an existing organizational unit to which it can be assigned.
In the object hierarchy area, choose
.LEAD_OBJECT_ID
appears in the first row as a default ID. This will represent the organizational unit object type. You must also define the secondary object type.
Enter the data in the following table (for columns marked with an asterisk, use the dropdown lists to enter the data; in the other columns, enter the data manually):
Object ID Fieldname | Object Type * | Object Abbr. Fieldname | Object Text Fieldname | Default Value Type * | Operation * |
---|---|---|---|---|---|
LEAD_OBJECT_ID (default value) |
| LO_O_ABBR | LO_O_TXT |
| <BLANK> |
SEC_OBJECT_ID |
| SO_S_ABBR | SO_S_TXT |
|
|
Save your entries.
Messages inform you that your fields have been created and that these fields are mapped to the Back-End service SAP_PD.
The PD Objects
view now includes the following folders:
LEAD_OBJECT_ID
SEC_OBJECT_ID
Note that the system uses the object ID field names that you entered in the table above for the folder names.
For each of the above folders, choose the Fields
view.
The field names for Object Abbreviation
and Object Text
that you provided in the table above (in PD_Objects
) are now represented as fields in the rows of these tables. This behavior is special to fields of infotype 1000. To add more fields in these folders, choose the Service Fields
button.
You define these fields later in this process.
This process contains two object types. Therefore, you must define through which of the possible relationships data will be retrieved.
Choose
and enter the data in the following table (for columns marked with an asterisk, use the dropdown lists to enter the data; in the other columns, enter the data manually):Related Object ID Fieldname* | Relation* | Relation Sign | Default Value Type* | Operation |
---|---|---|---|---|
|
|
|
|
|
Save your entries.
Note that the Fields
view of the leading object now contains extra fields from the secondary object.
In this form scenario, we require no further form scenario fields.
For more information on adding fields to a form scenario, see the tutorial for creating a PA process, 1.1 Configuring a Form Scenario and an ISR Scenario.
Recommendation
PD Objects
provides a Fields
view for each of the objects in your form scenario. When you add more fields to your form scenario in an OM process, it is recommended that you enter the fields in these views. The other Fields
view, in the object hierarchy area, shows the fields in the views plus additional, mandatory fields, which the system requires and adds automatically.
You create the process using the form scenario that you have created in the previous steps.
In the object selection area, choose Process
.
Enter the name ZJ01 and choose Display
.
The Create Object
dialog box appears.
Choose Yes
to create the object.
The Create Process
dialog box appears.
Enter the following information and choose Continue
:
Process Name
: Create Position, Assign to Org. Unit
Form Scenario
: ZJ01
Choose Continue
.
Design Time for Processes and Forms displays the data for your process.
In the object hierarchy area, choose the Validity Period
view and enter the following information:
Send Variant
: Write Data to Application Database
Process Type
: Process with Start Object
Start Object Type
: Organizational Unit
Application Type
: PD
Choose Workflow
.
Enter the workflow ID as NO_WORKFLOW.
In the object hierarchy area, double-click your process (the top level node in the hierarchy). Select Permit Parallel Runs
.
Recommendation
Choose this setting at least for the test and implementation phase of your process. It allows you to start the required process, for the same object ID, more than once when testing. During live system operations, you can undo this setting for individual processes.
Check the process consistency.
To do this, in the object hierarchy area, choose the root node of the process. Choose Check
on the toolbar. Edit your form scenario according to error messages displayed in the status bar.
Save your entries.
To test your process so far, complete the following steps:
In the object hierarchy area, double-click the root node of your process.
The Process menu option appears on the toolbar.
Choose
.Enter the following information:
Application
: Personnel Development
Process
: ZJO1
(entered by default from Design Time for Processes and Forms)
Object Type
: O (Organizational Unit)
Object Key
: Enter the object ID of the organizational unit, for which you wish to create a new position.
The process is started and the data is displayed in tabular form. Enter the ID of an organizational unit, for which you wish to create a new position, and step through the process until it is completed.
Use Transaction PP01
, in display mode, to check that the process has created the new position under your chosen organizational unit.
You create a form for an OM process in the same way that you create a form for a PA process (for detailed information, see Creating a Form and Editing the Layout).
The following is an outline of the steps you complete:
In the hierarchy, choose
.Create a new form.
Add the ISR Form-Wide Scripts Control Element
.
Add the fields to your form, as detailed in the following table:
Field Name (Data View tab) | Label | ISR Control Element |
---|---|---|
LO_O_ID |
|
|
LO_O_ABBR |
|
|
LO_O_TXT |
|
|
SO_S_ABBR |
|
|
SO_S_TXT |
|
|
SO_S_ID |
|
|
<BLANK> | <BLANK> |
|
Add an Effective Date
field.
Add a Refresh Data
push-button. Edit the scripting behind it to USER_EVENT_INITIALIZE.
Bind the form fields to the form scenario.
Save and activate the form.
You now test that the process with the form works correctly (for more information, see the tutorial for creating a PA process, Testing a Process (Portal). To do this, complete the following steps:
Open the Portal and choose the HR Administrator
role.
Choose Start Organizational Process
.
A roadmap for Start Processes
appears in a new window.
Find the organizational unit, for which you wish to create a position.
To do this, use the search fields Object Type
, Object ID
, Object Abbreviation
and Object Name
and choose Start
.
Select your located organizational unit in the table.
Choose Select Process
and select your process in the table.
Choose Edit
. The system displays your form.
Check: Does the form display the values for the Abbreviation
and Text
fields for the organizational unit?
Enter new data for Abbreviation
and Text
for the position.
Choose Check and Send
.
Review the data you have entered, and make changes if necessary.
Choose Send
and close the process window.
Check: Use transaction PP01
, in display mode, to check that your process creates a new position for your chosen organizational unit.
You define a workflow template for a OM process in a similar way that you define a workflow template for a PA Process (for detailed information, see the tutorial for creating a process, Creating a Workflow Template with the Process Form Workflow Step).
Note
The interactive components that you insert into the workflow template for an OM process are different to those interactive components that you insert into a PA process. In the Task Groups
folder (under My Workflow and Tasks
menu bar) there are interactive components specifically for OM processes.
The following is an outline of the steps you complete:
In the object hierarchy area, choose Create Workflow Template
. The Workflow Builder
is started.
Choose Basic Data
and enter the required information.
Retrieve the Tasks Groups for HCM Processes and Forms
folder.
Display the Workflow Container
menu bar and create the Container Element
for the Process Object
.
Define the trigger event for the workflow.
Define the programming exit at the workflow template level.
Activate the start-event.
In the workflow template, define the workflow step using the task Process PD Form
.
Double-click the workflow step and define the properties of the step.
Make the following settings:
On the Control
tab, choose Workflow Initiator
as the agent type, so that you can test your process easily in the Portal. This is an OM process. You are not changing the attributes of an employee (as you do with a PA process). Therefore, you cannot later use rules like Find Manager
. You must apply another logic to find your agents. For further information, see Agent Determination Rules for PD processes.
Choose the Binding (Exists)
push-button. In the Change Binding for Step
dialog box, set the &SEND_VARIATION&
row in the Data Flow
window to A (Write Data to Application Database)
.
Display the Workflow Container
menu bar and double-click the container element Form
. On the Initial Value
tab, enter the form scenario details.
Save and activate the workflow template.
Provide your process with the workflow ID.
Exit the Workflow Builder
and return to your process. In the object hierarchy area, choose Workflow
and enter the workflow ID.
Execute your process in the Portal to see that there are no errors with the workflow template. Use transaction PP01
as before, to see if your process has created a position for your chosen organizational unit.
You have created a two-step process containing a form and a workflow template. You have tested the process for possible errors.