Top Banner

of 31

Abaphr Pa Part

Apr 15, 2018

Download

Documents

Ram Praveen
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
  • 8/3/2019 Abaphr Pa Part

    1/31

    INTRODUCTION TOABAP-HR

  • 8/3/2019 Abaphr Pa Part

    2/31

    HR is the biggest modules of SAP

    HR takes care of day to day activities fromhiring to exit .

    HR has 16 different sub modules.

    Some of the important sub modules are :

    Personnel Administration Recruitment

    Organization management

    Time Management

    Payroll

  • 8/3/2019 Abaphr Pa Part

    3/31

    Some other sub modules are

    Benefits

    Training and Event Management

    Travel Management

    Health

    Insurance

    Compensation Management

    Personal Development

  • 8/3/2019 Abaphr Pa Part

    4/31

    Personnel Administration- Will take care of

    Employee personal details like address,

    family, dependant details, Education..

    Organization Management- It describes where

    specific employee sits in company structure. Recruitment- It converts applicant into

    Employee. Takes care of hiring process.

    Payroll- Employee salary components and pay

    slips. Time Management- Employee leaves, absents

    and quotas.

  • 8/3/2019 Abaphr Pa Part

    5/31

    ABAPAND ABAPHR DIFFERENCES

    ABAP ABAP-HR

    Extraction of data from transparent

    tables.

    Transparent as well as cluster

    tables

    Retrieval by using select statement. Retrieval by using select

    statements, MACROs, Function

    Modules, Import/Export statements

    and LDBs

    Explicit authorizations. Implicit authorization by LDB.

  • 8/3/2019 Abaphr Pa Part

    6/31

    Validations and verifications are

    done by programming conditions

    Selection screen conditions by LDB

    Read table and loop on internal

    tables.

    RP_PROVIDE [MACRO],

    PROVIDE statement to read

    infotype internal tables.

    Module pool or transaction

    programming.

    Module pool or Infotype

    programming

    Sy-subrc to check success or failure PNP_SW_FOUND and

    PAP_SW_FOUND to check for

    success or failure.

  • 8/3/2019 Abaphr Pa Part

    7/31

    INFOTYPEInfotype is an information type where logicallyrelated fields are grouped together on a singlescreen bounded by time constraint.

    Components of Infotype

    Fields Tables

    Screens

    Module Pool

    Infotype Number [4 digit Infotype No]

    Time Constraint

    What is time constraint?

    Time constraint is nothing but assigning start dateand end date to the infotype record .

  • 8/3/2019 Abaphr Pa Part

    8/31

    Personnel Administration Infotypes start with

    PA followed by 4 digit infotype number.

    Similarly, Recruitment Infotypes start withthe PB followed by 4 digit infotype number.

    Organization Management Infotypes start with

    HRP followed by 4 digit infotype number.

    Example-

    PA0000 Actions

    PA0001- Org. Assignment

    PB4000- Applicant Events

    PB4001- ApplicationsHRP1000- Objects

    HRP1001- Relations

  • 8/3/2019 Abaphr Pa Part

    9/31

    PA Infotypes or Personnel AdministrationInfotypes come under the range 0000-0999.

    Ex- PA0006- AddressOrganization Management Infotypes comeunder the range 1000-1999.

    Ex- HRP1001- Relations

    Time Management Infotypes come under therange 2000-2999.

    Ex- PA2006-Absence Quotas.

    Note: - They also start with the letters PA.

    Recruitment Infotypes come under the range4000-4999 and also 0000-0999.

    Ex- PB4000- Applicant Events

    PB0022- Education [Comes under PA and PBboth]

  • 8/3/2019 Abaphr Pa Part

    10/31

    Custom Infotypes come under the range 9000-9999.

    Note: -Therefore, we can assume that 0000-8999are all Standard Infotypes

    As of now there are 618 custom Infotypesunder various Implementations. This numbermay have changed.

    Some of the standard Infotypes in PA are-

    0000- Actions

    0001- Organization Assignment

    0002- Personal Data

    0003- Payroll Status

    0006- Address

    0008- Basic Pay

    0009- Bank Details

  • 8/3/2019 Abaphr Pa Part

    11/31

    0014- Recurring payment or Deductions

    0021- Family or Dependant data

    0022- Education

    0024- Skill Sets

    0025- Appraisal

    0032- Internal Data0041- Date Specification

    0105- Communication

  • 8/3/2019 Abaphr Pa Part

    12/31

    Time Constraint in Detail

    Assigning a start date and end date to each recordis known as time constraint.

    There are various types of time constraints .

    Time constraint 1:-> records are created with no

    overlapping and gaps.Example: address-pa0006

    Time constraint 2:-> records are created without

    overlapping but gaps are permitted.

    Example: education pa0022.Time constraint 3:-> records are created with

    overlaps and gaps.

    Example : work

  • 8/3/2019 Abaphr Pa Part

    13/31

    There are some other Time Constraints also

    like A, B, T, Z .

    Time Constraint A-Only one record can existper employee in an infotype. Validity period is

    always from Jan 1, 1800 to Dec 31 9999.

    Example- 0003 Payroll Status

    Time Constraint B-Only one record can existper employee in an infotype. But, record can be

    deleted. Validity period is always from Jan 1,

    1800 to Dec 31 9999.

    Example - 0031Reference Personnel Nos

  • 8/3/2019 Abaphr Pa Part

    14/31

    Time Constraint T Time Constraint is based

    on Subtype or Subtype table. Each Subtype of

    an infotype can have different time constraint.Example- 0006 Address

    Note: - Subtypes for Address Infotype are

    Permanent Address, Temporary Address,

    Office Address and so on.

    Time Constraint Z- This is the time constraint

    for Time Management Infotypes

    Example- 2001 Absences

  • 8/3/2019 Abaphr Pa Part

    15/31

    CREATION OF CUSTOM INFOTYPE(PM01)

    Step1: Provide Infotype number, descriptionand infotype specific fields

    Step2:Generating tables, screens and module

    pool

    Step3:Providing Infotype characteristics( Copy one standard infotype, replace infotype

    number with custom infotype number and

    provide time constraint in details).

    Testing: Transaction PA30.

  • 8/3/2019 Abaphr Pa Part

    16/31

    ENHANCEMENT OF STANDARD INFOTYPES(PM01)

    Step1:Go to @IT tab and click create buttonand provide custom fields .

    Step2:Generate tables fields and module pool

    by clicking Generate all button.

    Testing PA30 and click on create new record

    then you should see custom fields along with

    infotype specific fields.

  • 8/3/2019 Abaphr Pa Part

    17/31

  • 8/3/2019 Abaphr Pa Part

    18/31

    ASSIGNING DEFAULTVALUES AND

    VALIDATIONS FOR CUSTOM INFOTYPE

    Steps to create default values

    Go to transaction code SE51

    Enter MPXXXX00(replace XXXX with infotype

    number)Screen no. 2000

    Click on Change button

    Double click on Module PXXXX

    Uncomment a subroutine called GET_DEFAULT

  • 8/3/2019 Abaphr Pa Part

    19/31

    Double click on Perform GET_DEFAULT

    Yes

    Select MPxxxx40 (Replace XXXX with custominfotype number)

    Enter

    Form GET_DEFAULT

    PXXXX-(fieldname) = Default value.End Form.

    Save, Check and Activate .

    Testing: - Go to transaction code PA30 [Maintain

    HR Master Data] .

  • 8/3/2019 Abaphr Pa Part

    20/31

    VALIDATIONS

    Go to SE51

    Enter MPXXXX00

    Screen no 2000

    Click on change

    Insert module PXXXX_checks after a commentedpartition. Insert check module here.

    In PAI

    * Insert Check Modules here:

    Module P9672_checks.

  • 8/3/2019 Abaphr Pa Part

    21/31

    Double click on the module P9672_checks

    Click YES

    Choose MPXXXX30

    We will be in the screen MPxxxx30

    Declare a subroutine called (GET_VALIDATIONS)

    Module p9672_checks

    Perform GET_VALIDATIONSEnd module

    Double click on GET_VALIDATIONS

    Create YES

    Select MPxxxx40 (stands for subroutines)Form GET_VALIDATIONS

    Save, check and activate the includes 40, 30 and 00.

  • 8/3/2019 Abaphr Pa Part

    22/31

    SUBTYPES

    SubtypeSegregating or classifying Infotypes to getaccurate data.

    Examples

    Address (0006)Permanent Address, MailingAddress, Temporary Address etc.

    Family or dependant Data (0021)- Spouse, parents,

    children etc.

    Communication (0105)SAP user id, Mail, Fax,

    Mobile etc.

  • 8/3/2019 Abaphr Pa Part

    23/31

    CREATION OF CUSTOM INFOTYPE WITH SUBTYPE

    Go to transaction code PM01.

    Enter Infotype No (EX-9673)

    Click Create

    Give the Description

    Then give the fields & components (Data Elements)

    IMP Note: - First field component type/ data element

    need to be of subty

    Save, check and activate.

  • 8/3/2019 Abaphr Pa Part

    24/31

    Click on Details

    Replace Time Constraint with 2

    SAVEGo to transaction code PM01

    From the menu bar select Go To and then click

    Subtype Characteristics

    Click on Change and then select New EntriesEnter subtype and description

    Save

    Note: - All the SUBTYPE values will be stored in the

    Table T591A.Go to Initial Screen i.e. PM01

    Click on Technical Attributes

    Click on change

  • 8/3/2019 Abaphr Pa Part

    25/31

    Go to initial screen i.e. PM01

    Click on ALL Button

    Note: - By clicking on ALL button system will

    generate Tables, Screens and Module pools.

    Go to Initial screen i.e. PM01

    Click on Infotype characteristics

    Change

    Select any standard Infotype. Ex- 0002

    Select Copy As

    Replace Standard Infotype and Description with

    custom Infotype.

    Enter

    Select custom Infotype (Ex- 9673)

  • 8/3/2019 Abaphr Pa Part

    26/31

    Select Custom Infotype [EX-9673] and click on

    Details

    Enter the following--Subtype Field: ZZTYPE

    Subtype table : T591A

    Subtype text Tab: T591S

    Time Constraint tab: T591ASAVE

    Testing: - Go to transaction code PA30 [Maintain HR

    Master Data]

  • 8/3/2019 Abaphr Pa Part

    27/31

    MACROS

    Macro is a tiny part of program which contains

    processing block as steps, these can be calledinternally or externally/outside the program.

    Example

    DATA: A TYPE NUMC3,

    B TYPE NUMC3,C TYPE NUMC3.

    A = 10, B = 20.

    ADDITION A B C. (Placeholders)

    Write: C.DEFINE ADDITION.

    &3 = &1 + &2.

    END-OF-DEFINITION.

  • 8/3/2019 Abaphr Pa Part

    28/31

    Some of the standard Macros in HR:

    1. RP_PROVIDE_FROM_LAST

    2. RP_PROVIDE_FROM_FIRST

    3. RP_READ_ALL_TIME_INFTY

    ..

    All standard MACROs are stored in the tableTRMAC

  • 8/3/2019 Abaphr Pa Part

    29/31

    LOGICAL DATABASES

    LDB is a selection program, which will fetch datain hierarchical format or node by node format.

    For each LDB there will be a correspondingprogram. It starts with SAPDB*

    (* indicates LDB name). Ex- SAPDBPNP

    LDB provides selection screen, source code,structures and search helps.

    LDB retrieves data from database in record byrecord format.

    LDB will take care of authorization (Implicit) and

    validations and verifications. [Selection screenconditions]

    For SAP-HR module *PA/RE/OM+, SAP hasprovided standard LDBs.

  • 8/3/2019 Abaphr Pa Part

    30/31

    Module LDB Structure

    PA PNP/PNPCE PERNR

    RE PAP APPLICANTOM PCH OBJEC/GDSTR

    Transaction code for LDBs is SE36.

    HR Report category:It is a tool through which we can modify or

    create standard LDB selection-screen

    SE38->Attributes->HR report category->create

    report category->New entries->provide name &

    description->Allowable selection criteria->new

    entries->select fields->save, check and activate

  • 8/3/2019 Abaphr Pa Part

    31/31

    SIX STEP PROCEDURE FOR PA REPORT1.TABLES:PERNR

    2.INFOTYPES:XXXX,YYYY,.,ZZZZ.3.GET:PERNR.

    4.PROCESS THE EMPLOYEE SPECIFIC DATA

    RP_PROVIDE_FROM_LAST PN-BEGDA PN-ENDDA.5. PNP-SW-FOUND

    *It acts like success statement. Similar to sy-subrc.

    1 = Success

    1 Failure

    6. END-OF-SELECTION

    Whenever END-OF-SELECTION is triggered, it is going to

    refresh Infotype Internal table and pass the cursor to GET

    PERNR.

    Note: - GET PERNR to END-OF SELECTION is ONE LOOP.