Show TOC

Procedure documentationCreating an OM Process (Exercise 3)

 

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.

Procedure

This OM process is composed of the following steps:

  1. Create a form scenario using the Back-End service SAP_PD.

  2. Define the object types and operations.

  3. Define the relationships between the object types.

  4. Define the form scenario fields and operations.

  5. Create the process (with no workflow template and no form) using the form scenario you have created.

  6. Test the process to ensure the form scenario and form fields are error free.

  7. Create and define the form.

  8. Test the process (now including a form) in the Portal to ensure the form is error free.

  9. Create and define the workflow template (using tasks specific for OM processes).

  10. 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.

Creating the Form Scenario using Back-End Service SAP_PD

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.

  1. Start Design Time for Processes and Forms (transaction HRASR_DT)

  2. In the object selection area, choose Form Scenario.

    In the ID field, enter ZJ01 and choose Display.

  3. The Create Object dialog box appears.

    Choose Yes to create the object.

  4. 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

  5. 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.

Defining Object Types and Operations

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.

  1. In the object hierarchy area, choose Start of the navigation path Back-End Services Next navigation step SAP_PD Next navigation step PD Objects End of the navigation path.

    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)

    Organizational Unit

    LO_O_ABBR

    LO_O_TXT

    Value for Effective Date

    <BLANK>

    SEC_OBJECT_ID

    Position

    SO_S_ABBR

    SO_S_TXT

    Value for Effective Date

    Create

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

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

Defining the Relationship between the Organizational Units

This process contains two object types. Therefore, you must define through which of the possible relationships data will be retrieved.

  1. ChooseStart of the navigation path SEC_OBJECT_ID Next navigation step Relations End of the navigation pathand 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

    LEAD_OBJECT_ID

    003

    Bottom Up

    Value for Effective Date

    Create

  2. Save your entries.

    Note that the Fields view of the leading object now contains extra fields from the secondary object.

Defining Form Scenario Fields and Operations

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 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 Start of the navigation path PD Objects Next navigation step Fields End of the navigation path views plus additional, mandatory fields, which the system requires and adds automatically.

End of the recommendation.
Creating the Process

You create the process using the form scenario that you have created in the previous steps.

  1. In the object selection area, choose Process.

    Enter the name ZJ01 and choose Display.

    The Create Object dialog box appears.

  2. Choose Yes to create the object.

    The Create Process dialog box appears.

  3. Enter the following information and choose Continue:

    • Process Name: Create Position, Assign to Org. Unit

    • Form Scenario: ZJ01

  4. Choose Continue.

    Design Time for Processes and Forms displays the data for your process.

  5. 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

  6. Choose Workflow.

    Enter the workflow ID as NO_WORKFLOW.

  7. In the object hierarchy area, double-click your process (the top level node in the hierarchy). Select Permit Parallel Runs.

    Recommendation 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.

    End of the recommendation.
  8. 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.

  9. Save your entries.

Testing the Process

To test your process so far, complete the following steps:

  1. In the object hierarchy area, double-click the root node of your process.

    The Process menu option appears on the toolbar.

  2. Choose Start of the navigation path Process Next navigation step Test End of the navigation path.

    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.

  3. Use Transaction PP01, in display mode, to check that the process has created the new position under your chosen organizational unit.

Creating and Defining the Form

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:

  1. In the hierarchy, choose Start of the navigation path Form Scenarios Next navigation step <Form Scenario Name> Next navigation step Form End of the navigation path.

  2. Create a new form.

  3. Add the ISR Form-Wide Scripts Control Element.

  4. Add the fields to your form, as detailed in the following table:

    Field Name (Data View tab)

    Label

    ISR Control Element

    LO_O_ID

    Org. Unit ID

    ISR Text Display

    LO_O_ABBR

    Org. Unit Abbrev

    ISR Text Display

    LO_O_TXT

    Org. Unit Text

    ISR Text Display

    SO_S_ABBR

    Position Abbrev

    ISR Text Display

    SO_S_TXT

    Position Text

    ISR Text Display

    SO_S_ID

    Position ID

    ISR Text Display

    <BLANK>

    <BLANK>

    Hidden Bound Text Field

  5. Add an Effective Date field.

  6. Add a Refresh Data push-button. Edit the scripting behind it to USER_EVENT_INITIALIZE.

  7. Bind the form fields to the form scenario.

  8. Save and activate the form.

Testing the Process (with 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:

  1. Open the Portal and choose the HR Administrator role.

  2. Choose Start Organizational Process.

    A roadmap for Start Processes appears in a new window.

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

  4. Select your located organizational unit in the table.

  5. Choose Select Process and select your process in the table.

  6. Choose Edit. The system displays your form.

    Check: Does the form display the values for the Abbreviation and Text fields for the organizational unit?

  7. Enter new data for Abbreviation and Text for the position.

  8. Choose Check and Send.

    Review the data you have entered, and make changes if necessary.

  9. Choose Send and close the process window.

  10. Check: Use transaction PP01, in display mode, to check that your process creates a new position for your chosen organizational unit.

Creating and Defining the Workflow Template

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

End of the note.

The following is an outline of the steps you complete:

  1. In the object hierarchy area, choose Create Workflow Template. The Workflow Builder is started.

  2. Choose Basic Data and enter the required information.

  3. Retrieve the Tasks Groups for HCM Processes and Forms folder.

  4. Display the Workflow Container menu bar and create the Container Element for the Process Object.

  5. Define the trigger event for the workflow.

  6. Define the programming exit at the workflow template level.

  7. Activate the start-event.

  8. In the workflow template, define the workflow step using the task Process PD Form.

  9. 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).

  10. Display the Workflow Container menu bar and double-click the container element Form. On the Initial Value tab, enter the form scenario details.

  11. Save and activate the workflow template.

  12. 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.

Testing the Process (with Form and Workflow Template)

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.

Result

You have created a two-step process containing a form and a workflow template. You have tested the process for possible errors.