Show TOC

Procedure documentationCreating an OM Process (Exercise 1)

 

In this lesson, you create a two-step Organizational Management (OM) process, which allows to you to complete the following activities:

  • Change the Abbreviation and Text fields of an organizational unit.

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 type and operation of the leading object.

  3. Define the form scenario fields and operations.

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

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

  6. Create and define the form.

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

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

  9. 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 ZH01 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: ZH01

    • Name: Change Organizational Unit Name

    • ISR: ZH01

    • Form: ZH01

    • 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. Inside this view is 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. Note that we choose the Change operation for this object type, as we want to change the values in the Abbreviation and Text fields of the organizational unit.

  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.

    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

    Change

  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 folder:

    • LEAD_OBJECT_ID

    Note that the system uses the object ID field name that you entered in the table above for the folder names.

  3. 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 this table. This behavior is special to fields of infotype 1000. To add more fields in this folder, choose the Service Fields button.

    You define these fields later in this process.

Defining Form Scenario Fields and Operations

In this form scenario, we require two further form scenario fields in which to enter the new values for Abbreviation and Text of the organizational unit (those fields you created previously will display the current values for Abbreviation and Text).

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.
  1. In the object hierarchy, choose Start of the navigation path PD Objects Next navigation step LEAD_OBJECT_ID Next navigation step Fields End of the navigation path.

  2. Choose Service Fields.

    The Transfer Service Fields dialog box appears. Enter the following data:

    • Object ID Field Name: Lead_Object_ID

    • Infotype: 1000

    • Screen Structure: P1000

  3. Choose Enter.

  4. Choose Determine Fields to display the available list of fields for the chosen object type.

    Transfer the fields in the following table to your form scenario, making the following changes to Field Name and Default Value:

    Field Name

    Service Field

    Name

    Default Value

    LO_O_ABBR_NEW

    SHORT

    Object Abbreviation

    Value for Effective Date

    LO_O_TXT_NEW

    STEXT

    Object Name

    Value for Effective Date

  5. Save your entries.

  6. Ensure that the current (“old”) fields for the organizational unit (on your form) cannot be changed during runtime.

    To do this, remain in the Fields view of LEAD_OBJECT_ID and change the object settings as shown in the following table:

    Object

    Field Attribute

    Default Value

    Op. Exclusion

    LO_O_ABBR

    Output Only

    Day Before Effective Date

    Select

    LO_O_TXT

    Output Only

    Day Before Effective Date

    Select

  7. Set the Effective Date field to Required Entry.

    In the object hierarchy area, choose Fields. Effective Date is one of the mandatory fields which the system added automatically. Choose Required Entry as the Field Attribute for Effective Date.

  8. Choose Start of the navigation path LEADING_OBJECT_ID Next navigation step Infotypes and Operations End of the navigation path.

    Only one operation (Change) is shown here; it is the operation to be performed on the organizational unit.

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 ZH01 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: Change Organizational Unit Name

    • Form Scenario: ZIH01

  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: ZHO1 (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 which you wish to change.

    The process is started and the data is displayed in tabular form. Enter the ID of the organizational unit you wish to change and step through the process until it is completed.

  3. Use Transaction PP01, in display mode, to check that the process has changed the data of your 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_ABBR_NEW

    Org. Unit Abbrev New

    ISR Text Edit

    LO_O_TXT_NEW

    Org. Unit Text New

    ISR Text Edit

    LO_O_ID

    Org. Unit ID

    ISR Text Display

    LO_O_ABBR

    Org. Unit Abbrev Old

    ISR Text Display

    LO_O_TXT

    Org. Unit Text Old

    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 whose Abbreviation and Text fields you wish to change.

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

  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 changes the values for the Abbreviation and Text fields 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 changed the Text and Attribute values of your 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.