[HR] Precise GET PERNR

Hi. When I use GET PERNR, all pernr are taken so it takes a long minute to complete. How can I limit number of PERNR who are taken by GET statement? For example I'd like to process only pernr from particular shop or particular organization. I'll be thankful for tips. Greetings. P.

I believe that the only thing that your you can do is to check manually with a CHECK after GET PERNR, of way that if it does not fulfill the conditions necessary, the PROVIDE continues with the following PERNR. Something like this:
GET PERNR.
check pernr-pernr in so_pernr.

Similar Messages

  • 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 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

  • Get pernr in screen 900 for ldb PNP

    hi All,
    I have created a program in HR-ABAP using ldb pnp and I have used the screen 900 [for get payroll]  Now for few employees when I use GET pernr, its nt giving ne results. as in the the program goes to end of selection. Now wen i change the screen to normal [ blank or 000], the get pernr for same employees gives me results. Can someone please explain the reason for above?
    thanks,
    RS

    Check whether the payroll run has taken place for the input employee numbers you are giving.
    You can check in the Tcode PC_PAYRESULT.

  • Get pernr in creen 900 for ldb PNP

    hi All,
    I have created a program in HR-ABAP using ldb pnp and I have used the screen 900 [for get payroll]  Now for few employees when I use GET pernr, its nt giving ne results. as in the the program goes to end of selection. Now wen i change the screen to normal [ blank or 000], the get pernr for same employees gives me results. Can someone please explain the reason for above?
    thanks,
    RS

    Hi Reena
    Check the status of employees for no result is displayed in 900 screen. Either they are active or payroll is run or not. That might be one of the reason. Another reason can be they are being open for the changes.
    Regards
    Waz

  • 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

Maybe you are looking for

  • Restructuring of xml file

    I have an xml file which fails validation against an xsd because the elements in a segment are not in the correct order. Is there any way to hit that mis-ordered xml file against the xsd to re-order it, other than doing it manually??

  • Oracle v.7.3.4.4 support

    Is Oracle v.7.3.4.4 is still supported by Oracle? I've been looking around the Oracle website and it appears that Oracle v.7.3.4 is supported, but I see there's a v.7.3.4.5 patch level. I'm wondering if you have to be at this latest patch level to be

  • Sync with Outlook via RDP?

    We have been using a number of TS servers for our users to access Outlook and MS Office apps for years now.  However, recently, we have purchased and deployed about 50 Blackberries.  We use BIS to set up their pop3 Outlook accounts.  I'm trying to fi

  • 9.3.2.163 Shuts Down EVERYTIME

    After updating I am getting "Adobe 9.3 has stopped working" Won't open a pdf, I can generate a report but can't get enough time to send it before the program freezes and must be closed. Vista - 64

  • Java Reporting

    hi there my problem is quite simple ... i dont have a free reporting tool available to make ma reports i have got one named "Report Cat" but it is an evaluation version ... the problem with it is that on every page of report it additional prints "Eva