Start of Content Area

Function documentation Settings for Back-End Service SAP_PA  Locate the document in its SAP Library structure

Use

You use this function to configure the SAP_PA back-end service for your form scenario. The SAP_PA back-end service enables Personnel Administration infotypes to be created, changed, and deleted in a form scenario.

Features

      Operations based on InfoObjects

The SAP_PA service is based on InfoObjects. The infotypes can be restricted by specifying a subtype and an object identification. An InfoObject can be represented as follows: [infty, subty, objps].

Example

The following table contains some examples of InfoObjects:

InfoObject

Name

[0002, space, space]

Personal data

[0006, space, space]

Any address

[0006, 1, space]

Main address

[0021, 1, space]

Spouse

[0279, N001, 01]

Individual values for product 01 (= "Retirement Scheme") of the pension fund N001

You can use InfoObjects to establish the relationship between form fields and infotype fields. Each InfoObject can be assigned an operation that is used on this InfoObject at the runtime of the form scenario.

The SAP_PA service supports the following operations:

       Create

       Change

       Change without delimiting

       Delete

The effect of the operation depends on the time constraint of the InfoObject. The following three time constraints are used:

       Time constraint 1: Exactly one data record exists at each time.

       Time constraint 2: Exactly one or no data record exists at each time.

       Time constraint 3: Any number of data records exists at each time.

For example, the Create operation always creates a new data record for an InfoObject with time constraint 3, without modifying the existing records. However, an existing data record is first delimited for an InfoObject with time constraint 1 or 2.

You can only ever enter one operation for an InfoObject. It is not possible to execute multiple operations on the same InfoObject (for example, create and delete).

      Assigning form fields to InfoObjects, using screen structures

Screen structures enable access from form fields to the InfoObjects. At least one screen structure exists for each infotype. There is usually more than one screen structure, particularly if the infotype is country-specific. In this case, there is a separate screen structure for each country version. Each screen structure contains all infotype fields that are relevant for the user interface. These can be input fields or output fields (for example, for related texts or calculated fields).

When assigning the form fields to InfoObjects, you have to choose one of the possible country-specific screen structures of the infotype. This means that the entire form scenario is created for a particular country version.

If do not use country-specific screen structures, only international ones, you define the entire form scenario as an international form scenario without any country-specific features.

Because each InfoObject in a form scenario can be defined only once, you have to choose one screen structure for each InfoObject. You are not permitted to use the international screen structure and a country-specific screen structure simultaneously for the same InfoObject.

The input help displays the available screen structures for you to select. You cannot use country versions and infotypes that do not have a screen structure. The majority of infotypes and country versions provided by SAP have corresponding screen structures.

If you want to use customer infotypes, they must also have screen structures, meaning that you must have completely decoupled the Business Logic and UI of the infotypes. When you create new infotypes, create them using the new principle.

SAP provides you with a tool that supports you when decoupling infotypes. The tool is in Customizing for Personnel Administration under Customizing Procedures Infotypes Infotypes in the Decoupled Infotype Framework.

Note

Two types of screen structures are differentiated: type MAIN and type LINE. You usually use screen structures of the MAIN type. You require LINE screen structures if you want to process repeat fields in the form scenario.

For more information, see:

Developing an Infotype in Personnel Administration

Business Logic Guidelines for Creating and Migrating Infotypes

UI Programming Guidelines for Infotypes

       Displaying and editing infotype texts in the form

To display and edit infotype texts in the form, use the screen structure HCMT_BSP_PA_TEXT, and bind the form field to the TEXT field of this screen structure. Make sure when creating the form that you use a control element that permits the display of texts of more than one line.

For more information, see Editing the Form Layout.

Caution

All screen structures contain the technical field OBJECT_KEY. This field is used for internally processing the data records. Never use the OBJECT_KEY field in your form scenario.

      Using default values for form fields

You can fill form fields with default values from the SAP_PA service.

The following default value types are available:

       Value for Effective Date

You should use this type if the form field is an input field and you want the value that "currently" exists on the database to be entered in the field as a default. The user can then retain the value or overwrite it. You have usually linked the form field to an InfoObject for which you have set the Change operation or Change Without Delimiting, and assume that data exists on the database that the user changes when editing the form. The mandatory field Effective Date (EFFECTIVE_DATE) determines the date on which the change in data becomes effective. The existing value for this date is determined as a default value. If there is no data record on the database for the effective date, no default value is determined for the form field.

       Value for Day Before Effective Date

You should use this type if the form field is a display-only field that displays the previously existing value on the database. You will usually have defined another form field as an input field for users to enter the newly changed value. For example, in a process to change an employee's organizational data (including the position), there may be a display field that displays the old position and an additional input field for entering the new position. The change is to take place as of the effective date. In this case, you would choose the Value for Day Before Effective Date type for the display field. For the field in which the new position is input, you would choose the Value for Effective Date type. This means that the existing position as at the effective date is specified in the field as the default value for the new position. In the case of both types, if there is no data record on the database on the day previous to the effective date (= EFFECTIVE_DATE - 1), no default value is determined for the form field.

       Default Value of Business Logic

You should use this type if the form field is assigned to an InfoObject for which you have set the Change operation. In this case, there is usually no data record on the database that could be used as a default value. If you use the Default Value of Business Logic type, the initial computation logic of the infotype is called and determines default values for the creation of a new data record. If the logic cannot determine a default value, no default value is entered in the form field.

      Activating input help for form fields

The SAP_PA service provides input help for certain form fields. To gain an overview of the fields for which input help is available, you can use the tool for testing decoupled infotypes (see the “Activities” section).

      Mandatory form fields

The SAP_PA service has a range of mandatory fields:

Field Name

Name

Data Element

PERNR

Personnel Number

PERNR_D

EFFECTIVE_DATE

Effective Date

ASR_EFFECTIVE_DATE

MASSN

Action

MASSN

MASSG

Reason for Action

MASSG

CENTRAL_PERSON

Central Person

OBJEKTID

 

These fields must exist in each form scenario used by the SAP_PA service with the name exactly as specified and with the data element exactly as specified.

Note

Do not delete these mandatory form fields.

Activities

Under <Form Scenario> <Version> Back-End Services in the object hierarchy area of Design Time, make the following settings:

      Definition of operations based on InfoObjects

Specify the operations that you want to use and determine the sequence in which they are performed.

If you only want to use an InfoObject to supply a form field with an input help or default value, do not enter an operation for the InfoObject. This is the case, for example, if you use the Personal Data infotype (0002) to output the employee's name on the form. You always enter an operation if you want to modify the InfoObject on the database (as a rule).

      Determining the time constraint of an infotype

When defining the InfoObjects, you should always be aware of their time constraints as these affect the operations used. InfoObjects with time constraint 1 and 2 are usually no problem. However, there are restrictions for InfoObjects with time constraint 3.

You determine the time constraint of an infotype in Customizing for Personnel Administration under Customizing Procedures Infotypes Infotypes. Double-click on the infotype to access the infotype properties. The time constraint is defined either for the infotype or the subtype:

       The Time Constraint field contains the time constraint of the infotype. The value "T" means that the time constraint depends on the subtype.

       The Time Constraint Table field contains the name of the table in which the time constraints of the subtype are defined.

If the infotype has subtypes, but you do not restrict to a subtype in the InfoObject, the InfoObject is treated as if it had time constraint 3. You then have to link a form field to the Subtype field of the infotype that contains the required subtype at runtime.

      Determining the available input help

To determine which fields of the SAP_PA service have input help, proceed as follows:

       Go to the PUIT_UI transaction.

       Enter a personnel number.

       Enter an infotype and, if required, a subtype.

       Choose Execute.

An overview of all data records for the personnel number and the chosen infotype appears.

       To display the name of the screen structure, choose Technical Information. The following information about the available input help applies only to the displayed screen structure.

       Choose Edit Create Data Record.

       In the dialog box that appears, enter any values or leave the fields blank.

       Choose Continue.

A dialog box appears that displays all fields of the screen structure. The Input Help column displays whether input help is available for the field. In Customizing for the SAP_PA service, you can only activate the input help for fields that have input help.

      If you do not want the value of the form field to be included in the operation, set the Exclude from Operation indicator (OpAusschl).

Note

If you want an operation to be executed only in particular circumstances, you assign a rule to it. You must have previously defined the rule in the form scenario. You must have assigned all form fields that you use in the rule to the SAP_PA service. The assigned operation is executed only if the rule - based on the values of the form fields used - has the value "true."

You are not permitted to use repeat fields (see below) in a rule, since they can contain multiple values, whereas a rule can only ever be defined on one field value.

      You enter the record index. You usually enter the value 1. The following exceptions apply:

       If you have set the Create operation for the InfoObject and the InfoObject has time constraint 3, it is possible to create more than one new data record.

       If you only want to create one new data record, use the value 1.

       If you want to create two data records, use the value 1 for the fields to be included in the first data record, and 2 for the fields that are to be included in the second data record. You cannot start with the value 2 or higher.

       If you want to create additional data records, raise the value of the data index by one for each new record.

       If you have set the Delete operation for the InfoObject and the InfoObject has time constraint 3, it is possible to delete more than one data record. Use the value * (asterisk) as the data index for this purpose. The asterisk means that all data records in the relevant time interval are deleted.

 

End of Content Area