Ansicht
Dokumentation

PT_BLP_USER - BAdI: Enhance Business Logic for Time Data

PT_BLP_USER - BAdI: Enhance Business Logic for Time Data

CPI1466 during Backup   PERFORM Short Reference  
This documentation is copyright by SAP AG.
SAP E-Book

You can use this Business Add-In (BAdI) to influence how time data is processed by the HR_BLP_MAINTAIN_TIMEDATA function module (Valuate Time Data). HR_BLP_MAINTAIN_TIMEDATA is used by various programs to read time data, valuate it, and store it in the Time Management infotypes. It is used in the Business Logic Processor of the Time Manager's Workplace (TMW).

The function module processes the data records of various personnel numbers sequentially. In the text below, references to dependencies between data records always represent data records of the same personnel number.

Examples for the implementation of the BAdI are available as standard implementations. For more information, see the Standard settings section.

If you create your own implementations of the BAdI, you must take account of the following aspects, otherwise there may be data inconsistencies or malfunctions in the program flow:

The time data that the system processes in the program flow is transferred to you using the IF_EX_PT_BLP_USER interface with ABAP object references of type REF TO IF_PT_TD_CONTROL.

The actual data object is hidden behind the DATA attribute of the IF_PT_TD_CONTROL interface. The DATA attribute always represents a reference to the IF_PT_TD_BASE interface (Basis Interface for Time Data).

You can reach the actual data objects by using a corresponding type casting on one of the interfaces listed below:

  • General infotype: IF_PT_TD_INFOTYPE
  • Infotype (not implemented): IF_PT_TD_ITnnnn, where nnnn represents the four-figure number of the infotype.
  • Infotypes 2001 to 2011: IF_PT_TD_IT20nn, where nn represents the last two figures of the four-figure infotype number.
  • Infotype 0416: IF_PT_TD_IT0416
  • Personal calendar entry: IF_PT_TD_CALE
  • Quota/leave deduction: IF_PT_TD_DEDUCTION
  • Time pair data from cluster tables B1 and B2: IF_PT_TD_TIMPAIR
  • Results of time evaluation: IF_PT_TD_TIMRES
  • Personal work schedule: IF_PT_TD_PWS
  • Time evaluation messages: IF_PT_TD_WLIST

You can find out the category and type of a data object from the instance attributes IF_PT_TD_BASE~CATEGORY and IF_PT_TD_BASE~TYPE.

Not all of the data types above are modifiable. The Business Logic Processor differentiates between buffer objects and runtime objects. You can change the buffer objects if they are listed in one of the non-generic interfaces from the above list, that is, any of the them except the IF_PT_TD_ITnnnn interfaces.

The system forms the runtime objects during the program flow for reading. This affects all objects in the above list that implement the IF_PT_TD_TIMRES and IF_PT_TD_PWS interfaces. They are not administered by the database buffer and therefore cannot be saved.

You cannot change the content of these objects. The following rule applies: A data object is not modifiable if the IF_PT_TD_BASE~READ_ONLY attribute has the value CL_PT_TMW_CONST=TRUE.

In processing time data using the HR_BLP_MAINTAIN_TIMEDATA function module, several defined time points exist, which each represent a particular processing state of a data record:

  • PPR: Define standard values in data records. Data records are still unchanged when they reach this point.
  • DEP: Form dependencies between data records
  • ENR: Supplement data records. This point is not part of the process in the standard system.
  • SRP: Check and valuate data records
  • RET: Retro accounting reconition in Payroll Status infotype(0003)
  • SAV: Data records saved; rollback possible
  • PSV: Data records saved; rollback not possible

You can create a separate implementation of the BAdI for each of these time points to influence the processing of the data records when they have attained the desired processing status. The time points that are especially suited to customer implementations are PPR, SRP, and DEP.

The following implementations exist in the standard system:

  • PT_BLP_SAMPLE_PPR (Select Particular Time Management Infotypes)
  • PT_BLP_SAMPLE_DEP (Read Other Absence Data for the Absences Infotype (2001))
  • PT_BLP_SAMPLE_ENR (Overtime Start Time Equal to End Time of Daily Work Schedule
  • PT_BLP_SAMPLE_SRP (Illnesses: Applicable Days; Substitutions; Different Payment
  • PT_BLP_SAMPLE_PSV (Output Customer-Specific Message After Saving)

For more information, see the documentation of the IF_EX_PT_BLP_USER interface.

In your implementations for the individual time points, create separate methods for processing the various data types that are called (dynamically) by the PROCESS_DATA initial method according to the data type. This means that you have separate control over activities for the individual data types in relation to their operations and processing states.






Addresses (Business Address Services)   General Data in Customer Master  
This documentation is copyright by SAP AG.

Length: 6628 Date: 20240523 Time: 200151     sap01-206 ( 89 ms )