Repetitive Structure in HR....!!!

Hi,
Kindly let me know Repetitive structure in HR.
Regards,
Nitin Jain

Hi Nitin,
Repetitive Structure are used FREQUENTLYi n HR .
These are
infotype 0005
            0008
            0025
            0027
Hope it will help u...........!!!

Similar Messages

  • To pass the values in repetitive structures any function module

    hi all,
          Is there any function module to pass the values in repetitive structures like infotype 0041(Date spcification). I heard there is a function module, so any of you can tell that function module.
    thanks,
    sekhar.

    Hi Chandra,
    If your question is to find a date for a given dar value in IT 0041 then this is the sol:
    Yes there is a function Module for IT0041, HR_ECM_READ_IT0041_DATE_TYPE
    eg: 
    INFOTYPES: p0041.
    DATA: lv_msg TYPE REF TO if_hrpa_message_handler,
              lv_date TYPE D.
    GET pernr.
    CLEAR: lv_date.
        CALL FUNCTION 'HR_ECM_READ_IT0041_DATE_TYPE'
          EXPORTING
            datar           = 'U2'       " specify the value of the dar value, for which u have to find date
            p0041           = p0041
            message_handler = lv_msg
          IMPORTING
            date            = lv_date.
    For the dar value U2, lv_date will have the corresponding date.
    Hope this will clear your doubt.
    Thanks,
    Kishore

  • Repetitive Structure in Webdynpro

    Hi All,
    I am developing a Webdynpro for Java application for Investment Declaration which has repetitive structure,
    How can I use floor plan manager to develop this application, Is there any standard webdynpro application having repetitive structure in ESS.
    Regards
    Sarath

    Hi Nitin,
    Repetitive Structure are used FREQUENTLYi n HR .
    These are
    infotype 0005
                0008
                0025
                0027
    Hope it will help u...........!!!

  • Repetitive Structures in PA custom Infotype

    Hi all,
    I have created a Custom PA Infotype using PM01 transaction and it is working fine,
    How ever now I want to add repetitive structure for the same(something like date specifications),
    I went through many materials but none of them have helped,
    So can anyone let me know how to add a repetitive structure to the custom infotype ?
    Thanks,
    Madhukar
    Edited by: MADHUKAR BHAT P A on Jan 27, 2011 8:05 AM

    create yourstructure separatly in data dictinary (se11) after tht u can include/apend your customized strcture into your info type.
    Ram

  • ESS WebDynpro Appilication with Repetitive structure

    I am trying to develop an ESS Webdynpro application for Infotype P0585 (Section 80) P0591 (Nominee Details), both these infotypes have repetitive structure.
    There is no screen structure or RFC's(For Read, Modify, Edit Operations) for these Infotypes.
    We are using ECC 5.0 (Software Component: EA-HR(SAP R/3 Enterprise HR Extension) Support Package Level : 09 )
    I understand that customising for repeat Structure can be done by making an entry in the tables T588AUTO_MAP, T588AUTO_TABLE     (Mapping for Conversion of Repeat Structure/Tables), but both these tables do not permit entry.
    Any guidelines in developing Webdynpro application for services that use infotypes that have repetitive structure and implementing conversion class for the above infotype.

    Hi Sarath ,
    I am also working on Infotypes P0585/6 .
    There are some modifications to be done in the Output Table Conversion Method inside the CL_HRPA_UI_CONVERT class for IT0585/6. The screen structure's was not getting copied properly and the Object Key of the Line-Records were lost inside this method somewhere. These changes are been rectified now and will be working by the end of the week.
    As for the Entry in the T588AUTO_TABLE , it has been done  for P0585/6 .
    Regards
    Aditya Todi

  • Repetitive structure In ABAP HR

    hi all ,
        Am getting syntax error for the code below. Am using
    4.7 .its says "p0041-dar01" and "date" are type-incompatible.
    however when i compile the same code in 4.6 its workin fine. here is the code..
    *& Report  ZTEST_REP                                                   *
    REPORT  ZTEST_REP                               .
    INFOTYPES 0041.
    NODES : PERNR.
    data : begin of date,
             dar like pa0041-dar01 ,
             dat like pa0041-dat01.
    data  : end of date.
    START-OF-SELECTION.
    GET PERNR.
    DO 12 TIMES VARYING DATE
              FROM P0041-DAR01
              NEXT p0041-DAR02.
    write :  / date-dar ,
               date-dat.
    write : / date.
    ENDDO.
    END-OF-SELECTION.
    can i know what is the exact problem ...
    Thanks
    senthil

    Hi Senthil ,
    Try ...this way...
    DATA: BEGIN OF WORD,
            ONE   VALUE 'E',
            TWO   VALUE 'x',
            THREE VALUE 'a',
            FOUR  VALUE 'm',
            FIVE  VALUE 'p',
            SIX   VALUE 'l',
            SEVEN VALUE 'e',
            EIGHT VALUE '!',
          END   OF WORD,
          LETTER1, LETTER2.
    DO VARYING LETTER1 FROM WORD-ONE NEXT WORD-THREE
       VARYING LETTER2 FROM WORD-TWO NEXT WORD-FOUR.
      WRITE: LETTER1, LETTER2.
      IF LETTER2 = '!'.
        EXIT.
      ENDIF.
    ENDDO.
    The resulting output is the character string
    "E x a m p l e !".
    Regards,
    Vijay

  • Use of structure in handling repetitve structure

    Hi!,
    I have a problem with read/modify the repetitve structure. I feel that to read/modify the repetitve structure I cant use just a new structure as the structure will hold only one record. To hold more than one record I will have to use a stru/table. how should I proceed. For example, if my infotyp is IT0812 for KR, and I will have handle the structure HCMT_BSP_PA_KR_R0812 and repetitive structure HCMT_BSP_PA_KR_R0812_LIN_A, ie to read/modify the field from both rep as well as non rep struc.
    -- R C Naveen

    I guess you can use multiple performs and one form routine :
    see the simple example :
    PERFORM write_2_server TABLES hire_emp_tab.
    PERFORM write_2_server TABLES entrance_tab.
    PERFORM write_2_server TABLES integration_tab.
    PERFORM write_2_server TABLES duty_tab .
    PERFORM write_2_server TABLES type_emp_tab.
    PERFORM write_2_server TABLES job_part_tab .
    PERFORM write_2_server TABLES free_days_tab.
    PERFORM write_2_server TABLES status_tab.
    PERFORM write_2_server TABLES bank_detailes_tab.
    FORM write_2_server TABLES p_tab_data.
    FIELD-SYMBOLS: <wa> TYPE ANY.
    " MOVE 'D:_pa_test_mmsk_pa1.txt' TO adress.
    OPEN DATASET adress IN TEXT MODE
    ENCODING DEFAULT FOR OUTPUT.
    IF sy-subrc = 0.
    no_file = ' '.
    LOOP AT p_tab_data ASSIGNING <wa>.
    TRANSFER <wa> TO adress.
    ENDLOOP.
    CLOSE DATASET adress.
    ELSE.
    no_file = 'X'.
    ENDIF.
    endform.
    Thanks
    Seshu

  • What is repeated structure?

    what is repeated structure?
    Title edited by: Alvaro Tejada Galindo on Jun 12, 2008 6:46 AM

    Hi,
             In many master data infotypes the data is stored in the form of repetitive structures. For example infotype 0008, the structure wage type line is available for 20 times, that is an employee is eligible for having 20 different wage types based on his benefits. When evaluating repeat structures, you must ensure that all fields are entered. In the case of the Basic Pay infotype, 20 * 5 = 100 fields are queried.
    To use this method of evaluation, define a field string whose structure corresponds to the fields in one line of the repetitive structure.
    Example for understanding the repetitive Structure
         Say, for an employee you want to know that for what all wage types an employee is eligible for the latest period you mentioned on the selection screen.
      Using LDB (PNP)
    Program:
      Report zhr_repstru.
      Tables Pernr.
       Infotypes 0008. 
    u2022     You have to declare a structure same as repetitive structure in the 0008 infotype
       Data: begin of s_wagetypes,
                    Wagetype type p0008-lga01,
                    Amount      type p0008-bet01,
                    Hours         type p0008-anz01,
                    Unit            type p0008-ein01,
                    Ind             type p0008-opk01,
                End of s_wagetypes, 
    u2022     Selecting data from the Data base       Get pernr
    u2022     Getting the latest record based on the selection period.
          RP_PROVIDE_FROM_LAST P0008 SPACE PN-BEGDA PN-ENDDA.
    u2022     Now knowing for what all wage types the employee is eligible.
    Do 20 times varying s_wagetypes from p0008-lga01 next p0008-lga02.  If s_wagetypes-wagetype is initial.
    o     Here the data is stored sequentially, i.e., if the employee is eligible for 5 wage types then all the 5 wage types are stored sequentially in lga01 to lga05 respectively. So, if say the lga05 is initial then it is understood that, employee is eligible for only 4 wage types and from lga05 to lga20 structures will be empty so, we need not process further
                Exit.
            Else.
               Write: / s_wagetypes-wagetype,
                            S_wagetypes-amount.
            Endif.
    Enddo.

  • Dynamic select columns

    I have a Z_Temp table which has 51 colums like NKEY, NTEM001, NTEM002.... NTEM050. This table will be joined on Z_JOIN table (columns NOTE, TXT) ON NTEM*= NOTE.
    ( NTEM001 = NOTE, NTEM002 = NOTE, NTEM003 = NOTE .....)
    For all NTEM* columns that are not initial, I need to get TXT column from Z_JOIN table and send it to a Sapscript form.
    What is the best approach in doing this ?
    Thanks.

    Horizontal scrolling in a single table record is possible with the DO...VARYING... construct, please read the F1 help on the same.
    Also check this link
    Link:[Repetitive Structures|http://help.sap.com/saphelp_47x200/helpdata/en/4f/d52808575e11d189270000e8322f96/content.htm ]
    something like this
    DATA:
    ntem TYPE z_temp-ntem001
    DO 50 TIMES VARYING ntem FROM ntem001 NEXT ntem002.
      IF ntem IS NOT INITIAL.
        your code.
      ENDIF.
    ENDDO
    Edited by: Rajesh on Dec 29, 2007 9:46 PM

  • Please answer SAP HR ABAP Interview FAQs

    Hi Experts,
    Please answer the below SAP HR ABAP Interview FAQs.
    1) What is the difference between ABAP and HR ABAP
    2) What is logical data base
    3) What are logical data bases used in hr module
    4) What is the difference between PNP and PNPCE
    5) Explain GET PERNR concept when we use logical data base
    6) Explain the program flow when we use logical database PNP or PNPCE
    7) What are the program names for logical database PNP and PNPCE
    8 ) What is report category and for what purpose do we use report category
    9) What is Infotype and how it is different from tables
    10) Why do we require Infotypes for HR module
    11) What are the transaction codes to create the Infotypes
    12) What is the process to enhance the Infotype
    13) Importance of PA20, PA30 and PA40
    14) How can we decide weather we can enhance the standard Infotype or not
    15) What is PAKEY structure, PSHD1 structure and what type of fields it contains
    16) What is PS structure
    17) What are the payroll related Infotypes
    18) What are the time related Infotypes
    19) What are the personnel administration related Infotypes
    20) What are the organizational related Infotypes
    21) What is Macro
    22) What are the standard macros do we use in HR ABAP
    23) What is PNP-SW-FOUND
    24) What is the difference between select statement and provide statement
    25) Which function module reads the data for particular Infotype
    26) What is repetitive structure and for which Infotype do we have
    27) How do you retrieve the data for repetitive structures
    28) Can we develop program without logical database for hr module data retrieval
    29) By using which FM we can upload data into Infotype
    30) If yes then why do we require logical database
    31) What are advantages and disadvantages of logical data base
    32) What is the transaction code to display the payroll results
    33) What is payroll driver
    34) Where the payroll results are stored
    35) Explain the concept of clusters in payroll
    36) How do you read the data from clusters
    37) What is retro active accounting
    38) In which cluster time results are stored
    39) What is wage type
    40) What is personnel area
    41) What is personnel sub are
    42) What is payroll area
    43) What is the difference between semi-monthly and Bi-weekly payroll area
    44) What is sequence number
    45) What is For-period and In-period
    46) What is off cycle payroll run
    47) How do you execute the payroll
    48) What is schema and transaction code
    49) What is functions and transaction code
    50) What is features and transaction code
    51) What is the transaction code to modify the hr form
    52) What are the FM do we use in OM
    53) What is object in OM
    54) Which FM do you use to find out who is reporting to whom
    55) What all are the differences did you find in hr module between 4.7 and ECC6 versions
    Regards,
    Sreenivas

    Refer to Print Support For FPM in HCM Processes and Forms by Brandon Toombs
    Regards,
    Sahir.

  • Mass Upload Infotype - 8

    Dear All
    I am using 4.6c and want to upload different wage types in infotype - 8 approximately  for 2000 employees.
    Some employees has already 2 records of wage types in infotype-8 and some have 3 or 4. So i cant tell the recording program that exactly which row will be available for inserting the new record.
    Can any one help in mass upload of data for infotype-8. Fast entry is not enable my system. If any one can explain how the fast entry for infotype 8 can be made it  would also be help ful
    Thanks.

    hi,
    Employee will have the only 1 valid record at particular time. The multiple records are appearing because the HR data is time dependent. And an employee will have multiple wage types but these will be stored as single record. All the wage types will go to the single record as the PA0008 table have the repetitive structure.
    You can use  the FM HR_INFOTYPE_OPERATION to insert Modify or Deleting Etc of the HR record.
    Hope you understand
    Regards
    Pavan

  • Defined values in a cicle of Loop

    Hello friends, I need your help to solve my problem, well. let´s start.
    I have some user defined values, and I need to read each value, and before a task, (compare to other value [voltage] and so do other task [this task is not relevant] );
    But I don´t know how I can do that, I´m so confused and lost to find the right solution.
    Well.. I think I need/could do the routine in a repetition structure.
    *we have the A-B-C-D-E pre-defined values
    *I built an array, and then I got the index to know if I´m on the last iteration,(if the last iteration has passed away I stop the VI.) 
    *when I run the task and complete it, I need to read the next value of the array, until the E value, e.g.(A, B, ..., E)
    * See the red box bellow.

    Well the other parts ARE relevant because they show a loop.  How do you want that loop to interact with the red box that you want to put in a loop?  Right now you have a single value coming out of the half missing loop that runs to the code you have in the red box.  What does the value represent?  Do you want this new loop to run after the lower loop is complete?
    Since you have a loop already, you know how to implement one.  Take your best guess at what you want to try to do.  Figure out if it works or what it is doing wrong compared to what you want.  Then post the VI so we can make suggestions based on what you say it isn't doing right.
    Message Edited by Ravens Fan on 02-17-2010 05:56 PM

  • HR ABAP Expert - PCL2-CLUSTD

    I can easily read PCL2 data by using "IMPORT blah blah.... FROM DATABASE PCL2(RU)".
    Somehow, someway, SAP takes what is strored in PCL2-CLUSTD and converts it into meaningful variables via the "IMPORT ... FROM DATABASE" syntax.
    [[I want to see the code SAP uses to do this]]
    Actually, what I really want is to take normal data say, employee name and say payroll dollars for a given period and then convert it back into PCL2-CLUSTD without updating PCL2.
    IDEAS?

    hi goldstein,
    pls refer the below liks once.u may get clear idea about wat u want.
    sap.ionelburlacu.ro/abap/sap2/SAP_Reports.html - 26k
    www.experts-exchange.com/Database/Software/HR_HCM/SAP/Q_23189513.html - 112k -
    www.sap-img.com/hr021.htm - 8k -
    www.sapbrainsonline.com/REFERENCES/StandardReports/SAP_standard_reports_list.html - 39k
    Best PDF file to learn HR Programming
    http://www.melayu.plus.com/SAP%20HR%20Programming.pdf
    HR deals with the INFOTYPES which are similar to Tables in General ABAP.
    There are different ways of fetching data from these infotypes.
    There are different areas in HR LIKE Personal Admn, Orgn Management, Benefits, Time amangement, Event Management, Payroll etc
    Infotypes for these areas are different from one another area.
    storing of records data in each type of area is different
    LDBS like PNP are used in HR programing.
    Instead of Select.. we use some ROUTINES and PROVIDE..ENDPROVIDE.. etc
    and in the case of Pay roll we use Clusters and we Import and Export them for data fetching.
    On the whole Normal ABAP is different from HR abap.
    For Personal Admn the Infotypes start with PA0000 to PA1999
    Time Related Infotypes start with PA2000 to PA2999.
    Orgn related Infotypes start with HRP1000 to HRP1999.
    All custom developed infotypes stsrat with PA9000 onwards.
    In payroll processing we use Clusters like PCL1,2,3 and 4.
    Instead of Select query we use PROVIDE and ENDPROVIDE..
    You have to assign a Logical Database in the attributes PNP.
    Go through the SAp doc for HR programming and start doing.
    http://www.sapdevelopment.co.uk/hr/hrhome.htm
    See:
    http://help.sap.com/saphelp_46c/helpdata/en/4f/d5268a575e11d189270000e8322f96/content.htm
    sites regarding hr-abap:
    http://www.sapdevelopment.co.uk/hr/hrhome.htm
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/PAPA/PAPA.pdf
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/PAPD/PAPD.pdf
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/PYINT/PYINT_BASICS.pdf
    http://www.atomhr.com/training/Technical_Topics_in_HR.htm
    http://www.planetsap.com/hr_abap_main_page.htm
    You can see some Standard Program examples in this one ...
    http://www.sapdevelopment.co.uk/programs/programshr.htm
    http://searchsap.techtarget.com/originalContent/0,289142,sid21_gci1030179,00.html?Offer=SAlgwn12604#Certification
    http://www.erpgenie.com/faq/hr.htm.
    http://www.planetsap.com/hr_abap_main_page.htm
    http://www.sapbrain.com/TUTORIALS/FUNCTIONAL/HR_tutorial.html
    These are the FAQ's that might helps you as well.
    http://www.sap-img.com/human/hr-faq.htm
    http://www.sapgenie.com/faq/hr.htm
    http://www.planetsap.com/hr_abap_main_page.htm
    http://www.atomhr.com/library_full.htm
    HR Long texts Upload
    Look at the below link
    HR
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/PAPA/PAPA.pdf
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/PAPD/PAPD.pdf
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/PYINT/PYINT_BASICS.pdf
    http://www.atomhr.com/training/Technical_Topics_in_HR.htm
    http://www.planetsap.com/hr_abap_main_page.htm
    you can see some Standard Program examples in this one..
    http://www.sapdevelopment.co.uk/programs/programshr.htm
    http://searchsap.techtarget.com/originalContent/0,289142,sid21_gci1030179,00.html?Offer=SAlgwn12604#Certification
    These are the FAQ's that might helps you
    http://www.sap-img.com/human/hr-faq.htm
    http://www.sapgenie.com/faq/hr.htm
    http://www.erpgenie.com/faq/hr.htm.
    www.sap-img.com
    http://www.planetsap.com/hr_abap_main_page.htm
    http://www.sapbrain.com/TUTORIALS/FUNCTIONAL/HR_tutorial.html
    http://www.sapfans.com/forums/viewtopic.php?p=498530&sid=d7ec5866e3fb26880da129de45ce79de
    http://www.sapcookbook.com/preview_hr_questions.htm
    http://www.atomhr.com/library_full.htm
    http://www.sapdevelopment.co.uk/hr/hrhome.htm
    http://www.planetsap.com/hr_abap_main_page.htm
    http://expertanswercenter.techtarget.com/eac/knowledgebaseAnswer/0,295199,sid63_gci983590,00.html
    http://www.allsaplinks.com/HRmaterial.html
    http://www.allsaplinks.com/timemanagement.html
    http://www.allsaplinks.com/payrollcompletefunctional.html
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/HRINF/HRINF.pdf
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/PYXXFORM/PYINT_FORMBUILDER.pdf
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCBMTWFMPA/BCBMTWFMPA.pdfhttp://help.sap.com/printdocu/core/Print46c/en/data/pdf/MYSAP/SR_HR.pdf
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/PAPA/PAPA.pdf
    http://www.planetsap.com/hr_abap_main_page.htm
    Regards,
    karthik
    <REMOVED BY MODERATOR>
    Few notes are below:
    InfoSets in the HR Application
    You can use SAP Query in HR to report on HR data. Queries are maintained as described in Creating Queries. The special features of queries created for HR are described in Maintaining Queries in the Human Resources Application. The maintenance procedure for HR InfoSets differs from the described procedure inasmuch as HR data fields are grouped together in infotypes.
    InfoSet management in SAP Query is also used for InfoSet Query. For further information, see Functions for Managing InfoSets.
    If you want to create InfoSets for HR, you can use logical databases PNP, PNPCE, PAP, and PCH (see HR Logical Databases). The database you must use to create your InfoSet depends on the component in which the data you want to report on is stored.
    The reports you can execute using InfoSets based on logical databases PNP (or PNPCE) or PCH are similar, but differ in that they can select different objects. The following table describes the connection between the logical database, and the infotypes you can include in an InfoSet. It also provides you with one or two examples of reports that you can execute using the appropriate InfoSets.
    Logical database PNP/PNPCE* PCH PAP
    Selection of Persons Objects from Personnel Planning Applicants
    Infotypes that can be included in the InfoSet Infotypes for· Personnel Administration (0000-0999) · Time Management (2000-2999) · Payroll infotypes · Infotypes for Personnel Planning objects that can be related to persons If the object type is specified:· Infotypes for the object type · Infotypes for objects that can be related to the specified object typeIf the object type is not specified:· All infotypes · Infotypes for Recruitment (4000-4999)· Some infotypes for Personnel Administration (such as 0001 and 0002)
    · Customer infotypes
    Reporting examples · Selection of all persons who participated in a specific business event, output of prices for reserved business events · Selection of all persons assigned to a specific personnel area, output of qualifications held by these persons · Selection of all business events held in London in March, output of all persons who participated in these business events · Selection of all positions assigned to a specific organizational unit, output of all persons assigned to the positions · Selection of all applicants hired last year to work on special projects, output of addresses for the applicants selected
    Logical database PNPCE (PNP Concurrent Employment) functions just like logical database PNP. The procedure for creating InfoSets is also the same. It only becomes significant if you work with Concurrent Employment.
    Creating InfoSets
    The maintenance procedure for HR InfoSets differs from the procedure described so far in this section inasmuch as HR data fields are grouped together in infotypes. To set up an InfoSet for the HR application, proceed as follows:
    1. On the initial screen for maintaining InfoSets, enter a name for the InfoSet and choose Create.
    2. On the next screen, enter a name for the InfoSet and select one of the HR logical databases in accordance with your reporting requirements.
    Customer infotypes can be created on all HR logical databases. In each individual case, therefore, you must decide which database to select so that you can report on customer infotypes.
    This screen enables you to enter an authorization group. All of the queries that are subsequently created using this InfoSet can only be executed by persons who have this authorization group.
    3. Choose .
    This takes you to the Infotype Selection for InfoSet .
    Fill data object
    Export record
    EXPORT TABLE1 TO DATABASE PCLn (xy) ID xy-KEY.
    IF SY-SUBRC EQ 0.
    WRITE: / 'Update successful'.
    ENDIF.
    Export Cluster data using the macro
    . Export data using macro RP-EXP-Cn-xy.
    • When data records are exported using macro, they are not written to the database but to a main memory buffer.
    • To save data, use the PREPARE_UPDATE routine with the USING parameter 'V'.
    REPORT ZHREXPRT.
    *Buffer definition
    INCLUDE RPPPXD00. INCLUDE RPPPXM00. "Buffer management
    DATA: 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.
    Importing Cluster Data using standard include
    • The IMPORT command causes data objects with the specified key values to be read from PCLn.
    • If the import is successful, SY-SUBRC is 0; if not, it is 4.
    REPORT RPIMPORT.
    TABLES: PCLn.
    INCLUDE RPCnxxy0. "Cluster definition
    Fill cluster Key
    Import record
    IMPORT TABLE1 FROM DATABASE PCLn (xy) ID xy-KEY.
    IF SY-SUBRC EQ 0.
    Display data object
    ENDIF.
    Importing Cluster data using Macro
    • Import data using macro RP-IMP-Cn-xy.
    • Check return code SY-SUBRC. If 0, it is successful. If 4, error.
    • Need include buffer management routines RPPPXM00
    Example
    REPORT RPIMPORT.
    *Buffer definition
    INCLUDE RPPPXD00.
    DATA: BEGIN OF COMMON PART 'BUFFER'.
    INCLUDE RPPPXD10.
    DATA: END OF COMMON PART 'BUFFER'.
    *Import data to buffer
    RP-IMP-Cn-xy.
    *Buffer management routines
    INCLUDE RPPPXM00.
    Cluster Authorization
    Simple EXPORT/IMPORT statement does not check for cluster authorization.
    Use EXPORT/IMPORT via buffer, the buffer management routines check for cluster
    authorization.
    How to read the Payroll Results
    • Payroll results are stored in cluster Rn of PCL2 as field string and internal tables.
    n - Country identifier.
    • Standard reports read the results from cluster Rn. Report RPCLSTRn lists all payroll results;
    • Report RPCEDTn0 lists the results on a payroll form.
    • The cluster definition of payroll results is stored in two INLCUDE reports:
    include: rpc2rx09. "Definition Cluster Ru (I)
    include: rpc2ruu0.”Definition Cluster Ru (II)
    o This first INCLUDE defines the country-independent part; the second
    INCLUDE defines the country-specific part (US).
    o The cluster key is stored in the field string RX-KEY.
    • All the field string and internal tables stored in PCL2 are defined in the ABAP/4 dictionary. This allows you to use the same structures in different definitions and nonetheless maintain data consistency.
    • The structures for cluster definition comply with the name convention PCnnn
    Unfortunately 'nnn' can be any set of alphanumeric characters.
    *Key definition
    DATA: BEGIN OF RX-KEY.
    INCLUDE STRUCTURE PC200.
    DATA: END OF RX-KEY.
    *Payroll directory
    DATA: BEGIN OF RGDIR OCCURS 100.
    INCLUDE STRUCTURE PC261.
    DATA: END OF RGDIR.
    • How to retrieve Payroll results
    o To read payroll results, you need two keys: pernr and seqno
    o You can get SEQNO by importing the cluster directory (CD) first.
    Example
    REPORT ZHRIMPRT.
    TABLES: PERNR, PCL1, PCL2.
    INLCUDE: rpc2cd09. "Definition cluster CD
    PARAMETERS: PERSON LIKE PERNR-PERNR.
    RP-INIT-BUFFER.
    *Import cluster Directory
    CD-KEY-PERNR = PERNR-PERNR.
    RP-IMP-C2-CU.
    CHECK SY-SUBRC = 0.
    LOOP AT RGDIR.
    RX-KEY-PERNR = PERSON.
    UNPACK RGDIR-SEQNR TO RX-KEY-SEQNO.
    *Import data from PCL2
    RP-IMP-C2-RU.
    ENDLOOP.
    o Reading records from the Payroll directory
    after importing the payroll directory, which record to read is up to the programmer
    o Each payroll result has a status.
    'P' - previous result
    'A' - current (actual) result
    'O' - old result
    o Function module CD_EVALUATION_PERIODS will restore the payroll result status for a period when that payroll is initially run. It also will select all the relevant periods to be evaluated.
    Example
    Call function 'CD_EVALUATION_PERIODS'
    exporting
    bonus_date = ref_periods-bondt
    inper_modif = pn-permo
    inper = ref_periods-inper
    pay_type = ref_periods-payty
    pay_ident = ref_periods-payid
    tables
    rgdir = rgdir
    evpdir = evp
    iabkrs = pnpabkrs
    exceptions
    no_record_found = 1.
    Authorization Check
    Authorization for Persons
    • In the authorization check for persons, the system determines whether the user has the authorizations required for the organizational features of the employees selected with GET PERNR.
    • Recruits for which the user has no authorization are skipped and appear in a list at the end of the report.
    • Authorization object: 'HR: Master data'
    Authorization for Data
    • In the authorization check for data, the system determines whether the user is authorized to read the infotypes specified in the report.
    • If the authorization for a particular infotype is missing, the evaluation is terminated and an error message is displayed.
    Deactivating the Authorization Check
    • In certain reports, it may be useful to deactivate the authorization check in order to improve performance. (E.g. when running payroll)
    • You can store this information in the object 'HR: Reporting'.
    2.1.6 Concepts of Macros (Import/Export etc.)
    Macros:
    Introduction
    Programs that process the cluster data (for example, RX) do not access the cluster independently. The data is accessed using a defined interface created with macros.
    Macro contains some part of source code, which it will be useful for number of applications. Macro is module, which is stored
    Naming Conventions of Macro:
    RP-aaa-bb-cc
    • aaa is the type of Macro. It takes two values
    o IMP Import Macro
    o EXP Export Macro
    • bb is the Database table where the data is saved:
    o C1 Database object PCL1
    o C2 Database object PCL2
    o C3 Database object PCL3
    o C4 Database object PCL4
    • Cc is the cluster, it may take
    o RX Cluster object RX
    o RD Cluster object RD
    o B2 Cluster object B2 and so on.
    Defining and Calling the Macros
    Defining:
    There are two options for defining the Macros
    • Macros are defined using the ABAP Commands DEFINE…. END-OF-DEFINITION. A macro can be used within a report or within include. If a macro is used in a report, and the macro is defined in include with the DEFINE command, include must be integrated.
    • Macros can also be defined as RMAC macros. The source code of these modules is stored in the function section of the control table TRMAC. The coding is grouped under a specific name in the table key.
    According to conventions, the first two letters of the name must stand for the application. The rest of the name is freely definable.
    Difference between the two methods is:
    • If a macro is changed, each report using this macro is automatically regenerated when it is executed.
    • When you change a RMAC macro in the table TRMAC, the reports that use this macro are not regenerated automatically. You must regenerate them manually.
    Standard HR Macros
    o The macro RP-PROVIDE-FROM-FRST retrieves the first (start) data record, which is valid in the data selection period.
    o The macro RP-PROVIDE-FROM-LAST retrieves the last (latest) data record, which is valid in the data selection period.
    o The macro RP-READ-INFOTYPE retrieves the data record(s), which is valid in the data selection period.
    How to check whether the macro operation is successful or not
    For every macro, whether the operation was successful or not will be checked with
    PNP-SW-FOUND.
    If PNP-SW-FOUND = 1, then the operation is successful.
    Where exactly the Macrocode is stored
    The program code pertaining to this macro is stored in the control table RMAC
    Guidelines for how and when to use the Standard Macros
    o RP_PROVIDE_FROM_FRST
    Use macro RP_PROVIDE_FROM_FRST in programs for the logical databases PNP and PAP where the first data record for a period (can be a subtype) is read from an infotype table. The infotype table has been filled earlier (for example, with GET PERNR or RP_READ_INFOTYPE). This macro is only helpful if the infotype has time constraint 1 or 2.
    Prerequisites
    • The validity begin date of the time period must be before or the same as the validity end date.
    • Validity start and end dates are correct (preferably of the type DATE).
    • The infotype table is sorted in ascending order. Otherwise, you would receive the first fitting table entry that might not necessarily correspond to the first time entry.
    Features
    The first entry for a specified period is placed in the table header entry from an internal infotype table.
    Parameters
    RP_PROVIDE_FROM_FRST inftytab subty beg end
    IN: 1) Name of the internal table
    2) Subtype required or SPACE if no subtype is being specified
    3) Validity start date of the time interval
    4) Validity end date of the time interval
    OUT: 1) PNP-SW-FOUND: has the value 0 if there is no matching entry in the infotype table in the given time period. Otherwise it has the value 1.
    2) The matching table header entry if PNP-SW-FOUND = 1 or
    the initial table header entry if PNP-SW-FOUND = 0
    Example
    (RP_PROVIDE_FROM_FRST inftytab subty beg end)
    RP_PROVIDE_FROM_FIRST P0021 '1' PN-BEGDA PN-ENDDA.
    IF PNP-SW-FOUND EQ '1'.
    ENDIF.
    or
    RP_PROVIDE_FROM_FRST P0001 SPACE PN-BEGDA PN-ENDDA.
    IF PNP-SW-FOUND EQ '0'.
    WRITE: / 'Error: Org. assignment is missing' REJECT.
    ENDIF.
    o RP_PROVIDE_FROM_LAST
    You use macro RP_PROVIDE_FROM_LAST in programs for the logical databases PNP and PAP where the last data record for a period (can be a subtype) is read from an infotype table. The infotype table has been filled earlier (for example, with GET PERNR or RP_READ_INFOTYPE). This macro is only helpful if the infotype (or subtype) has time constraint 1 or 2.
    Prerequisites
    • The validity begin date of the time period must be before or the same as the validity end date.
    • Validity start and end dates are correct (preferably of the type DATE).
    • The infotype table is sorted in ascending order. Otherwise, you would receive the last fitting table entry that might not necessarily correspond to the last time entry.
    Features
    The macro RP_PROVIDE_FROM_LAST makes sure that the last entry for a specified period is placed in the table header entry of the report output list.
    Parameters
    RP_PROVIDE_FROM_LAST inftytab subty beg end
    IN: 1) Name of the internal table
    2) Subtype required or SPACE if no subtype is being specified
    3) Validity begin date of the time interval
    4) Validity end date of the time interval
    OUT: 1) PNP-SW-FOUND: has the value 0 if there is no matching entry in the infotype table in the given time period. Otherwise it has the value 1.
    2) The matching table header entry if PNP-SW-FOUND = 1 or
    the cleared table header entry if PNP-SW-FOUND = 0
    Example:
    RP_PROVIDE_FROM_LAST P0021 '1' PN-BEGDA PN-ENDDA.
    IF PNP-SW-FOUND EQ '1'.
    ENDIF.
    OR
    RP_PROVIDE_FROM_LAST P0001 SPACE PN-BEGDA PN-ENDDA.
    IF PNP-SW-FOUND EQ '0'.
    WRITE: / 'Error: Org. assignment is missing'. REJECT.
    ENDIF.
    • RP_READ_INFOTYPE
    You can use the macro in all programs at any point. You can also use it in function modules. In database PNP, an infotype is usually read with GET PERNR. Using macro RP_READ_INFOTYPE is an exception.
    You can also use the function module HR_READ_INFOTYPE. For information on how to use the function module, see the documentation on Function Modules.
    Prerequisites
    • The validity begin date of the time period must be before or the same as the validity end date.
    • Validity begin and end are correct date specifications (preferably of the type DATE).
    • The infotype table must match the infotype number.
    • The program using the macro must contain the include DBPNPMAC.
    Features
    The macro RP_READ_INFOTYPE makes sure that all data records for a person for the specified period are placed in an internal infotype table.
    Parameters
    RP_READ_INFOTYPE pernr infty inftytab beg end
    IN: 1) Personnel number of the person requested
    2) Infotype number of the required infotype
    3) Name of the internal infotype table
    4) Validity start date of the time interval
    5) Validity end date of the time interval
    OUT: 1) PNP-SW-FOUND = 0, if there is no matching record in the dataset
    PNP-SW-FOUND = 1, if there is no matching record in the dataset
    2) PNP-SW-AUTH-SKIPPED-RECORD = 0, if the HR authorization check has not retained any records due to incorrect authorizations.
    PNP-SW-AUTH-SKIPPED-RECORD = 1 , if the HR authorization check has retained at least one record due to lack of authorization
    3) Internal infotype table, containing all matching records for which the user is authorized (this table can also be empty).
    Example
    (RP_READ_INFOTYPE pernr infty inftytab beg end)
    INFOTYPES: 0001.
    RP-LOWDATE-HIGHDATE.
    DATA: PERNR LIKE P0001-PERNR.
    DATA: BEGDA LIKE P0001-BEGDA, ENDDA LIKE P0001-ENDDA.
    PERNR = '12345678'.
    BEGDA = LOW-DATE + 15
    ENDDA = HIGH-DATE - 5.
    RP-READ-INFOTYPE PERNR 0001 P0001 BEGDA ENDDA.
    IF PNP-SW-AUT-SKIPPED-RECORD EQ '1'.
    WRITE: / 'Insufficient authorization'. STOP.
    ENDIF.
    IF PNP-SW-FOUND EQ '0'.
    WRITE: / 'Infotype 0001 missing'. STOP.
    ENDIF.
    2.1.7 Retrieval of data using LDBs (PNP/PAP/APP/PCH) without LDBs.
    Logical database
    A logical database is a special ABAP/4 program which combines the contents of certain database tables. Using logical databases facilitates the process of reading database tables.
    HR Logical Database is PNP
    Main Functions of the logical database PNP:
    • Standard Selection screen
    • Data Retrieval
    • Authorization check
    To use logical database PNP in your program, specify in your program attributes.
    Standard Selection Screen
    • Date selection
    Date selection delimits the time period for which data is evaluated. GET PERNR retrieves all records of the relevant infotypes from the database. When you enter a date selection period, the PROVIDE loop retrieves the infotype records whose validity period overlaps with at least one day of this period.
    • Person selection
    Person selection is the 'true' selection of choosing a group of employees for whom the report is to run.
    • Sorting Data
    • The standard sort sequence lists personnel numbers in ascending order.
    • SORT function allows you to sort the report data otherwise. All the sorting fields are from infotype 0001.
    • Report Class
    • You can suppress input fields, which are not used on the selection screen by assigning a report class to your program.
    • If SAP standard delivered report classes do not satisfy your requirements, you can create your own report class through the IMG.
    Data Retrieval from LDB
    1. Create data structures for infotypes.
    INFOTYPES: 0001, "ORG ASSIGNMENT
    0002, "PERSONAL DATA
    0008. "BASIC PAY
    2. Fill data structures with the infotype records.
    Start-of-selection.
    GET PERNR.
    End-0f-selection.
    Read Master Data
    • Infotype structures (after GET PERNR) are internal tables loaded with data.
    • The infotype records (selected within the period) are processed sequentially by the PROVIDE - ENDPROVIDE loop.
    GET PERNR.
    PROVIDE * FROM Pnnnn BETWEEN PN/BEGDA AND PN/ENDDA
    If Pnnnn-XXXX = ' '. write:/ Pnnnn-XXXX. Endif.
    ENDPROVIDE.
    • Period-Related Data
    All infotype records are time stamped.
    IT0006 (Address infotype)
    01/01/1990 12/31/9999 present
    Which record to be read depends on the date selection period specified on the
    selection screen. PN/BEGDA PN/ENDDA.
    • Current Data
    IT0006 Address - 01/01/1990 12/31/9999 present
    RP-PROVIDE-FROM-LAST retrieves the record, which is valid in the data selection period.
    For example, pn/begda = '19990931' pn/endda = '99991231'
    IT0006 subtype 1 is resident address
    RP-PROVIDE-FROM-LAST P0006 1 PN/BEGDA PN/ENDDA.
    2.2 Personnel Administration (PA)
    PA involves administrating employee data, commonly referred to Master Data. Master Data contains all employee data used in HR processing. Master Data includes Personal (E.g. address), Organizational (Position description), Benefits (Insurance, Pension), Time & Payroll.
    Master Data is stored in Infotypes. Infotypes are tables (for user Data entry screen) that contain logically related employee data. Data can be stored for specific periods, which includes current and historical.
    Components of PA:
    Personnel Area: represents a division of a company code into subunits. It is an organizational entity representing an area within an organization defined by specific aspects of personnel administration, time management and payroll. Personnel areas are subdivided into personnel subareas. Personnel area is specific to HR and is a four character alphanumeric identification. E.g. Personnel area 100 is for employees in Karnataka, 200 is for Chennai.
    Personnel Subarea: is a further subdivision of Personnel area. It may represent geographical locations. Functions include:
    1. Set groupings for Time Management, so that work schedules, substitution and absence and leave types can be setup for individual personnel subareas.
    2. Generate default pay scale type and area for an employee's basic pay.
    3. Define public holiday calendar.
    Employee Groups: divides or groups employees into various categories. E.g. Active employees, Retired employees, Contractors Employee groups are used to generate default values for payroll accounting area and basic pay.
    Employee Subgroups: are further differentiated within the employee group. E.g. Salaried employees, Hourly employees, unionized employees, Executives The employee subgroup grouping for the payroll rule allows you to define different payroll procedures for different employee subgroups. For e.g. you can specify whether an employee's pay should be determined on hourly or monthly basis. The employee subgroup grouping for the work schedule defines the validity of work schedule, and the attendance or absence quota type determines the validity of time quotas.
    Here a Data Model
    2.2.1 Importance of Dates and periods in payroll
    Here is a simple ABAP example of reading DATE types stored in infotype 0041.
    There can be a maximum of 12 dates stored in this infotype. Here is an example of an infotype 0041 record:
    The date types are stored in PA0041-DAR01, PA0041-DAR02, etc.
    In the example above, PA0041-DAR01 is “01”, PA0041-DAR02 is “09”.
    The dates themselves are stored in PA0041-DAT01, PA0041-DAT02, etc
    To read through this in ABAP, the easiest way is to use the DO VARYING statement. Here is a simple demonstration ABAP:
    Note: to print the text of the date type, e.g. “Leave year entry” select from table T548T.
    REPORT ZDATES1.
    TABLES: PERNR.
    DATA: BEGIN OF MYDATES,
    DAR LIKE P0041-DAR01,
    DAT LIKE P0041-DAT01,
    END OF MYDATES.
    INFOTYPES 0041.
    GET PERNR.
    WRITE: PERNR-PERNR, PERNR-ENAME. "Show employee number and name
    RP-PROVIDE-FROM-LAST P0041 SPACE PN-BEGDA PN-ENDDA.
    IF PNP-SW-FOUND = 1.
    DO 12 TIMES VARYING MYDATES
    FROM P0041-DAR01
    NEXT P0041-DAR02.
    If mydates-dar ne space.
    WRITE: /, MYDATES-DAR, MYDATES-DAT.
    Endif.
    ENDDO.
    ENDIF.
    2.2.2 Overview of date fields and period-Ex. for period/in-period/ payroll
    FOR-PERIOD: Payroll period (start and end date of a period) for which a payroll result is created or generated.
    IN-PERIOD: The payroll period (start and end date of a period) in which a payroll result is created or generated.
    Example: For every employee payroll should be run, it may be bi-weekly, monthly, or quarterly. Say it is monthly, then for an employee a payroll should be run for this month and it is run next month then. For-period start date is 01/9/2003 and end date is 30 and in-period end date will be the date it is run 15/10/2003.
    In-Period View
    An in-period view is a selection of payroll results from the payroll directory (for example, RPCLSTRD Payroll Result for Germany,) for a number of in-periods. The payroll results that were generated for the required number of payroll periods in the selected period are selected.
    Payroll Result
    For-Period View
    A for-period view is a selection of payroll results from the payroll directory (for example, RPCLSTRC Payroll Result for Switzerland) for a number of for-periods. The payroll results that were generated in the required number of payroll periods for the selected period are selected.
    Example: For-Period View / In-Period View
    Payroll
    result For-period
    view Start date
    for-per. view End date
    for-per. view In-period
    view End date
    in-per. view
    1 01/1997 01.01.1997. 31.01.1997 02/1997 28.02.1997
    2 02/1997 01.02.1997 28.02.1997 02/1997 28.02.1997
    Explanation
    The payroll result 1 for the payroll period (for-period) 01/1997 has the start date 01.01.1997 and the end date 31.01.1997. This payroll result was generated in the payroll period (in-period) 02/1997.
    2.2.3 Repetitive Structures processing
    In many master data infotypes the data is stored in the form of repetitive structures. For example infotype 0008, the structure wage type line is available for 20 times, that is an employee is eligible for having 20 different wage types based on his benefits. When evaluating repeat structures, you must ensure that all fields are entered. In the case of the Basic Pay infotype, 20 * 5 = 100 fields are queried.
    To use this method of evaluation, define a field string whose structure corresponds to the fields in one line of the repetitive structure.
    Example for understanding the repetitive Structure
    Say, for an employee you want to know that for what all wage types an employee is eligible for the latest period you mentioned on the selection screen.
    Using LDB (PNP)
    Program:
    Report zhk_repstru.
    Tables Pernr.
    Infotypes 0008.
    • You have to declare a structure same as repetitive structure in the 0008 infotype
    Data: begin of s_wagetypes,
    Wagetype type p0008-lga01,
    Amount type p0008-bet01,
    Hours type p0008-anz01,
    Unit type p0008-ein01,
    Ind type p0008-opk01,
    End of s_wagetypes,
    • Selecting data from the Data base Get pernr
    • Getting the latest record based on the selection period.
    RP_PROVIDE_FROM_LAST P0008 SPACE PN-BEGDA PN-ENDDA.
    • Now knowing for what all wage types the employee is eligible.
    Do 20 times varying s_wagetypes from p0008-lga01 next p0008-lga02. If s_wagetypes-wagetype is initial.
    o Here the data is stored sequentially, i.e., if the employee is eligible for 5 wage types then all the 5 wage types are stored sequentially in lga01 to lga05 respectively. So, if say the lga05 is initial then it is understood that, employee is eligible for only 4 wage types and from lga05 to lga20 structures will be empty so, we need not process further
    Exit.
    Else.
    Write: / s_wagetypes-wagetype,
    S_wagetypes-amount.
    Endif.
    Enddo.
    2.2.4 Guidelines to retrieve Payroll data (Mainly US/UK/Ireland)
    Before directly going into the Guidelines to retrieve Payroll Data let us look in to the basic concepts of the Payroll.
    Introduction to Payroll
    To calculate the remuneration for work done for each employee
    Payroll does not just involve the calculation of remuneration, but consists of a variety of processes that are becoming increasingly important due to the employer’s increased obligation to supply benefits and medical welfare. These benefits are products of:
    • Labor law
    • Tax law
    • Contribution law
    • Benefits law
    • Civil law
    • Reporting law
    • Information law
    • Statistics law
    Payroll in the SAP System: In the SAP Human Resources Management System, payroll accounting is executed using the Payroll driver.
    Process Flow:
    When you access Payroll, the payroll driver calls the accompanying payroll schema, which consists of a sequence of functions. For each activity, the individual functions import data from internal tables and payroll relevant files.
    Payroll Integration:
    Payroll can be integrated in Personnel Administration, Time Management, Incentive Wages and Accounting:
    Standardized data retention enables you to use master data and other payroll relevant data from Personnel Administration.
    Time data, entered via Time Management, is automatically included in the Payroll and is valuated during the payroll run. Data from the Incentive Wages component is used to calculate piecework wages and premium wages directly in Payroll.
    Information on expenses and payables from Payroll is posted for accounting directly in Financial Accounting, and you assign the costs to the appropriate cost center. You can also control the financial system of third-party providers.
    Payroll Driver
    Payroll driver is a special report for Payroll.
    SAP has developed country-specific payroll drivers, which are based on report RPCALCx0.
    The country-specific net calculation of pay must be developed explicitly for every country.
    Separate country programs, which meet the tax and insurance requirements of the respective country, can be created from the basic report RPCALCx0. Since the payroll driver has a modular structure, you can use the Customizing functions to quickly modify the payroll procedure to meet the particular requirements of your enterprise.
    Integration
    Calculation rules and other reports are stored in an accompanying schema, which also contains the activities carried out by the payroll driver during payroll. All data is stored in internal tables and saved in files with a cluster structure.
    When you access Payroll, the payroll driver calls the accompanying payroll schema, which consists of a sequence of functions. For each activity, the individual functions import data from internal tables and payroll relevant files.
    Payroll Schema:
    It contains calculation rules to be used by the payroll driver during payroll.
    SAP has developed country-specific schemas, which are based on schema X000.
    With country-specific reports, the first character in the name refers to the country indicator.
    For example,
    D for Germany
    F for France
    U for USA
    Schema Structure A schema consists of the following parts:
    1. Initialization
    Where system performs the following steps:
    Updates the databases
    Imports required infotypes
    2. Gross calculation of pay
    Where system performs the following steps:
    Processes basic data and time data
    Reads payroll account of the last period accounted
    Processes time data and calculate the individual gross values
    Performs factoring
    3. Net calculation of pay
    where system performs the following steps:
    Calculates net remuneration
    Performs bank transfers
    Example:
    The classic example is the payroll for salaried employees at the end of the month in contrast to the wage accounting of hourly workers in the middle of the following month.
    Enter the organizational assignment of employees to a payroll accounting area (ABKRS) in Infotype 0001. Payroll accounting area also determines the two functions necessary for payroll accounting:
    • The summarization of personnel numbers to be accounted and
    • The determination of the exact payroll period.
    Select Personnel Numbers:
    Personnel numbers are selected for payroll accounting by specifying a payroll area in the payroll driver. Infotype 0001 Organizational Assignment enables you to assign an employee to the appropriate payroll area.
    These Pernrs are locked during Payroll Run.
    Determine Payroll Period:
    On the Selection screen, you can give Payroll Period Parameter as per the requirement else you can give Payroll Area, by which system calculates the payroll period.
    Finding Payroll Results for a Specific Query:
    Payroll results are stored in cluster Rx of the PCL2. The cluster key is not mnemonic; it contains only the PERNR (personnel number) and SEQNO (sequential number) fields.
    The internal table RGDIR (PC261 - Cluster Directory for Export and Import of Payroll Results) contains a directory entry for each payroll result.
    This entry is a sequential number (RGDIR-SEQNR), which uniquely identifies the payroll result.
    Payroll results can only be imported if the payroll cluster key (PC200) contains the personnel number and sequential number.
    Function Modules for Selecting Payroll Results
    You will probably always have the same queries when importing payroll records. For example, "Which payroll results (original and retroactively accounted records) were written for a specific payroll run (defined by IN payroll category, IN payroll area, IN period)"? To save programmers from having to write their own reports for this functionality, standard modules are available for the most important queries. The employee's payroll directory is always transferred to the function modules using the table RGDIR (PC261). The modules then transfer the payroll records, which satisfy the specified selection criteria using a table whose type corresponds to that of the RGDIR (PC261) but which has a different name.
    Exporting Pernr – Personal Number
    Importing Molga – Country
    Tables Rgdir – Payroll Results Directory
    This Function Module populates payroll results of all employees with PERNR & SEQNR as key.
    Macro Modules:
    We have populated Results Directory & retrieved Sequential Number, we need to call an import macro module for retrieving the required payroll results. For this we need to pass the unique identification of an Employee payroll Result i.e. rx-key-pernr = v_pernr.
    rx-key-seqno = v_seqnr.
    To that import macro.
    Calling Import Module: RP-imp-c2-RU.
    This Macro populates all the cluster tables required for Payroll, by importing from PCL2 Cluster Directory. After that we can loop through these cluster tables for required fields.
    Guideline to write a program, which retrieves the data for, specified country
    • Use Logical Database As per the Requirement.
    • Include Payroll Driver with reference to Country- Specific modules which inturn includes Country-specific Schemas etc.
    • Get the PERNRs for which you want to obtain payroll results.
    • Populate Results Directory RGDIR with PERNR & Molga (Country) calling FM CU_READ_RGDIR.
    • Get the Unique Sequential Number with PERNR, From Date & Last Date calling CD_READ_LAST.
    • Pass these KEY Field (PERNR, SEQNR) to IMPORT MACRO
    RP-IMP-C2- RU to import all the relevant field entries from PCL2
    DIRECTORY to all the cluster tables
    • Get the required fields by looping through cluster tables.
    Integration
    All data is stored in internal tables and saved in files with a cluster structure.
    Internal Tables: Internal tables store data during payroll.
    The system imports data to these tables and used them to calculate new data. This data is then also saved in internal tables.
    At the start of the payroll run, the system reads the values from the results tables to the old results table (ORT). Data from the previous period is, therefore, available in the current payroll period.
    The most important internal tables are:
    • Input table (IT)
    Table IT contains data that can be edited. The table exists only during processing.
    •• Output table (OT)
    Table OT contains the results of an activity. These results are written to the input table for further processing. The table exists only during processing.
    •• Results table (RT)
    Table RT contains the results of the period for which payroll has been run. The system saves this data in the PCL2 file in cluster RX.
    Interaction of IT, OT and RT:
    The necessary data for the respective processing step is loaded into the input table and is thus available for various processing procedures. The results of a processing step are stored either in the output table or the results table. At the end of a processing step, the data from the OT is loaded back into the IT, where it is available for further processing steps. The IT and OT are only temporarily filled, whereas the RT is stored on the database. In one of the first processing steps, the RT of the last payroll accounting period is imported into the old results table (ORT) and can consequently be used for further processing.
    Payroll Relevant Files:
    Payroll files contain data for payroll and payroll results.
    Structure
    The system requires the following files for payroll:
    • Pnnnn (nnnn = number of the infotype)
    The Pnnnn files contain data that has been entered in the respective infotypes for an employee.
    Example
    P0000 - Actions Infotype
    P0008 - Basic Pay Infotype
    • PCL1
    The PCL1 file contains primary information, in other words, data from the master data and time recording systems.
    • PCL2
    The PCL2 file contains secondary information, in other words, derived data and all generated schemas
    Integration
    When you start payroll, the system imports the relevant master data from the Pnnnn files (for example, basic pay and tax class) and imports the time data from the PCL1 file to the IT table.
    The system imports the payroll results from the previous month from table ORT (for example, to form averages).
    The system processes this data and saves the payroll results and generated schemas in the PCL2 file.
    Payroll Control
    Edited by: Alvaro Tejada Galindo on Apr 8, 2008 5:09 PM

  • Custom ESS Service for Investment Infotype(585)

    Hi All,
    I am trying to develop a custom service for Investment details(585) using Floor Plan Manager. Infotype 585 use repetitive structure. Can anyone help me in developing using FPM.
    Thanks and Regards
    Sarath

    Hi,
    Have a look at this wiki page
    https://wiki.sdn.sap.com/wiki/x/LEI
    This tells you how to develop an FPM application from scratch.
    Regards,
    Sharadha

  • Update multiple infotypes for an employee

    I have a requirement to update some fields in various PA infotypes like 0002, 0006, 0008, 0015, 0021 and a few custom PA infotypes (9xxx) for a given set of employees.
    Is there any method by which I would be able to update the required fields of all the above listed infotypes for an employee in one go? Is it possible to update all the infotypes of  all the given set of employees in one go?
    Please let me know the FM that could be used to meet the requirement. An example would also be helpful.
    Thanks,
    Jiten

    Please check if there is already personnel actions defined with all the infotypes you are trying to update. If you have them, then you can use HR_INFOTYPE_OPERATION or HR_MANTAIN_MASTERDATA very easily with one single call. For that please refer the logic of PA48 transaction, simple one.
    If the personnel action is not defined, then you need to call the FM HR_INFOTYPE_OPERATION separately for each infotype. Or HR_MAINTAIN_MASTERDATA at once for all of them.
    From the list of standard infotypes mentioned, only IT0008 is having repetitive structure, handle it as a special case else others looks very similar.
    Note : I don't see IT0000 mentioned in the list, hence i presume that there are no personnel actions defined for this set. But you can get it confirmed from your functional folks.
    Regards
    Ranganath

Maybe you are looking for

  • Can't get it to work with css z-index

    I am trying to get the naviagtion.swf just above the movie.swf file. But when I use the z-index property in css, it's always the other way around (the movie.swf on top of navigation.swf). Here is what I have: <div style='position: absolute; z-index:

  • How do I transfer the music I ripped from cds I own to a new PC with iTunes?

    Greetings y'all. Some one I work with uses iTunes, and he wants to transfer all of his music from his old computer to his new computer. I went to the apple website trying to find answers. They have some pretty decent tutorials on how to transfer your

  • IndentAndSpacingFormat - Bug in API or am I doing something wrong?

    I have a FieldObject in my report with double line spacing (LineSpacing=2) and then try following code to see its spacing format: double lineSpacing = myFieldObject.FieldFormat.StringFormat.IndentAndSpacingFormat.LineSpacing; Unfortunately this retur

  • Communicating w. running (non-Java) process from Java

    I'd like to be able write a Java program that can run an instance of a text editor, say NotePad or TextPad, with some text file open (I know how to do this via the Runtime class' exec method), but then, at a later point, open some other text file in

  • How to call a subvi to run in background?

    i have a timed loop which is gathering data and storing it in an array.  when the array reaches a certain size, i would like to store it to a file while continuing to process new data into the array quickly.  how can i pass the array to a file storag