Show TOC

 Settings for Back-End Service SAP_PT

Use

You use this function to configure the SAP_PT back-end service for your form scenario. The SAP_PT back-end service enables Time Management infotypes to be created, changed, and deleted.

Features

  • Operations based on InfoObjects

    The SAP_PT 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 Example

    The following table contains some examples of InfoObjects:

    End of the example.

    InfoObject

    Description

    [2001, space, space]

    Any absence

    [2001, 0190, space]

    Educational leave

    [2007, 01, space]

    Approved overtime

    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.

    If you only want to use an InfoObject to supply a form field with a default value, do not enter an operation for the InfoObject. You enter an operation if you want to modify the InfoObject on the database (as a rule).

    The SAP_PT service supports the following operations:

    • Create

      You use this operation when you want to create a new data record.

      If you explicitly link the start and end date (BEGDA and ENDDA) of the InfoObject to form fields, the new data record is created with the same validity. If you do not link the start and end date, the data record is created with the validity of the mandatory fields EFFECTIVE_BEGDA and EFFECTIVE_ENDDA. If EFFECTIVE_BEGDA or EFFECTIVE_ENDDA is initial, the value from EFFECTIVE_DATE is used instead.

    • Change (restricted)

      Recommendation Recommendation

      Restrict your use of this option. For Personnel Administration infotypes (SAP_PA service), this operation should not be used for infotypes with time constraint 3. Time Management infotypes usually also have the nature of time constraint 3; therefore you should not use the operation for them either. You should use the Change operation only if you are certain that the Time Management infotype behaves in a similar manner to time constraint 1 or 2.

      End of the recommendation.
    • Delete

      You use the Delete operation to delete data records. It deletes all data records that are in the interval [EFFECTIVE_BEGDA - EFFECTIVE_ENDDA] or are valid on at least one day in the interval. If EFFECTIVE_BEGDA or EFFECTIVE_ENDDA is initial, the date specified in EFFECTIVE_DATE is used instead. If you want to delete data records in another period, you specify the period explicitly by linking form fields to the start and end date of the InfoObject.

      Note that you always have to link at least one field to the InfoObject for the operation to be executed on the InfoObject. You are advised to link the PERNR field for the Delete operation.

      As a result of the complex time constraint logic of time management infotypes, it can be assumed that more than one data record exists in the specified deletion interval. The Delete operation is therefore usually applied to a set of data records. For this reason, you must enter the value * for the data index when linking the form fields. This indicates that there are multiple data records, as opposed to just one.

      Whereas Personnel Administration infotypes can have a time constraint of 1, 2, or 3, Time Management infotypes have a separate, complex, time constraint logic. The Time Management infotype framework ensures that this is taken into account when creating and changing infotypes. Put simply, the complex time constraint logic is most comparable to time constraint 3. However, there are also situations in which an infotype's behavior is similar to time constraint 2.

  • Defining assignment of form fields to InfoObjects

    If you want to execute the Create or Change operations on the InfoObjects, the data for the new data records to be created has to be made available. This is achieved by assigning form fields to InfoObjects. The InfoObjects are accessed via the Pnnnn infotype structures, where nnnn stands for the four-digit number of the infotype. The input help provides you with the available infotype structures.

  • Using default values for form fields

    You can use the SAP_PT service to fill form fields with default values.

    Recommendation Recommendation

    You should restrict your use of this option. As Time Management infotypes usually have time constraint 3, more than one data record can exist simultaneously in the database for a key date or effective date. It is then unclear from which data record the default value is read. You should only use default values using the service SAP_PT if you are sure that only one data record exists for the point in time in question.

    End of the recommendation.

The default value type Current Value for the Effective Date means that the existing data record for the effective date (EFFECTIVE_DATE) is read and the value it contains is entered as a default value in the form field.

  • Input help for form fields

    The SAP_PT service does not currently support input help. If you require input help, you either have to define it manually in the form scenario or make it available via a generic service.

  • Mandatory fields

    The SAP_PT service has a range of mandatory fields:

    Field Name

    Name

    Personnel Number

    PERNR

    Personnel Number

    PERNR_D

    EFFECTIVE_DATE

    Effective Date

    ASR_EFFECTIVE_DATE

    EFFECTIVE_BEGDA

    Start Date

    ASR_EFFECTIVE_DATE

    EFFECTIVE_ENDDA

    End Date

    ASR_EFFECTIVE_DATE

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

    Caution Caution

    Do not delete these mandatory form fields.

    End of the caution.

Activities

  • You set the default value determination.

  • You decide whether you require input help, and define it manually or provide it via a generic service.

  • You define the operations that are performed on InfoObjects.

    When entering the infotype, use the input help to display a list of the available infotypes. Only the infotypes that are supported by the time management infotype framework (BLP) can be used. It is not possible (and usually not necessary) to develop customer-specific infotypes in this framework.

    Also use the input help to enter the subtypes.

  • If you only want to link a form field to an InfoObject to fill it with a default value, but do not want the value of the form field to be included in the operation, set the Exclude from Operation indicator (OpAusschl).

    Note 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_PT service. The assigned operation is executed only if the rule - based on the values of the form fields used - has the value "true."

    End of the note.
  • 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, it is possible to delete more than one data record. Use the value * (asterisk) as the data index for this purpose. This value means that all data records in the relevant time interval are deleted.