Comparisonbetweenabapabap Hr 130114224906 Phpapp02

download Comparisonbetweenabapabap Hr 130114224906 Phpapp02

of 30

Transcript of Comparisonbetweenabapabap Hr 130114224906 Phpapp02

  • 7/28/2019 Comparisonbetweenabapabap Hr 130114224906 Phpapp02

    1/30

    By Mahender,

    Coke-HP HR Team

    Comparison Between

    ABAP & ABAP-HR

  • 7/28/2019 Comparisonbetweenabapabap Hr 130114224906 Phpapp02

    2/30

    Introduction to

    Human Resources Module

    Basic elements of HR

    Lets recap the ABAP

    Features of ABAP-HRprogramming / SpecialStatements

  • 7/28/2019 Comparisonbetweenabapabap Hr 130114224906 Phpapp02

    3/30

    Human Resources & sub modules

    Personnel Management

    Time Management

    Payroll Benefits

    Organizational Management

    Training & Event Management

    Travel Management

    Information System

  • 7/28/2019 Comparisonbetweenabapabap Hr 130114224906 Phpapp02

    4/30

    Basic Elements of HR

  • 7/28/2019 Comparisonbetweenabapabap Hr 130114224906 Phpapp02

    5/30

    5

    Some Important terms

    Company Code Cost Center

    Personnel area Payroll area

    Personnel Sub-area Organizational unit

    Employee Group Job

    Employee Subgroup Position

  • 7/28/2019 Comparisonbetweenabapabap Hr 130114224906 Phpapp02

    6/30

    ABAP RECAP

    Generally in ABAP the following are done :

    1) Table development via SE112) Data Processing through internal tables

    3) Report development through SELECT statements

    4) Data base updation through BDC / BAPI

    5) SAP Queries6) Scripts and smart forms

  • 7/28/2019 Comparisonbetweenabapabap Hr 130114224906 Phpapp02

    7/30

    What is ABAP HR

    Specialization? Programming with Info types

    Logical Data Base

    Macros

    Dealing with the Repetitive structures

    Cluster Programming for Payroll / Time aspects

    Storage and access of data

    Special programming commands

    Authorization checks

    Ad-hoc queries HR Forms

    Interface Toolbox

  • 7/28/2019 Comparisonbetweenabapabap Hr 130114224906 Phpapp02

    8/30

    8

    What is an Infotype?

    A group of related data fields

    Appears as an entry screen for the user

    Time dependent storage. Identifiable through a four character numerical string

    Database table associated with it

    PAnnnn for transparent tables in Personnel Administration

    PBnnnn for transparent tables in Recruitment HRPnnnn for transparent tables in Personnel Planning

    Concepts of Infotypes

  • 7/28/2019 Comparisonbetweenabapabap Hr 130114224906 Phpapp02

    9/30

    9

    Number Ranges

    0000 0999 HR Master Data

    1000 1990 Personnel Planning

    2000 2999 Time Management 4000 4999 Recruitment

    9000 9999 Customer Specific

    Examples

    Org Assignment 0001, Personal Data 0002

    Addresses 0006, Family Member/Dependents - 0021

  • 7/28/2019 Comparisonbetweenabapabap Hr 130114224906 Phpapp02

    10/30

  • 7/28/2019 Comparisonbetweenabapabap Hr 130114224906 Phpapp02

    11/30

    11

    Transparent Table PAxxxx

    Fields of Transparent Table PA0002

  • 7/28/2019 Comparisonbetweenabapabap Hr 130114224906 Phpapp02

    12/30

    12

    Infotype 0002 Personal Data

  • 7/28/2019 Comparisonbetweenabapabap Hr 130114224906 Phpapp02

    13/30

    Retrieve data from Infotypes

    By using the FM HR_READ_INFOTYPE

    Class: CL_HRSEN_READ_INFOTYPE_FMRI

    Macro RP-READ-INFOTYPEA B C D E

    Provide / End Provide

  • 7/28/2019 Comparisonbetweenabapabap Hr 130114224906 Phpapp02

    14/30

    14

    To reduce programming efforts, HR often make use of the logical databases

    when creating reports. Logical databases are special ABAP Programs that

    provides Standard selection screen, Data retrieval and Authorization check.

    Logical Databases used In HR

    1. PAP ( Applicant administration )

    2. PNP ( Personnel Management )

    3. PNPCE - Enhanced version of PNP available form SAP Enterprise versiononwards ( Personnel Management )

    4. PCH ( Organisational Management )5. PTRVP ( Travel Management )

    The Logical Databases PNP and PCH are mostly used.

    Logical Databases in HR

  • 7/28/2019 Comparisonbetweenabapabap Hr 130114224906 Phpapp02

    15/30

    15

    Macros in HR

    Like subroutines and function modules, macro modules can be used to

    modularize programs. Macro modules are frequently used in HR.

    These macros are defined in program SAPDBPNP (include DBPNPMAC)

    with the keyword DEFINE. They can be used in any program that uses

    the logical database PNP.

    If you want to use these macros in reports that do not use the logical

    database PNP, you must include program DBPNPMAC with the keyword

    INCLUDE.

    You can also define your own macros. In accordance with the naming

    convention, the first two letters stand for the application.

    Some macros are also stored in the Macros in ABAP Programs table(TRMAC)

  • 7/28/2019 Comparisonbetweenabapabap Hr 130114224906 Phpapp02

    16/30

    It is not necessary to include logical database PNP in your program

    when you are using the macro like

    RP-READ-INFOTYPEA B C D E, where

    A corresponds to PERNRwhich describes for which personnel number

    you require records.

    B corresponds to INFOTYPEwhich describes from which infotype yourequire records.

    C corresponds to data structure of the declared infotype (internal table

    like p0000 for infotype 0000) where all the records of the particular

    personnel number will be stored.

    D corresponds to Start date.

    E corresponds to End date.

  • 7/28/2019 Comparisonbetweenabapabap Hr 130114224906 Phpapp02

    17/30

    17

    Clusters in HR

    DatabaseTables PCLn

    PCLnPCLn

    A1

    A2

    A3

    Purpose of clusters

  • 7/28/2019 Comparisonbetweenabapabap Hr 130114224906 Phpapp02

    18/30

    Files & Clusters

    PCL1

    TX

    TA

    PCL2

    RU

    ID

    PCL3

    TY

    AP

    PCL4

    P2

    U1

    PCL5

    PY

    CP

    STXL

    TX

  • 7/28/2019 Comparisonbetweenabapabap Hr 130114224906 Phpapp02

    19/30

    19

    Special ABAP Statements for

    HR

    1. DO nTIMES VARYING .

    END DO.

    2. PROVIDE / ENDPROVIDE

    3. IMPORT / EXPORT

  • 7/28/2019 Comparisonbetweenabapabap Hr 130114224906 Phpapp02

    20/30

    Evaluating Repetitive Structures

    Variousscenarios

    IT-0008 (Basic Pay) IT-0025

    (Appraisals)

    IT-0041 (DateSpecifications)

    IT-0052 (Wage

    Maintenance)

  • 7/28/2019 Comparisonbetweenabapabap Hr 130114224906 Phpapp02

    21/30

  • 7/28/2019 Comparisonbetweenabapabap Hr 130114224906 Phpapp02

    22/30

    Importance of Do / End Do Varying statement in this situation

    DO 20 TIMES VARYING s_wagetypes

    FROM p0008-lga01 NEXT p0008-lga02.

    IF s_wagetypes-wage type IS INITIAL.EXIT.

    ELSE.WRITE: / s_wagetypes-wagetype,

    s_wagetypes-amount.

    ENDIF.ENDDO.

  • 7/28/2019 Comparisonbetweenabapabap Hr 130114224906 Phpapp02

    23/30

    JanuaryJune Hamburg

    June December Munich

    January April Programmer

    May - December Course instructor

    How can we know in which time period an employee worked atwhich job and at which address he or she resided during this time?

    How does Provide statement work?

  • 7/28/2019 Comparisonbetweenabapabap Hr 130114224906 Phpapp02

    24/30

    The ABAP syntax for the provide is as follows:

    PROVIDE * FROM Pmmmm

    * FROM Pnnnn

    BETWEEN PN-BEGDA AND PN-ENDDA.

    January - April Hamburg / programmer

    May - June Hamburg / course instructor

    July - December Munich / Course instructor

  • 7/28/2019 Comparisonbetweenabapabap Hr 130114224906 Phpapp02

    25/30

    25

    Importing / Exporting Using a Buffer

    Import

    Export

    Program

    UPDATE

    PCLnPCLn

    Buffer

    IMPORT / EXPORT OPERATIONS

  • 7/28/2019 Comparisonbetweenabapabap Hr 130114224906 Phpapp02

    26/30

    26

    Reporting with Import / Export statements

    To minimize the number of times that thedatabase is accessed, import and export data isbuffered in the main memory.

    If a test run is performed, the database is not

    updated. However, the payroll results of theprevious period form the basis of the calculationused to determine the results of the subsequentperiod. For this reason, a difference arisesbetween the results of a live payroll run and the

    results of a test run if test runs are performedfor several periods.

    Using the buffer enables you to access therequired results from the previous period.

  • 7/28/2019 Comparisonbetweenabapabap Hr 130114224906 Phpapp02

    27/30

    I ) The clusters can be called from macros.

    RP-IMP-Cn-xx ( n = 1,2,3,4 and xx is cluster)

    RP-EXP-Cn-xx ( n = 1,2,3,4 and xx is cluster)

    II) Use the following code in your ABAP programs to import

    data from a cluster.

    IMPORT ITAB1 ITAB2 STRUC1.............

    FROM DATABASE TABNAME(CLUSTER_ID) ID KEY

    EXPORT ITAB1 ITAB2 STRUC1

    TO DATABASE TABNAME(CLUSTER_ID) ID KEY.

  • 7/28/2019 Comparisonbetweenabapabap Hr 130114224906 Phpapp02

    28/30

    28

    HR Form editor

    HR form editor is a Customizing tool used for designing payrollrelated forms in HR.

    Transaction code is PE51.

    Forms are required for creating employee or enterprise-

    specific statements, for example:

    1. Remuneration Statement

    2. Payroll Account

    3. Wage Type Statement

    4. Other Statements

  • 7/28/2019 Comparisonbetweenabapabap Hr 130114224906 Phpapp02

    29/30

    Questions

    ?

  • 7/28/2019 Comparisonbetweenabapabap Hr 130114224906 Phpapp02

    30/30

    Thank You