Using Get PERNR

Hi,
When using GET PERNER, is it possible to add any extra field in the selection screen say for example a numeric field where user can enter a number or I can only use the fields provided for PERNR?
Thanks,
Gaurav

Hi Gaurav
When you link a LDB to your program, its predefined selection screen is automatically inserted. In HR, you can select from the report category which affects the selection screen. You can see the report categories at the status bar of the "Attributes" window of your program provided that it is linked to a LDB. You can also create your own report categories.
Using the "parameters", "select-options", etc... you can insert additional criteria for your selection screen which will be displayed under predefined ones.
Regards
*--Serdar <a href="https://www.sdn.sap.com:443http://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.sdn.businesscard.sdnbusinesscard?u=qbk%2bsag%2bjiw%3d">[ BC ]</a>

Similar Messages

  • 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

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

  • 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

  • Use GET PERNR without any screen default from Logical DB.

    Could anyone help me how to avoid using screen default from logical DB if using GET PERNR?

    Are u saying using this logic below  , im can avoid using GET PERNR?
    TABLES: RP50G,PERNR,PYORGSCREEN,PYTIMESCREEN.
    DATA: IN_RGDIR LIKE PC261 OCCURS 0 WITH HEADER LINE,
          WA_RT LIKE PC207 OCCURS 0 WITH HEADER LINE,
          SEQNR LIKE PC261-SEQNR,
          RESULT TYPE PAY99_RESULT.
    DATA: M_START LIKE SY-DATUM,
          M_END LIKE SY-DATUM.
    FORM GET_PAYROLL USING P_PERNR M_START M_END.
    *This FM help us to get the Sequence number used for the
    *employee on the payroll.
      CALL FUNCTION 'CU_READ_RGDIR'
           EXPORTING
                PERSNR          = P_PERNR
           TABLES
                IN_RGDIR        = IN_RGDIR
           EXCEPTIONS
                NO_RECORD_FOUND = 1
                OTHERS          = 2.
    *We read it using two dates, which corresponds to the month *we need
      READ TABLE IN_RGDIR WITH KEY FPBEG = M_START
                                   FPEND = M_END.
      SEQNR = IN_RGDIR-SEQNR.
    *This FM actually reads the payroll and get the information
    *we need.
      CALL FUNCTION 'PYXX_READ_PAYROLL_RESULT'
           EXPORTING
                CLUSTERID                    = 'XX'
    *In CLUSTERID use the country of your choice
                EMPLOYEENUMBER               = P_PERNR
                SEQUENCENUMBER               = SEQNR
                READ_ONLY_INTERNATIONAL      = 'X'
           CHANGING
                PAYROLL_RESULT               = RESULT
           EXCEPTIONS
                ILLEGAL_ISOCODE_OR_CLUSTERID = 1
                ERROR_GENERATING_IMPORT      = 2
                IMPORT_MISMATCH_ERROR        = 3
                SUBPOOL_DIR_FULL             = 4
                NO_READ_AUTHORITY            = 5
                NO_RECORD_FOUND              = 6
                VERSIONS_DO_NOT_MATCH        = 7
                OTHERS                       = 8.
    *We just need to read the result table.
      LOOP AT RESULT-INTER-RT INTO WA_RT.
        CASE WA_RT-LGART.
          WHEN '9010'.
             MOVE WA_RT-BETRG TO T_ANYTABLE-SOMEPAY.
        ENDCASE.
      ENDLOOP.
    ENDFORM.

  • Without using GET PERNR, how to retierve data in HR ABAP Reports

    Hi Experts,
    How to retrieve the data without using GET PERNR, by using function modules in HR ABAP Reports.
    Thanks.
    Naveen.

    Hi,
    U can use HR_READ_INFOTYPE Function Module in Place of GET PERNR.
    Go through the following link it will give the example of that FM.
    http://www.experts-exchange.com/Database/Software/ERP/SAP/Q_20781600.html
    <REMOVED BY MODERATOR>
    Edited by: subas  Bose on Feb 15, 2008 2:46 PM
    Edited by: Alvaro Tejada Galindo on Feb 15, 2008 3:06 PM

  • 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 extract current record using get pernr (logical database)

    Hi all,
    I am using logical database in the program and using <b>get pernr</b> method. But there are multiple entries in the infotype for a perticular employee. i want to extract employees current record whose end date is greater than sy-datum.
    how to do this using <b>get pernr</b>?
    Thanks in advance.

    Hi Priti,
    Get Pernr statement will get all the records for each employee spcicified for the Begin and End dates on the selection screen and store in an internal table for the infotypes declared in the infotypes statement.
    You need to read this table and copy only the records that meet the date criteria in an internal table for further use.
    For Ex:
    infotypes : 0001.
    tables : pernr.
    TYPES : BEGIN OF ty_kostl,
             pernr TYPE pernr-pernr,
             kostl TYPE p0001-kostl,
             ename TYPE p0001-ename,
            END   OF ty_kostl.
    Work Areas
    DATA : g_kostl_wa  TYPE ty_kostl.
    Internal Tables
    DATA : i_kostl  TYPE TABLE OF ty_kostl.
    start-of-selection.
       get pernr.
       PROVIDE * FROM p0001 BETWEEN pn-begda AND pn-endda.
        if p0001-endda GT sy-datum.
           g_kostl_wa-pernr = p0001-pernr.
           g_kostl_wa-kostl = p0001-kostl.
           g_kostl_wa-ename = p0001-ename.
           APPEND g_kostl_wa TO i_kostl.
           CLEAR  g_kostl_wa.
        endif.
      ENDPROVIDE.

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

  • 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

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

  • HR-stopping Get Pernr from triggering

    hi,
    My selection-screen is combination of PNP + other Fields
    i am using GET PERNR to retrive values..
    my Problem is that When no values is given in PNP fields , i want to Skip
    GET PERNR statement.but i am unable to do it..
    Kindly give some solution.

    hi,
    check the fields whether they are initial or not.
    if the PNP fields are initial then dont process the GET PERNR.
    Dummy code.
    If not PNP-fields initial.
    GET PERNR.
    Endif.
    <b>Reward points if useful</b>
    chandra

  • Internal table & get pernr

    hi frriends,
    i am doing the hr programming for the first time & have a doubt.
    when we extract the data using
    get pernr & provide * from pxxxx
    & then we move the data into corresponding itab
    after that when we write the result with loop  at itab,
    it gives strange output.
    actually, after the endloop again it goes to 'get pernr' & again it executes the same whole sequence.
    can anybody help me understanding this concept
    thanks
    abhay

    hi bharat,
    thanks for the reply.
    the code is something like this
    DATA: BEGIN OF i_tab1 OCCURS 0,
          pernr like p0000-pernr,
          stat2 like p0000-stat2,
          abkrs like p0001-abkrs,
          plans like p0001-plans,
          END OF i_tab1.
    GET pernr.
      PROVIDE pernr stat2 FROM P0000
              abkrs plans FROM P0001
              BETWEEN sy-datum AND sy-datum.
       ENDPROVIDE.
        MOVE p0000-pernr TO i_tab1-pernr.
        MOVE p0000-stat2 TO i_tab1-stat2.
        MOVE p0001-abkrs TO i_tab1-abkrs.
        MOVE p0001-plans TO i_tab1-plans.
        APPEND i_tab1.
      LOOP AT i_tab1.
        write:/ i_tab1-pernr, 15 i_tab1-stat2, 35 i_tab1-abkrs,
       50 i_tab1-plans.
      ENDLOOP.
    It gives me output like:
    12340001      1         v1      99999999
    12340001      1         v1      99999999
    12340002      1         v1      99999999   
    12340001      1         v1      99999999
    12340002      1         v1      99999999
    12340003      1         v1      99999999
    12340001      1         v1      99999999
    and so on
    if i dont use loop....endloop, it gives me proper results.
    Also i am trying few things like deleting duplicates, sorting etc. on itab but not working.
    can you please tell me why is it so?
    thanx in advance
    abhay

  • 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

Maybe you are looking for

  • Looking for a "desktop search" app

    I am using kde, and I am searching for a desktop search app that uses a database and searches within common filetypes.  I've tried a couple so far, and haven't found what I'm looking for: kerry/beagle:WAAAY too much bloat; creates ~2gigs of logs per

  • Assignment of production order to network

    Hi, How can we assign a production order to the network or vice versa. I know the WBS can be assigned to production order through assignment tab in production order. Thanks, Santhosh

  • Where is the mic for talk to text in ios7?

    I use the talk to text function all the time - or did until the mic disappeared when I downloaded ios7.  Has anyone had this issue - is it resolvable?  THX!

  • Preview slide show-but not full screen?

    Seems to me I recall seeing an option to NOT preview the slideshow full screen. But can't find it now. I would like to view the slide show while keeping Pages on screen so I can take notes. Is there any way to do that? Thanks.

  • Where in the function palette can i find the "logical shift" function (shift x by y bits)?

    i am not able to find the "logical shift" function anywhere on the functions palette (after searching EVERY where). however, i discovered the function elsewhere in another VI (by pure luck!). i could keep bringing up these VI and copying and pasting,