GET PAYROLL  And GET PERNR  Events .. Query

Hi All
I have used  Get Payroll  Event to fetch data from Database for Payroll Reporting.
It work fine for me till now..
But i am  not sure  that ,it can be used indiviusally  without GET PERNR Event.
And wht are the other conditions to be usedd in Get Payroll Event...
Regards
Lakhan

Pernr Is the personnel numbers
for a particular Country
Country you can use MOLGA
GET PERNR
GETPAYROLL
You can loop and get the resuults for the Employee for that particulat Country
Ok
Take Care

Similar Messages

  • PERNR is not read in GET PERNR event for some period..

    We have one ABAP report where we read financial data of our employees. But there is some PERNRs that is not read in the GET PERNR event the program skips to END-OF-SELECTION. I have all authorization to access this kind of data through other txn like PC_PAYRESULT. And this data appears in another ABAP reports. We've noted that the PERNRs that not appears doesn't have the Hiring Actions. And the data is read for this year 2007 but not to 2006 when the Action occurred. Does anyone knows what may be causing this?
    Thanks,

    When you say custom, you mean, not standard report right?
    TABLES: pernr.
    INFOTYPES: 0001.
    GET pernr.
    Verifica seleções
      CHECK pernr-werks IN pnpwerks.
      CHECK pernr-btrtl IN pnpbtrtl.
      CHECK pernr-plans IN pnpplans.
      CHECK pernr-kostl IN pnpkostl.
      CHECK pernr-abkrs EQ pnpxabkr.
      CHECK pernr-persg IN pnppersg.
      CHECK pernr-persk IN pnppersk.
      CHECK pernr-stell IN pnpstell.
      CHECK pernr-orgeh IN pnporgeh.
      CHECK pernr-orgeh IN pnpobjid.
      CHECK pernr-ansvh IN pnpansvh.
      CHECK pernr-stat2 IN pnpstat2.
      PERFORM seleciona_dados.
    END-OF-SELECTION.
      perform xyz.
    We use a custom report category with the fields:
    PNPXABKR
    PNPPABRJ
    PNPPERNR
    The program checks if PNPPERNR is not initial.
    When we executes it with PNPXABKR = 02, PNPPABRJ = 2006. Some PERNR does not are read. The programa skips to 'perform xyz'.  We found out that these PERNRs don't have the Action Hiring. We don't know if its because of it.

  • GET PERNR EVENT

    Hi experts,
    please tell me about the get pernr event and from which all tables data is fetched during the event.
    thanks,
    ajay

    Hi,
    GET is the command used in Logical database concept for fetching the data
    GET PERNR will fetch all the Pernr's one by one in a Loop like thing
    and for each pernr the data records in other infotypes have been processed
    and it goes on till all the pernr's are completed.
    see the sample code
    start-of-selection.
    Get PERNR from LDB
    get pernr.
    Get data from Respective Infotypes
    rp_provide_from_last p0001 space pnpbegda pnpendda.
    if p0001-kostl in pnpkostl.
    rep_tab-kostl = p0001-kostl.
    rep_tab-pernr = p0001-pernr.
    rep_tab-ename = p0001-ename.
    Get the Position Text
    clear t528t-plstx.
    select single plstx into t528t-plstx from t528t
    where plans = p0001-plans and
    otype = c_type and
    sprsl = sy-langu.
    if sy-subrc = 0.
    rep_tab-ptext = t528t-plstx.
    endif.
    Get the Cost Center Text
    clear cskt-ltext.
    select single ltext into cskt-ltext from cskt
    where spras = sy-langu and
    kokrs = c_kokrs and
    kostl = p0001-kostl.
    if sy-subrc = 0.
    rep_tab-ctext = cskt-ltext.
    endif.
    append rep_tab.
    clear rep_tab.
    endif.
    Regards,
    Harish

  • Get latepernr  and get pernr

    Hi all,
    can u explain the get event functionality ?
    Can u tell me the difference between
    get pernr and get late pernr.
    when should i use these type of statements ?
    Regards
    charan

    Hi Ravi,
    GET PERNR event initiates the data extraction for a pernr.
    GTE PERNR LATE event is triggered after all the other events are triggered and right before the end-of-selection.
    PL take a look at the following <a href="http://help.sap.com/saphelp_47x200/helpdata/en/ac/764da4496f11d3967200a0c9306433/frameset.htm">SAP Help</a> where it is explained very clearly.
    Regards,
    Suresh Datti

  • Is there a way to use 'GET PERNR' without the selection screens?

    I would like to use the GET PERNR event in a batch program without using the default selection screens.  I would like to be able to use my own selection screen and parameters, but only get them along with the default selection options for payroll period.  I've tried removing the screen number from the attributes screen, but still get these options.  Is this possible?

    hi Kiran,
    report Category is a Pushbutton on the Attributes popup, it only appears if you use PNP logical DB.
    this is from SAPHelp: "Report Category
    Category used for HR reports that use the PNP logical database. It controls the type and number of fields that appear on the selection screen of an evaluation report."
    hope this helps
    ec

  • Get pernr based on company code in logical databse

    Hi,
        When using the get pernr event, all the pernrs that I get are in the ascending order  I want them first grouped based on the company code and then on pernr.
    Any suggestions would be appreciated abd suitably rewarded.
    for ex: get pernr.
               write:/ pernr, bukrs.
             end-of-selection.
    result:   00000099 1001
              00000002 1003
    Regards
    Vick
    Message was edited by:
            vick vennav

    for ex: get pernr.
    write:/ pernr, bukrs.
    end-of-selection.
    result: 00000099 1001
    00000002 1003
    We are sending the payroll information to the 3rd party for pay check purposes, at my client side they have inserted a custom include in the standard program and populating the information in a flat file which needs to be sorted first based on company code and then on pernr. If I try to do it later,the code is becoming a mess, so I want to know is there a way to get pernr using logical database whose order is based on company code.
    Regards

  • Strange Behavior of GET PERNR

    Hi All,
    I am facing a strange behavior with GET Event for PNP LDB.
    In my selection-screen, i have fields like Payroll Area, Current Period, Other Period, personnel number.
    Usually, i populate Payroll area, other period(say 06-2007) and input some personnel number.
    When i tried to debug for one personnel, its not at all going into GET PERNR event...it directly goes to END-OF-SELECTION event.
    Please help on this.
    Regards,
    Kiran Chennapai

    Hi Manoj,
    The below is some part for my coding:
    START-OF-SELECTION.
      IF pnptimr9 = 'X'.
        PERFORM f_get_next_period.    "Take next period when the selection
        " is current period
      ENDIF.
    Get deatils of actions and pay-scales
      PERFORM f_get_data.
      CLEAR: g_num_processed, g_num_skipped, g_num_success, g_num_error.
    GET pernr.
      rp_provide_from_last p0001 space pn-begda pn-endda.
      IF pnp-sw-found = 1.
    Verify whether the personnel is under the given Payroll area or not
        CHECK p0001-abkrs = pnpxabkr.
        IF p_eegrp IS NOT INITIAL.
    Verify personnel's employee group is under the given EEgroup
          CHECK p_eegrp = p0001-persg.
        ENDIF.
    start processing for the selected personnel
        PERFORM f_process_data.
      ENDIF.
    END-OF-SELECTION.
    Do increment process for all the selected personnel
      IF NOT git_process[] IS INITIAL.
        PERFORM f_increment_process.
      ENDIF.
    When i tried to put a break-point at the first statement in the GET event and executed, its not going into GET event at all.(personnel number is existing in the system)
    Regards,
    Kiran Chennapai

  • After Get pernr

    Hi Sap Gurus,
    I am new to hr abapcolud clarify my doubts plzzzzzzz.
    After excuting our program in hr abap
    start-of-selection. will trigger am i correct
    in our program which infotype we have diclered those infotypes data comes in pnnnn  
    this pnnnn is internal table or structue,
    and after get pernr we will get that data into final internal table
    this get is event or what,  while i was debugging have seen that one as form
    Thanks,
    Prasad.

    PNNN is a structure
    The Pnnnn structure of the infotype is used as the field structure for the infotype entry screen
    When you declare an infotype using the INFOTYPES statement, an internal table Pnnnn with the structure Pnnnn is created and all records of the infotype are transferred to this table:
    At the GET PERNR event, the PERNR structure contains the data for a personnel number chosen on the basis of selection screen entries
    Data is retrieved at the GET PERNR event. The GET PERNR action is executed for all personnel numbers that were selected on the basis of selection screen entries
    GET PERNR fills the internal tables of infotypes that are declared for each employee using the INFOTYPES statement

  • Restrict GET PERNR

    Hi,
    I have a situation/special case when GET PERNR runs for all pernr.s (No input on selection screen of PNP LDB) where it causes unnecessary performance issue.
    Is there any way to execute GET PERNR event conditionally or run it for specific pernrs that I want.

    Hi,
    Why don't you just restrict them in selection screen?
    Anyhow if you don't what to do this and you know which EEs excatly you want to ommit do following.
    RANGES: ra_pernr FOR pernr-pernr OCCURS 0.
    "here hardcode all your EEs which you don't want to process. You either provide a range or add a row for each EE
    ra_pernr-sign   = 'I'.
    ra_pernr-option = 'EQ'.
    ra_pernr-low    = "lowest EE number or exact EE number
    ra_pernr-high  = "highest EE number or empty (if only one EE)
    APPEND ra_pernr.
    GET PERNR.
    check pernr-pernr not in ra_pernr.   "if EE is within the range he/she will be processed, otherwise next pernr is taken
    Alternativetly to last statement you can use
    GET PERNR.
    if pernr-pernr not in ra_pernr.
      REJECT.
    endif.
    ...but it will have same result
    Regards
    Marcin

  • Surpress GET PERNR?

    How do I suppress the GET PERNR event? I have a report where I do a table dump of T710 or output PA0008 based upon TAB selection. However, I want to prevent performance problem when I just want to dump T710 table. The GET PERNR event seems to output regardless of what TAB is selected. Here is a sample code:
    START-OF-SELECTION.
      CASE P_TABSEL.
        WHEN 'T510'.
          P_IT08CHECK = ''.
          PERFORM 100.
        WHEN 'T710'.
          P_IT08CHECK = ''.
          PERFORM 110.
        WHEN 'IT08'.
          P_IT08CHECK = 'X'.
            GET PERNR.
        WHEN 'T510U'.
          P_IT08CHECK = ''.
          PERFORM 130.
      ENDCASE.
    This doesn't work because I can't encapsulate the "GET PERNR" in an IF statement of in the FORM statement. Any idea how to ONLY activate the GET PERNR event when I have a particular tab selected?

    Some clarification on the meaning of GET might help you out in the future.  It is a commonly misunderstood ABAP statement.  GET looks like a verb, sort of like MOVE, but it is really the name of an SAP event, just like other events like AT SELECTION-SCREEN and START-OF-SELECTION.
    Whenever I teach new ABAPers about GET, I tell them to think of this as a noun rather than a verb.  So instead of thinking GET, think of WHEN.
    So GET PERNR is really an event called WHEN PERNR and means that when the LDB has a PERNR row available, invoke the code you have attached to event GET PERNR.  Trying to bury the statement GET PERNR inside other executable ABAP statements like IF and FORM is not supported because your code does not decide when to do this, it is decided by the LDB.  In fact if you code the following:
    IF condition.
      GET PERNR.
    ENDIF.
    What the compiler sees is an event called GET PERNR.  The start of an event, ends the previous event.  If you never specified an event then the default event is START-OF-SELECTION.
    So the previous event is ended, but we have an IF without an ENDIF.  If the compiler could get past that error, the next error would be an ENDIF without an IF.
    As an aside, if you have ever wondered where the ABAP events START-OF-SELECTION and END-OF-SELECTION got their names, START-OF-SELECTION represents the start of selection by the LDB before any data is returned to your program.  Likewise, END-OF-SELECTION represents the fact that the LDB has finished returning data to your program.

  • GET PERNR header details

    Hello all,
    I understand the basic concept of the GET PERNR command but I wanted to clarify something.
    In the logical database PNP, after the GET PERNR event, does the 'header' information in the structure PERNR contain the combination of the person's 'latest' infotype records?
    For example:
    - someone has a current surname of SMITH but had a previous surname of JONES in IT0002
    - will the field PERNR-SNAME contain SMITH?
    - will their PERNR-WERKS and PERNR-BTRTL contain their current values
    Also, are the selection dates PN-BEGDA and PN-ENDDA considered when determining these 'latest'  PERNR values or is the end date '99991231' assumed.
    Many thanks in advance,
    Keiron.

    See the following example:-
    REPORT zemployee.
    TABLES: pa0000.
    DATA:
    go_employee TYPE REF TO cl_pt_employee,
    gd_infty TYPE infty,
    gt_infty TYPE tim_tmw_itlist_tab,
    gt_result TYPE tim_blp_request_tab,
    gd_result LIKE LINE OF gt_result,
    go_data TYPE REF TO cl_pt_td_itnnnn,
    gs_prelp TYPE prelp, " HR Master Data Buffer
    gs_p0009 TYPE pa0009. " HR Master Record: Infotype 0009 (Bank
    " Details)
    FIELD-SYMBOLS:
    TYPE ANY.
    PARAMETERS:
    p_pernr TYPE pa0000-pernr DEFAULT '00900222',
    p_begda TYPE begda DEFAULT syst-datum,
    p_endda TYPE endda DEFAULT syst-datum.
    START-OF-SELECTION.
    go_employee ?= cl_pt_employee=>get_employee( p_pernr ).
    CALL METHOD go_employee->get_master_data
    EXPORTING
    im_begda = p_begda
    im_endda = p_endda
    IMPORTING
    EX_I0000 = " infotype 0000 = Actions
    EX_I0001 = " infotype 0001 = Organizational Assignment
    EX_I0002 = " infotype 0002 = Personal Data
    EX_I0007 = " infotype 0007 = Planned Working Time
    EX_I0008 = " infotype 0008 = Basic Pay
    Using this method you can access any infotype(s)
    APPEND '0009' TO gt_infty. " Bank Details
    APPEND '0010' TO gt_infty. " Capital Formation
    CALL METHOD go_employee->if_pt_employee~get_infotypes
    EXPORTING
    i_itlist = gt_infty
    i_fromdate = '20000101'
    i_todate = syst-datum
    I_FILTER =
    i_noauthcheck = ' ' " do authority check (if required)
    IMPORTING
    e_result = gt_result.
    E_RETCD =.
    LOOP AT gt_result INTO gd_result.
    go_data ?= gd_result->data.
    Get infotype in semi-transparent form
    gs_prelp = go_data->if_pt_td_infotype~get_prelp( ).
    Convert: semi-transparent -> transparent infotype
    CALL METHOD cl_hr_pnnnn_type_cast=>prelp_to_pnnnn
    EXPORTING
    prelp = gs_prelp
    IMPORTING
    pnnnn = gs_p0009.
    ENDLOOP.
    Print-Out infotype data
    DO.
    ASSIGN COMPONENT syst-index OF STRUCTURE gs_p0009 TO .
    IF ( syst-subrc NE 0 ).
    EXIT.
    ELSE.
    WRITE: / .
    ENDIF.
    ENDDO.
    END-OF-SELECTION.

  • Authorization failuar at GET Pernr in LDB

    Hi,
    How to check exactly where there is no authorization for pernr in GET pernr event?
    I searched it in forum but cud not get exact answer. I can see ORGIN ORGXX and PERNR for AUTSW set to 1.
    Thanks in advance.

    Hi,
       Please check in Tcode OOAC if authorization switch is set to 1 for PERNR.
       For more info please read the object documentation for AUTHORITY-CHECK OBJECT P_PERNR.
    Regards,
    Srini.

  • Question on GET PERNR.

    Hi all,
    when I using GET PERNR, this is a loop , right ?
    currently, I have no idea about where the value comes from to get into this 'PERNR' structure, pa0000 or pa0001 or any other place?
    Thanks!

    Hi,
    GET PERNR 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.
    Below is a sample code, may help you understand the logic behing GET PERNR
    tables: pernr.
    infotypes: 0000,
                0001,
                0002,
                0019,
                0041,
                0396,
                9009.
    start-of-selection.
    get pernr.
       provide * from p0396 between pn-begda and pn-endda.
         perform refresh_tables.
         call function 'HR_READ_INFOTYPE'
           exporting
             pernr     = p0396-pernr
             infty     = '0396'
             begda     = pn-begda
             endda     = pn-endda
           tables
             infty_tab = i_p0396.
         sort i_p0396 by begda descending.
         read table i_p0396 index 1.
    endprovide.
    end-of-selection.
    Check this as well:
    [http://sapabap.iespana.es/sap/info/hr_overview.htm|http://sapabap.iespana.es/sap/info/hr_overview.htm]
    Hope this help you.
    Edited by: Lokesh Tarey on Jul 15, 2010 6:06 AM

  • Error return immediately using GET pernr (PNP logical db)

    I have a requirement to use HR PNP logical database for a report. The report should display the values from employee's infotypes. Should the user does not have authorisation on one or more infotype, the column field for that infotype should be left blank.
    I tried using 'Get Pernr' but system will return error immediately that user does not have authorisation on any of the infotypes. Please advice how should I code my report in order to fit into my requirement.

    There is afunction module to disable the infotype authorization check ( do a wildcard search in se37 for 'HRINFAUTH* ).. call that before the Get Pernr event & implement explicit authzn checks in your program..
    ~Suresh

  • Don't use GET PERNR error

    Hello Experts,
    I'm trying to write a code using GET PERNR statement for every first time but keeps getting the error when try to execute my code. Here is the error (Do not use the GET PERNR event).
    Can somebody please help me rectify this error. For reference here is my code.
    report  zad_hr_test line-size 200.
    *Database Table
    tables: pernr,           " Pernr structure for Logical database
            pa0001,           " Actions
            pa0002.           " Personnel Info
    *Infotypes
    infotypes: 0001,         " Actions
                0002.         " personnel info
    *Variable Declaration
    data: form_nam like p0001-ename,
           v_age(5) type c,       "variable for calculating age in days
           v_ctr1 type i value 0, "counter
           v_ctr2 type i value 0, "counter
           var(5) type c ,        " variable to store btrtl
           var1(5) type c  .      " variable to store werks
    *Internal Table Decalartion
    data: begin of i_tab1 occurs 0,
            werks like pa0001-werks,  "personnel area
            btrtl like pa0001-btrtl,  "personnel sub area
            pernr like pa0001-pernr,  "employee number
            ename like pa0001-ename,  "employee name
            begda like pa0002-begda,  "employee join date
            persg like pa0001-persg,  "employee group
            persk like pa0001-persk,  "employee sub-group
            plans like pa0001-plans,  "position
            gbdat like p0002-gbdat,   "date of birth
          end of i_tab1.
    *START-OF-SELECTION
    start-of-selection .
    get pernr .
    i_tab1-pernr = pernr-pernr.
       rp_provide_from_last p0001 space pn-begda pn-endda .   " Macro for IFT-0001
       rp_provide_from_last p0002 space pn-begda pn-endda .   " Macro for IFT-0002
    **--> Populate internal table
       move p0001-werks to i_tab1-werks .
       move p0001-btrtl to i_tab1-btrtl .
       move p0001-pernr to i_tab1-pernr .
       move p0001-ename to i_tab1-ename .
       move p0002-begda to i_tab1-begda .
       move p0001-persg to i_tab1-persg .
       move p0001-persk to i_tab1-persk .
       move p0001-plans to i_tab1-plans .
       move p0002-gbdat to i_tab1-gbdat .
    **--> Append data to internal table
       append i_tab1 .
       clear i_tab1 .
       loop at i_tab1.
         write:/ i_tab1-werks,
                 i_tab1-btrtl,
                 i_tab1-pernr,
                 i_tab1-ename,
                 i_tab1-begda,
                 i_tab1-persg,
                 i_tab1-persk,
                 i_tab1-plans,
                 i_tab1-gbdat.
       endloop.
    Many thanks in advance.

    Hi,
    You're asking a different question now, so you should start a new thread...
    Anyway, in the 'Attributes' screen of your program you can specify which selection screens you want to display for a logical database.
    Alternatively you can hide all (or part) of a selection screen at the 'selection-screen output' event.
    For example:
    at selection-screen output.
      loop at screen.
       check screen-name = 'PNPABKRS-HIGH'
          or screen-name = 'PNPABKRS-LOW'.
       screen-input = '0'.
       screen-output = '0'.
       screen-invisible = '1'.
       screen-active = '0'.
       modify screen.
      endloop.
    cheers
    Paul

Maybe you are looking for

  • How do I import a file from Adobe Reader XI into InDesign CC 2014?

    Have tried to start using this programme, but with no success with regard to opening a file which I saved under Adobe Reader XI as a PDF. It is a small book which I want to convert to an EBook. How do I start please? Tony L

  • Re: Satellite P750 with 2 external monitors

    Hi, I am just wondering if it is possible to have two "external" LCD monitors connected to my Toshiba Satellite P750? One on the VGA and the other one on the HDMI perhaps? Cheers Niels

  • Axis timeout error when running long query

    Hi all, we've encountered a timeout problem trying to call webservice that responses in long delay. Error we got comes from axis library: java.net.SocketTimeoutException: Read timed out As I know, default timeout value for axis is 60 s. Is there any

  • HD on Apple TV3

    I have latest version of iTunes and Final Cut Studio Bur I can not find a setting as iTunes accept My footage is 1440 * 1080 How do I export so I can use it on ATV3?

  • Localization in the XML

    Okay, I realize not many of you will know this, but I'm hoping there's a chance we've got another XML hacker out here. In the XML, there's an attribute for localization. It's used on any page where the template provides a fixed text element for you,