GET PERNR usage

hello Abap Gurus:
Can any one please clarify me a question on GET PERNR Key word.
I know that get pernr statement gets all the infotype records for selected pernrs on the selection screen.
But my questiosn is whether get pernr access the database for each pernr selected on selection screen and process them or it gets all the infotypes data for selected pernrs in one shot.
if not then whether this is not a performance issue.
Please clarify me as i am a newbie in hr programming.
Thanks,
Sravanthi.

Hi Sravanthi,
It reads all employee numbers and related infotypes at one shot.
During debugging of the GET PERNR operation please check that SY-DBCNT value is always constant.
"The logical database reads all columns from all nodes that are not designated for field selection in the logical database and are superior to node on the access path of the logical database. "
Please check the link below:
http://help.sap.com/saphelp_nw70/helpdata/en/9f/db9aa335c111d1829f0000e829fbfe/content.htm
Regards,
Dilek
Edited by: Dilek Ersoz Adak on Jan 28, 2010 4:23 PM

Similar Messages

  • ABAP HR : Restriction of data after GET PERNR

    Hi Folks,
    I am using LDP PNP and using get statement. I am using multiple Infotypes. So all the Pxxxx are getting field with each GET PERNR. I have to extract last record which I am getting using RP_PROVIDE_FROM_LAST.
    Can I avoid getting all the data of a PERNR after GET PERNR or is there any other way to get only the latest record.
    Thanks
    Rahul

    Hi ,
    In my opinion i can infer your questions as ..
    suppose p0000 has 3 records for pernr 5125.
    Get PERNR.
    rpprovidefrom last -> triggers last date ..
    Here usage of rp provide allows u to pick the latest entry . Now you are asking the loading of p0000 should happen only with 1 record( instead of 3 ) .
    Get PERNR.
    --> here  u need to see p0000 with 1 entry only ..
    **rpprovide*from last -> triggers last date ..
    May be a check from initialization to restrict based on date entry within the interval .. and if in that interval there are two records i suppose it cannot pick one.. thats my opinion .. lets see if someone has a better solution .
    BR,
    Vijay.

  • How to get PERNR from employee search(teamviewer) iView in to a WD-4-ABAP.

    Hello All,
    I had developed a new Web Dynpro for ABAP (WD4A) component for updating a custom Infotype. This application is meant for the manager to maintain some specific data through portal for his employees in the team.
    WD4A application is built based on the employee number it receives from the portal.
         How could I get PERNR from employee search(teamviewer) iView in to my WD4A component?
    In portal I had developed a test page by copying the standard page from MSS com.sap.pct.erp.mss.general_information, and added my WD4A application through an iView into this page.
    Then I hided all the other iVews in the page except (1) employee search and (2)my WD4A iVew. On the preview everything appears fine.
    During the preview of this page it triggers the WDDOINIT of WD4A component main view and then the WDDOMODIFYVIEW. When I select an employee from the employee search, then it triggers only WDDOMODIFYVIEW in the WD4A application and not the WDDOINIT anymore.
    In my  WDDOMODIFYVIEW I had inserted the following code:
      DATA lo_api_component TYPE REF TO if_wd_component.
      DATA lo_portal_manager TYPE REF TO if_wd_portal_integration.
      lo_api_component = wd_comp_controller->wd_get_api( ).
      lo_portal_manager = lo_api_component->get_portal_manager( ).
      DATA lo_api_controller TYPE REF TO if_wd_view_controller.
      lo_api_controller ?= wd_this->wd_get_api( ).
      CALL METHOD lo_portal_manager->subscribe_event
        EXPORTING
          portal_event_namespace = 'urn:com.sap.mss.employeesearch'
          portal_event_name      = 'selection_changed'
          view                   = lo_api_controller
          action                 = 'GET_SELECTED_PERNR'.
    And in the action: 'GET_SELECTED_PERNR'
    METHOD onactionget_selected_pernr .
      DATA lv_str_pernr TYPE string.
      DATA lv_strlen TYPE i.
      DATA lv_pernr TYPE pernr_d.
      DATA lv_offset TYPE i.
      wdevent->get_string(
      EXPORTING
      name = 'PORTAL_EVENT_PARAMETER'
      RECEIVING
      value = lv_str_pernr ).
      lv_strlen = STRLEN( lv_str_pernr ).
      lv_offset = lv_strlen - 8.
      lv_pernr = lv_str_pernr+lv_offset(8).
    ENDMETHOD.
    This is not functioning form me. The action is not getting trigged with the code in WDDOMODIFYVIEW.
    I had gone through several threads in u2018SDN say:
         Pass pernr to WebDynro
         MSS - General Information - Related Activities Links persnr.
         SAP Note: 1112733.
    Most of the threads are answered but incomplete. In some threads people shared document personally which had been helpful.
    I am stuck with this scenario of handling the employee number from employee search iView. Helpful suggestions will be rewarded for sure.
    Thanks in advance.

    Do i understand you correctly that you are not getting the portal event ?
    This can be several reasons ?
    Both portal system and WDA server has to be in same domain and same proptocol to communicate with Portal event.
    Please check in that direction and search posts on this topic.

  • 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

  • How to use the class CL_PT_EMPLOYEE with GET PERNR?

    Hi,
    I saw this sample code on the forum.
    Is it more performant than using the "RP-PROVIDE-..." macros?
    Does the employee instance needs to be killed after each pass? How does it affects memory?
    start-of-selection.
    GET pernr.
    <b>* Create employee instance</b>
      gif_employee = cl_pt_employee=>get_employee( pernr ).
      go_employee ?= gif_employee.
    <b>* Append all other required infotypes to itab</b>
      APPEND '0003' TO gt_infotypes.
      CALL METHOD go_employee->get_infotypes
        EXPORTING
          i_itlist      = gt_infotypes
          i_fromdate    = id_fromdate  " start date
          i_todate      = id_todate    " end date
    *      I_FILTER      =
          i_noauthcheck = 'X'
        IMPORTING
          e_result      = gt_infty_request
          e_retcd       = gd_retcd.

    I think it that way. You are trying to compare and analyse old (don't say bad) programming school with a new (OO one) approach. Although, I am OO enthusiast and in any case I will try to convice you that OO aproach is better than classical one, you should know what SE30 was designed for. If you want to stress on OO design, use the one you mentioned, otherwise stick what SAP recommmends (please note, that I am "middle" school pupil, so I tried to learn all courses with my own experience and feelings from OO).
    IMHO, OO aproach is a way of thinking, not something we can messure in sec. and compare to old school teaching. Some of your report should be desinged in classical way, some should be pure OO. Which one you choose, is up to you, your conclusions, your percives of ABAP language. For me OO was not injected in ABAP enough, to affect developers or to convince them using it in any case w/o doubts you have.
    Regards
    Marcin

  • Function Module to get pernr number based on first name and last name

    Hi All,
    What is the Function Module to get pernr number based on first name and last name.
    Could you please help me.
    T@R.
    Vidya

    hi Vidya,
    you can get perner from PA0002 based on firs name and last name.
    use select query and get perner.

  • 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

  • Get Pernr

    Hi,
    I've written an abap program using the logical database PNP to select the employees record using the statement 'Get pernr'. I would like to know if there are ways to get the total number of records that can be selected.
    Thanks,
    Francis

    Thats not passible. Imagine having a select statement, there is no way of getting the number of resulting rows ahead the statement. you have tp process the select statement twice, first to get the amount, and then to ge tthe rows. in the first step you can optimize the select with count(*), but nevertheless, it is executed twice. So you have to execute the logical database in advance, there are funcion modules to do that. For performance reasons, thats not a good choice.
    On the other hand, when the get event is triggered and your program is getting the first rowm most work by the database is done and you're only fetching row by row.

  • 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

  • How to get the usage of SSRS reports in project server 2010

    Hi
    Can any body tell me how to get the usage of the SSRS reports in Project Server 2010.
    Thanks
    Geeth If you feel that the answer which i gave you is Helpful please select it as Answer/helpful.

    Hello,
    See the links below on how to get the usage for SSRS reports:
    http://sqlbadboy.wordpress.com/2013/09/12/reporting-services-reports-whos-using-them/
    http://www.mssqltips.com/sqlservertip/1908/analyze-report-execution-and-usage-statistics-in-sql-server-reporting-services/
    http://www.mssqltips.com/sqlservertip/1306/how-to-know-what-reporting-services-reports-are-being-used/
    Paul
    Paul Mather | Twitter |
    http://pwmather.wordpress.com | CPS

  • How to get CPU usage in the app?

    Is there any api that can get CPU usage through the code in an iphone app, thanks.

    Maybe you could use getloadavg():
    double la[3];
    getloadavg(la, 3);
    NSLog(@"%f - %f - %f", la[0], la[1], la[2]);

  • How to read personal no's on selection in LDB without using GET PERNR

    Hi to all
    I am using Logical data base PNP and selection screen 900.
    Now my requirement is to retrieve personal no's which are entered at selection seperately without using GET PERNR.
    Ineed all the pernrwhich are entered in selection.
    How to do that.
    Please guide.
    Regards
    Anubhav

    Hi,
    You can do as SUJIT said or use GET PERNR and assign PERN-PERNR to Workarea and then append that to internal table.
    DATA:
       ITAB_PERNR like standard table of PA0000-pernr,
       wa_pernr like line of ITAB_PERNR.
    GET PERNR.
    wa_pernr-pernr  = pernr-pernr.
    append wa_pernr to ITAB_PERNR
    Hope this would help you.
    Regards
    Narin Nandivada.

  • Regarding the get pernr function

    Hi guys,
              Got to know that when we use get pernr it automatically checks for the autherization on pernrs to view data.
        Would like to know who all have access to see which pernrs? Can i get any ideas on this....
    Thanks in advance
    Abhi

    Triggers the associated events when data is read in an executable (type 1) program using a logical database.
    node is a node in the logical database that is assigned to the report (type 1 program) in the program attributes. You must declare the node in the report using the NODES statement (or the TABLES statement, if the node is of the type "table").
    The node node corresponds to a data object of the same name.
    node is available for processing during the flow of the logical database. Moreover, you can also make reference to the fields from the node that lie on the access path for node in the logical database associated with the report - unless the node is of the dynamic dictionary type.
    Notes
    You can use the event "GET dbtab." only once in the report.
    The GET events are implemented internally as FORM routines. This makes all data objects declared with DATA local, that is, they are only recognized and addressable within the event. This also applies to AT SELECTION-SCREEN ....
    The logic is somewhat different for nodes of the dynamic dictionary type. You must declare these nodes in the report using the NODES node TYPE type statement. In this case, type a dictionary type from the logical database for the node node - that is, the type of the data object node assigned to the node node can differ in different reports. In this case, the data object node is local to the -GET event and has the structure type. Outside the -GET event, a (global) data object node also exists and has the static type assigned to the node. The actual data is, however, returned in the local field node and is available only within the -GET event.
    Example
    The program uses the logical database F1S which has a structure where the table BOOKING appears below the table FLIGHT.
    NODES: SFLIGHT, SBOOK.
    GET SFLIGHT.
      WRITE: SFLIGHT-CARRID,
             SFLIGHT-CONNID,
             SLFIGHT-FLDATE,
             SFLIGHT-PLANETYPE.
    GET SBOOK.
      WRITE: SBOOK-BOOKID,
             SBOOK-CUSTOMID,
             SBOOK-ORDER_DATE.

  • Authorizations with PNP and Get Pernr.

    We have just noticed an issue with how our custom reports are working in regards to authorizations.  Our users have authorization to see Basic Pay infotype information up to the point where an associate becomes an executive.  When running our reports the latest salary shows up instead of the last one they are allowed to see or just leaving that field blank.  We are using the PNP logical database and Get Pernr.  Isn't that supposed to pick up whatever authorization is assigned to the person?
    Thanks,
    Mary

    I do not know how you come to this statement. Of course LDB checks ALL HR Authorization defined. This incoporates the personnel administration part as well as the combination to structural authorizations.
    However PNP will skip a PERNR if the user has only partial authorization by default. To get also only the restricted data what the user can see you must use the switch PNP_SW_SKIP_PERNR = 'N' at INITIALIZATION point.
    Please see the documentation available here:
      http://service.sap.com/erp-hcm
    On the left side follow the links:
      Services for mySAP ERP HCM
        Special Documentation
    Regards,
    Michael

  • 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

Maybe you are looking for

  • Automatice settlement at activity level

    Dear All, In my project, i am getting a problem related to automatic settlment rule created at activity. By default system created settlment rule to above WBS based on strategy. In my case system is creating settlement rule but when i save the projec

  • Optimize double max queries, index plan not used.

    Hi, In my 9.2.0.8 I've got test case like : create table t (id1 number ,id2 number) ; begin for i in 1 .. 1000000 loop      insert into t values(i, i+10); end loop; end; create index id1 on t(id1) ; create index id2 on t(id2); exec dbms_stats.gather_

  • ACE timeout for different Serverfarms

    I have a Business unit that publishes an application that is externally available. We Reverse Proxy the VIP to allow the connection externally. They would like to impose different application timeouts for internal users (1 hour) and external users (3

  • Prob. Apache 2.0.59 and CF 7?

    hi there I have a running productive win32 server box running Apache 2.0.55 and ColdFusion MX 6.1 It hosts about 30 virtual domains, 2 with SSL. I used the Apache binaries provided by hunter (hunter.campbus.com). I need to upgrade that box and tried

  • No funciona adobe encore CS4 con windows 7

    Hola amigos: ya solucioné el tema con photoshop y premiere. Me sigue quedando el adobe encore que no quiere arrancar con el windows 7 instalado. Me dice que hay problema de incompatibilidad. ¿Alquien tiene la solución?. Desde ya muy agradecido. Javie