Hr Training

116
H H 3 3 50 50 R R Programming in HR

description

Hr Training

Transcript of Hr Training

Page 1: Hr Training

HH 335050RR

Programming in HR

Page 2: Hr Training

SAP AG 1999

Course Goals

This course will prepare you to:

Program your own HR reports using logical databases and HR-specific statements

Page 3: Hr Training

SAP AG 1999

Course Objectives

At the conclusion of this course, you will be able to:

Use the logical databases in HR andalso Join and Projection views

Use HR-specific statements

Evaluate time data and repetitive structures

Import and process payroll results

Page 4: Hr Training

Functional Areas in SAP HR

• Personnel Management (PA)• Recruitment (PA-RC)• Personnel Administration (PA-PA) • Personnel Development • Organizational Management • Benefits (PA-BN) • Compensation Management (PA-CM)  • Travel Management (FI-TV) 

Page 5: Hr Training

Functional Areas in SAP HR 2

• Personnel Time Management (PT) • Work Schedule (PT-WS) • Shift Planning (PT-SP) • Time Data Recording and

Administration • Time Evaluation Incentive Wages

Page 6: Hr Training

Functional Areas in SAP HR 3

• Payroll (PY)  • Payroll Other Countries (PY-XX)• Payroll Basics (PY-XX-BS)• The Payroll Process Payroll in a

Background Operation • Off-Cycle Activities (PY-XX-OC)• Gross Part of Payroll  • Net Part of Payroll  • Deductions • Subsequent Activities

Page 7: Hr Training

Functional Areas in SAP HR 4

• Training and Event Management (PE)  • HR Tools (PY-XX-TL)  • Schemas• Rules • Functions and Operations • Features Editor • Developing an Infotype • HR Form Editor • PT Form Editor • Documentation Maintenance

Page 8: Hr Training

Content

1) Overview of HR2) ABAP Programming v/s HR

Programming. 3) Logical Database PNP.4) Views – Join and PROJECTION.5) Specific Commands.6) Authorization Check.

Page 9: Hr Training

6) Time Data.7) Repetitive Structure and List Display.8) Exporting/Importing DB Tables in HR.9) HR ABAP Features.10)Logical Database PCH.11)Logical Database PAP.

Content

Page 10: Hr Training

Overview Of HR

• What is HR • Why HR is different from other modules? • Data handling in HR (Using of Infotypes) • What is Infotype? • Why Infotype • What is logical database?• How are logical database used

Page 11: Hr Training

What is HR ?

• The task of Human Resource Management is to produce the organizational hierarchies, relationship between employees and to allow storage and administration of employee data.

Page 12: Hr Training

• Organization:• We can define an organization as an individual

enterprise (company or industry) in which someone is leading it and with some departments like HR, Marketing, Finance, and R&D etc.

• For any organization employees are the most Powerful resource. So to maintain the employee related data we require one system, which ensures accuracy and consistent within the organization.

Page 13: Hr Training

Why HR is different from other modules?

• The following concepts are defined in HR, which differs this module with other modules

• 1. Use of Infotypes• 2. The use of Logical Database• 3. Use of Macros• 4. Storage and Access of data• 5. Authorization checks

Page 14: Hr Training

Data handling in HR (Using of Infotypes):

• Master data in HR is stored in infotypes.• Each infotype pertains to a specific type of data.• Each infotype has a database table associated with

it.

• Example: For Infotype 0000, the corresponding

Database table associated with it is PA0000.

Page 15: Hr Training

What is Infotype?

• The information units used to enter the data of an employee are called infotypes.

• The infotypes are used to group related data fields together.

• E.g.. IT0006.(address)

Page 16: Hr Training

Why Infotype

• As HR is related to time, we require old data as well as new data. The data we enter into the infotypes are automatically checked for accuracy and against the table entries.

• In simple, HR data is huge and to access data easily we require infotype.

Page 17: Hr Training

What is logical database?

• The LDB is special type of ABAP program that combines the contents of certain related database tables and retrieves some related data and make it available to application programs.

•  • In other words, a LDB is a method by which

ABAP programs read and process the data. The sequence in which the data is supplied to the program is determined by a tree structure.

Page 18: Hr Training

The LDB usually consists of the following components.

• Structure• Selections

Database programs

Logical databases have a tree structure.• A logical database can contain a maximum of

300 tables SAPDBPNP is the name of the database program for the logical database PNP.

Page 19: Hr Training

How are logical database used

• 1 Logical databases when generating an ABAP program

• The selection screen generated contains the selections (SELECT-OPTIONS AND PARAMETERS) of both the logical database and the program.

•    The only database-specific selections displayed on the selection screen are those needed by the program for data retrieval purposes

Page 20: Hr Training

• 2. Logical databases at run-time of an ABAP program

At run-time, the system processes the events in the program

and in the logical database in the following order:

Before displaying the selection screen, certain initializations

(e.g. calculating default values such as key date, etc.) are

performed for the selection screen by the logical database and

the program.

o The selection screen is displayed and the user enters data in the input fields

Page 21: Hr Training

The logical database and the program check that the input iscorrect and complete , but also that the user has the appropriateauthorizations. If an error occurs, some fields are made readyfor input again, so that the user can make the necessary correction(s).o In the event START-OF-SELECTION, the ABAP program

performs any preliminary work (for ex, importing files).

o The logical database reads the selected data and the program processes it within the GET events according to the sequence specified by the structure. 

o In the event END-OF-SELECTION, the ABAP program performs any concluding operations (for example, calculating totals, exporting files).

Page 22: Hr Training

• 3 . Designing the selection screens • o The standard selection screen of a logical database has a

standard layout where SELECT-OPTIONS and PARAMETERS appear in the sequence they are declared, each on a new line. The system automatically generates such a screen for each program that does not have its own selection screen entered in the attributes.

• You can define your own selection screens for any logical database. If the attributes of a program include the number of its own selection screen, the system uses this screen as a model when generating. Any program-specific selections appear after the database selections. The flow logic for such screens is also generated automatically and therefore cannot be modified. You cannot delete database selections

Page 23: Hr Training

Functions of LDB:

• Data retrieval: The personnel data of each employee is loaded into the main memory where it can be accessed for processing.

• Screening: Employees can be selected according to the organizational criteria entered on the selection screen.

E.g...Hourly wage earners in a particular personnel sub area.

There are two types of screening..Person selection and data selection period.

Page 24: Hr Training

Functions of LDB:2

• Person selection :defines those employees for whom a report is to be run.

• E.g..Monthly wage earners in a specific personnel sub-area. 

• E.g..Personnel number range • E.g..Features of org.Assignment...Employees

who assigned to certain cost center. • E.g..Employee status..Active or inactive.

Page 25: Hr Training

Functions of LDB:3

• The data selection : period delimits the time period for which data is evaluated. When you enter the data selection period,the provide loop retrieves the infotype records whose validity period overlaps with at least one day of this period.

•  Authorization check : This ensures that the person starting the evaluation Is authorized to access the report data.

Page 26: Hr Training

REPORT CLASS WITH LDB :

• You can change the layout of the selection screen by assigning classes to reports of the logical database PNP.This allows you to suppress the input fields which are not used.

• All reports without a report class are assigned the customer default report class '00000000'. Otherwise the sap default report class ' ' is assigned.

Page 27: Hr Training

REPORT CLASS WITH LDB :

• Report class assignments are stored in table t599b or t599w. 

• Table t599b contains customer report classes and t599w the sap report classes.  

• If a report has no report class,either the customer default class(t599c) or the SAP default class(t599f) is used. 

• All reports that use the logical database PNP automatically contains DBPNPCOM module. 

• You can also read the records of an infotype for a particular personnel number without using the logical database,through RP-READ-INFOTYPE.

Page 28: Hr Training

GET PERNR :

• This event fills the data structures of declared infotypes with all records that exists for a personnel number.

•  Data selection does not delimit the records that retrieved from the database. 

• Whenever GET PERNR statement is included in your program check the following two . 

• 1.Have you included PNP for the logical database screen field in the program attributes. 

• 2.Have you included PERNR structure in the tables declaration.

Page 29: Hr Training

• Macros : Macro contains some part of source code which it will be useful for number of applications

• The macro RP-PROVIDE-FROM-LAST retrieves the last(latest) data record which is valid in the data selection period. TRMAC Table has Macros.

• Subtypes : The sub-division of infotype records are subtypes.Each subtype representing an infotype category with its own time character. 

• Infotype 0006 is for addresses.This addresses are sub-divided in the IT0006 as permanent residence,secondary residence and home address.

Page 30: Hr Training

• Cluster : set of data objects. • Elementary fields , field strings and

internal tables etc. will come under data objects. 

• You can store data clusters in ABAP/4 memory for short time and in database for longer time.

• e.g. cluster database tables PCL1, PCL2, PCL3 and PCL4.

Page 31: Hr Training

1) ABAP Programming v/s HR Programming

Page 32: Hr Training

Storage and accessing of data.

Use of the logical Database extensively. Use of Macros.

Use of Info types to enter and store data.

Use of Authorization Checks.

ABAP Programming v/s HR Programming

Page 33: Hr Training

The INFOTYPE

An Info type is just another way to handle/store data.

HR Data is huge and to enable easy data entry the concept of an Info type took birth.

Page 34: Hr Training

The existence of an Infotype implies that an internal table (system defined) and a database table of same structure exist!.

Infotype 0001 (Org. Assignment). Infotype 0002 (Personal Data). Infotype 0003 (Payroll Status).HR Time Record: Infotype 2010. (Employee

Remuneration Info.).

The INFOTYPE

Page 35: Hr Training

2) Logical Database PNP

Page 36: Hr Training

Logical Structure and DB Tables in PA

Logical StructuresPnnnn: Key fields and Data fields.Psnnnn.Qnnnn : Special Screen fields.

Database TablesPAnnnn : Data Records PA.PBnnnn: Data Records PB.PCLn: Data Clusters E.g. Time Management,

Travel Management, Payroll.

Page 37: Hr Training

Structure for screen fields

Fields for every Infotype (Header lines) are stored in RP50M.

Additional Screen fields are stored in Qnnnn structure.

An employees form of Address is stored in P0002-ANRED with a numeric key.

Additional field Q0002-ANREX is provided to store the displayed and entered fields not its numeric key.

Page 38: Hr Training

Data Retrieval

When you run your report, the logical database loads the personnel data for each employee into the main memory and makes it available for processing.

The entire history of each info type is loaded into the main memory, that is all info type records from the lowest to highest system date.

Page 39: Hr Training

Structure PERNR contains standard selections for HR Master data reporting.

The data of the previous personnel number is deleted when you select another personnel number.

Data Retrieval

Page 40: Hr Training

Authorization Checks

The logical database executes an authorization check for personnel data.

It checks whether the master record of the user who starts the report contains the authorizations for the data that is to be read in the report.

A distinction is made between a personnel and a data authorization.

Page 41: Hr Training

The system first checks whether the user has an authorization for the employee in accordance with the criteria of organizational assignment. Employees for which the user has no authorization are not evaluated.

The system then checks whether the user is authorized to process the info types of the specified report. A list would be meaningless if the data were not evaluated completely.

Authorization Checks

Page 42: Hr Training

Screening Criteria

Two types:

Person Selection.

Data Selection.

Page 43: Hr Training

Person Selection: Specifies those employees for whom the report is to be run.

Selected by Personnel Number Range, Org Assignment, Status, etc.

Selected Employees are processed in ascending order according to personnel number.

Screening Criteria

Page 44: Hr Training

In the data selection field, you can define the period for which info type data is to be evaluated.

Although the entire info type history is loaded into the main memory during data retrieval, the system processes only those info type records which either partly or completely are within the data selection period.

Screening Criteria

Page 45: Hr Training

Report Class

Since the required selection criteria depend on the report, you must define the scope of the selection screen.

You can do this by assigning the report to a report class.

Page 46: Hr Training

Assigning a report class can help in changing the LDB selection screen.

In Program Attributes Screen we use ‘EDIT-HR Report Class’ while using the PNP database.

Report Class

Page 47: Hr Training

Report Class assignments are stored in tables T500B (Customer Class) and T599W(SAP Classes).

If no report Class is assigned to a report, default report classes are used from T599C(Customer) and T599F(SAP Default Class).

Report Class

Page 48: Hr Training

E.g.The time evaluation report RPTIME00 is assigned the report class __0001.

The personnel number and Matchcode function key are the only permissible selection criteria in this report class.

Report Class

Page 49: Hr Training

The report RPDEDTx0 (editing of payroll results;x is the country grouping) is assigned the report class X_M00002.

The active selection criteria of this report are period defined/payroll area, personnel number and payroll area.

Report Class

Page 50: Hr Training

The GET PERNR Event

This event fills the data structures of declared infotypes with all the records that exist for a particular personnel number .

The “check select-options” command.

Page 51: Hr Training

Processing the Infotype structures

Infotype structures are internal tables that are processed using a PROVIDE-ENDPROVIDE loop.

Page 52: Hr Training

Flow control for LDB

IMG enables you to determine the type of data selection for your own reports.

Options available for online and Batch Processing.

Opt 1: Selection fields of LDB forwarded directly to the database.

Opt 2: Array fetch Active.Opt 3: A combination of opt1 and opt2.

Page 53: Hr Training

Flow control for LDB

Page 54: Hr Training

Example of an HR report

REPORT ZTEST_HR1.TABLES: PERNR.INFOTYPES: 0001.GET PERNR.PROVIDE * FROM P0001 BETWEEN PNPBEGDA AND PNPENDDA. WRITE: / P0001-PERNR, P0001-ENAME,

P0001-BEGDA, P0001-ENDDA.

ENDPROVIDE.

Page 55: Hr Training

3) Views – Join and PROJECTION

Page 56: Hr Training

JOIN

Personal Data:JAN 1960 – MAY 1993 ABCDMAY 1993 – DEC 1993 EFGH

Address DataJAN 1993 – DEC 1993 BOMBAY

Result of JoinJAN 1960 – DEC 1992 ABCDJAN 1993 – APR 1993 ABCD/BombMAY 1993 – DEC 1993 EFGH/Bomb

Page 57: Hr Training

Join and Time Constraint

Time Constraint of an Infotype have an effect on JOIN.

SE38: Utilities Help On.

Table T591A.

JOINS are only possible for info types with time constraint 1 or 2.

Page 58: Hr Training

PROVIDE * FROM P0002 FROM P0006 FROM PNNNN BETWEEN PN/BEGDA & PN/ENDDA.--------------------------ENDPROVIDE.

JOIN

Page 59: Hr Training

Each Infotype can be processed individually or several infotypes can be processed simultaneously.

Join takes into account the validity period of the data.

JOIN

Page 60: Hr Training

Personnel data is valid only for a particular time period.

JOIN represents one or more validity periods during which that data of both the infotypes is valid.

JOIN

Page 61: Hr Training

Any number of infotypes can be combined in a JOIN.

Data to be JOINED must be UNIQUE for the validity period i.e. the time periods of the Infotype records should not overlap. To further obviate this problem the Infotype must be read using a sub-type.

JOIN

Page 62: Hr Training

REPORT ZTEST_HR2.TABLES: PERNR.INFOTYPES: 0001, 0006.GET PERNR.PROVIDE * FROM P0001

* FROM P0006 BETWEEN PN/BEGDA AND PN/ENDDA

WHERE P0006-SUBTY eq ’1’.

JOIN

Page 63: Hr Training

WRITE: / PERNR-PERNR, P0001-STELL,

P0006-STRAS, P0006-BE GDA,P0006-ENDDA.

ENDPROVIDE.

JOIN

Page 64: Hr Training

Sometimes no data is available for a particular Info type in the selected partial period.

Infotype validity periods may not overlap but gaps are permitted.

For example, gaps can occur when personal data is joined with address data:

JOIN

Page 65: Hr Training

REPORT ZTEST_HR3.TABLES: PERNR.INFOTYPES: 0002,0006GET PERNR.PROVIDE * FROM P0002* FROM P0006 BETWEEN PN/BEGDA AND

PN/ENDDAWHERE P0006-SUBTY = ’1’.

Variable Pnnnn_Valid

Page 66: Hr Training

IF P0006_VALID EQ ’X’.

WRITE: / PERNR-PERNR,

P0002-BEGDA DD/MM/YYYY,

P0002-ENDDA DD/MM/YYYY,

P0002-NACHN, P0006-ORT01.

ENDIF.

ENDPROVIDE.

Variable Pnnnn_Valid

Page 67: Hr Training

PROJECTION

Selecting one or more infotype fields for processing is called Projection.

The process of combining data records during projection is called contraction.

Projection is only allowed for time constraints 1 and 2.

Page 68: Hr Training

PROJECTION

REPORT ZTEST_HR.TABLES: PERNR.INFOTYPES: 0001, 0006.

GET PERNR.PROVIDE STELL FROM P0001

BETWEEN PNPBEGDA AND PNPENDDA.ENDPROVIDE.

Page 69: Hr Training

4) SPECIFIC COMMANDS

Page 70: Hr Training

Like Subroutines and Function modules Macros can be used to modularize codes.

They are in TRMAC Table.The first two letters are the application and

the rest are freely assigned.

RMAC - MACROS

Page 71: Hr Training

To access only the first or last records.

RP-PROVIDE-FROM-LAST PNNN SPACE BEGDA ENDDA.

RP-PROVIDE-FROM-FIRST PNNN SPACE BEGDA ENDDA.

Parameters: Info type, Sub type, Begin date and End date.

Processing A Specific Infotype Record

Page 72: Hr Training

Macros are defined in program SAPDBPNP ( Include DBPNPMAC() using the DEFINE Keyword.

They are only available for programs that use LDB PNP.

Processing A Specific Infotype Record

Page 73: Hr Training

Reading the Personnel Area/Subarea Table

It is often necessary to read the groupings stored in Personnel Area/ Subarea because they are required as keys for other tables.

RP-READ-T001P P0001 P0001-WERKS P0001-BTRTL SPACE.

SPACE = SY-SUBRC is set to 4.

Page 74: Hr Training

Changing Infotypes

RP-UPDATE macro update the database.

RP-UPDATE OLD NEW.

Parameters: Old Internal Table, New Internal Table.

This macro calls the update routine of HR file.

Page 75: Hr Training

Changing Infotypes

You can’t make key changes, which means you can’t create or delete data.

In customer specific info types it may be useful to create utilities to change HR data directly in Database tables.

To ensure the consistency of the table entries database changes should always made with batch reports which automatically execute online data checks.

Page 76: Hr Training

Three steps involved in changing Info types.

Select the Info type to be changed.

Make the required changes and store the records in an alternative table.

Changing Infotypes

Page 77: Hr Training

REPORT ZTEST_HR.TABLES: PERNR.INFOTYPES: nnnn NAME OLD

nnnn NAME NEW.

GET PERNR.PROVIDE * FROM OLD……..……………………

NEW = OLD.

Changing Infotypes

Page 78: Hr Training

APPEND NEW.

ENDPROVIDE.

RP-UPDATE OLD NEW.

Changing Infotypes

Page 79: Hr Training

Reading IT without LDB

The Function Module HR_READ_INFOTYPE records for a person. Values are returned in an internal table.

Function Module performs an authorization check.

The Return codes have the following values: 0, 4, 8, 12.

Page 80: Hr Training

Reading IT without LDB

REPORT ZTEST_HR6.INFOTYPES: 0002.

CALL FUNCTION ‘HR_READ_INFOTYPEEXPORTING

PERNR =

INFTY =

BEGDA=

ENDDA=

Page 81: Hr Training

Reading IT without LDB

IMPORTING

SUBRC = <RETURN>

TABLES

INFTY_TAB = P0002

EXCEPTIONS

INFTY_NOT_FOUND = 1

OTHERS = 2.

Page 82: Hr Training

5) Authorization Checks

Page 83: Hr Training

Checks if a person starting the report has the required authorizations.

LDB does this check automatically.

HR makes a distinction between two types of authorization , one for person and another for data.

Authorization Checks

Page 84: Hr Training

Authorization for Persons

Checks if a person starting the report has the required authorizations.

Employees for whom the user has no authorization are skipped and then listed at the end of evaluation.

Page 85: Hr Training

Authorization for DATA

Checks if a person have all the authorizations required for all of the info types used in the evaluation.

If the user has no authorization for a particular Info type, the evaluation is canceled and an error message displayed.

Page 86: Hr Training

Deactivating the Authorization Check

In certain programs it may be useful to deactivate the authorization check in order to improve performance.

For this reason HR Master data object is supplemented by the HR: Reporting authorization object. If the appropriate authorization are available , a simplified and therefore faster checks take place.

Page 87: Hr Training

6) Time Data

Page 88: Hr Training

Time Data

A characteristic of the PROVIDE is that the Validity period of IT records is restricted to the data selection period on the selection screen.

Time data IT 2001 is determined on the basis of the validity period.

The number of Absence days is calculated on the basis of absence period.

Page 89: Hr Training

Time Data

Since the data depends on the validity period , time infotypes leads to incorrect data.

PROVIDE statement is not used for time infotypes ( 2000- 2099).

Page 90: Hr Training

Time Data

A principle of the LDB is that all of the IT records between the lowest to highest system dates are read when GET PERNR event occurs.

Bad performance issues because of memory problem while reading large time data.

Page 91: Hr Training

Time Data

To control this MODE N is assigned while declaring the time Infotypes.

RP_READ_ALL_TIME_ITY.

Page 92: Hr Training

Program 1

INFOTYPES: 2001 MODE N.GET PERNR.    RP-READ-ALL-TIME-ITY PN/BEGDA PN/ENDDA.    LOOP AT P0021.         If P0021-XYZ = ' '. A=B. Endif.     ENDLOOP.

Page 93: Hr Training

Program 2

DATA: BEGIN OF ITAB OCCURS 0,              BUKRS LIKE P0001-BUKRS, "COMPANY              WERKS LIKE P0001-WERKS, "PERSONNEL AREA              AWART LIKE P2001-AWART, "ABS./ATTEND. TYPE              ASWTG LIKE P2001-ASWTG, "ABS./ATTEND. DAYS           END OF ITAB.GET PERNR.RP-PROVIDE-FROM-LAST P0001 SAPCE PN/BEGDA PN/ENDDA.CLEAR ITAB.ITAB-BUKRS = P0001-BURKS. ITAB-WERKS = P0001-WERKS.RP-READ-ALL-TIME-ITY PN/BEGDA PN/ENDDA.LOOP AT P2001.      ITAB-AWART = P2001-AWART. ITAB-ASWTG = P2001-ASWTG.      COLLECT ITAB. (OR: APPEND ITAB.)ENDLOOP.

Page 94: Hr Training

7) Repetitive Structure and List Display

Page 95: Hr Training

Repetitive Structure

On some infotype entry screens like leave data is entered in Tables.

All of the fields in this table structure are named and defined in the Infotype structure on which they are based.

Table datas are stored in a linear structure.

Page 96: Hr Training

Repetitive Structure

In some Infotypes data entered in screen tables is stored as repeat fields groups on the database.

Loop Processing within DO/ENDDO or WHILE/ENDWHILE can be used to transport such data block by block to work area, where it continues to be processed.

Page 97: Hr Training

0005 0008 0041 In the infotype structure, fields are grouped by the same name followed by sequence number.

    P0005-UARnn P0005-UANnn P0005-UBEnn     P0005-UENnn P0005-UABnn

Page 98: Hr Training

Repetitive Structure

DATA: BEGIN OF VACATION,              UAR LIKE P0005-UAR01, "Leave type              UAN LIKE P0005-UAN01, "Leave entitlement              UBE LIKE P0005-UBE01, "Start date              UEN LIKE P0005-UEN01, "End date              UAB LIKE P0005-UAB01, "Leave accounted           END OF VACATION.

GET PERNR.     RP-PROVIDE-FROM-LAST P0005 SPACE PN/BEGDA PN/ENDDA.     DO 6 TIMES VARYING VACATION             FROM P0005-UAR01 "Starting point                 NEXT P0005-UAR02. "Increment             If p0005-xyz then ... endif.       ENDDO.

Page 99: Hr Training

List Display

Function Module HR_DISPLAY_BASIC_LIST.

Used to display single-level lists.

Maximum no. of column is 20.

Page 100: Hr Training

8) Export/Import DB Tables in HR

Page 101: Hr Training

Database Tables in HR.Pannnn (personnel data),PCL1(HR Work Areas),PCL2(Acctg Results & Payroll),PCL3(Applicant, Tracking Record) PCL4(Documents).PCL1 - Database for HR work area PCL2 - Accounting Results (time, travel expense

and payroll)PCL3 - Applicant tracking dataPCL4 - Documents, Payroll year-end Tax data

Export/Import Tables in HR

Page 102: Hr Training

Data Clusters have a two character code.

Each HR subarea has its own cluster and its own key.

Data Clusters

Page 103: Hr Training

B1(Time Events).

G1(Group Incentive Wages).

TX(Infotype Texts).

PC(Personal Calendar).

Database Table PCL1

Page 104: Hr Training

B2(Time accounting results).CD(Cluster Directory).RX(Payroll Accounting

Results/International).Rn(Country Specific Payroll Accounting.

Database Table PCL2

Page 105: Hr Training

Database Table PCL1· The database table PCL1 contains the following data areas:  B1 time events/PDC  G1 group incentive wages   L1 individual incentive wages  PC personal calendar  TE travel expenses/payroll results  TS travel expenses/master data  TX infotype texts  ZI PDC interface -> cost account

Page 106: Hr Training

Database Table PCL2· The database table PCL2 contains the following data areas:   B2 time accounting results  CD cluster directory of the CD manager  PS generated schemas  PT texts for generated schemas  RX payroll accounting results/international  Rn payroll accounting results/country-specific ( n = HR country indicator )  ZL personal work schedule

Database Table PCL3· The database table PCL3 contains the following data areas:  AP action log / time schedule  TY texts for applicant data infotypes

Page 107: Hr Training

EXPORT IMPORT Commands are usedA Unique KEY ID is required to read or

write from/to table.

The field PCLn-RELID stores the basic relation type i.e the cluster (‘RX’ for

payroll accounting, ‘TE’ for Travel Expenses etc).

Table Management

Page 108: Hr Training

Data definitions of a work area are stored in separate programs.

Naming convention for these programs is RPCnxxy0 ( n = 1 or 2, xx = Cluster

Name, y = 0 for international).

The key structure is stored in xx-KEY field string. The first component of this field

string is PERNR.

Cluster Definition

Page 109: Hr Training

Rp-EXP-Cn-xy. And Rp-IMP-Cn-xy.

These are the macros which are used for Exporting/Importing results from the PCLn tables.

Import/Export with Macros

Page 110: Hr Training

REPORT ZHREXPRT.*Buffer definitionINCLUDE RPPPXD00. INCLUDE RPPPXM00. "Buffer managementDATA: BEGIN OF COMMON PART 'BUFFER'.INCLUDE RPPPXD10.DATA: END OF COMMON PART 'BUFFER'.... RP-EXP-Cn-xy.IF SY-SUBRC EQ 0.    PERFORM PREPARE_UPDATE USING 'V'..ENDIF.

Page 111: Hr Training

REPORT RPIMPORT.*Buffer definitionINCLUDE RPPPXD00.DATA: BEGIN OF COMMON PART 'BUFFER'.INCLUDE RPPPXD10.DATA: END OF COMMON PART 'BUFFER'.*import data to bufferRP-IMP-Cn-xy.

Page 112: Hr Training

9) HR ABAP Features

Page 113: Hr Training

HR ABAP Features

Accessing Reports using Dynamic Action.

Table T588Z is a control table that triggers steps taken when an IT record is maintained.

Selection reports for fast entry.

Reports that are used for fast entry are contained in table T588R.

Page 114: Hr Training

HR ABAP Features

Accessing subroutines for specific periods.

Table T596F enables you to access various subroutines for specific periods in order to solve a task defined by a symbolic name.

Page 115: Hr Training

HR ABAP Features

Accessing Feature from Reports.

PERFORM RE549D USING par1 par2 par3 par4.

Par1 – Feature name.

Par2 – Error handling type.

Par3 – Return value.

Par4 – The type of error.

Eg: RPCPBSRC.

Page 116: Hr Training

THANK YOU