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.

Similar Messages

  • 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

  • How to change data after getting an error in me51n,std purchase requisition

    how to make input field editable after getting an error message in ME51N,std purchase requisition
    Edited by: SQLFOLLOWER on Nov 18, 2009 1:00 PM

    Try this
    In user_command form...
    LOOP AT IT_DATA.
    IF  CHECKBOX __MARK EQ 'X'.
    write logic wht u want....
    ENDIF.
    ENDLOOP.

  • 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

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

  • 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

  • After getting a txt message from bell today saying I went over on my data usage , I can not access my web browsing at all... There is no restrictions on my account. But I still can't load safari

    After getting a txt message from bell today saying I went over on my data usage , I can not access my web browsing at all... There is no restrictions on my account. But I still can't load safari... I can still makes calls and send txt messages but I can't send iMessages

    Settings > General > Reset > Reset Network Settings.

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

  • Trying to restore after getting a new hard drive.  I can see the backup on the Time Capsule and on the correct date but it is Greyed out.  That is it wont let me open it and restore the machine.  Have tried also Migration Assistant, no luck.

    Trying to restore after getting a new hard drive.  I can see the backup on the Time Capsule and on the correct date but it is Greyed out.  That is it wont let me open it and restore the machine.  Have tried also Migration Assistant, no luck.

    https://discussions.apple.com/thread/5210788?tstart=0
    At startup hold down the Command+Option/Alt+r keys until you see a globe on the screen. Then use disk utility to partition and format the drive HSF+ and then select Reinstall Mac OS X. whatever version of OS X that originally came on your system will be installed and then you can upgrade back to Mavericks.

  • How can i get back my data after i restored my iphone and accidentally created a new iphone ac.

    how can i get back my data after i restored my iphone and accidentally created a new iphone ac.
    it did a back up when i started my restored iphone and i cant retrieve my previous backup while i didnt back up on icloud....
    the new ac is actually the same apple id as the one i used. I lost all my contact, photos and data of whatsapp...
    what can i do...help!

    I don't know if this is a similar problem but I wrote 2 notes yesterday on my iphone. I opened my mail to print them and they appeared as notes but wouldn't load. Then I looked at them on my iphone and I could see the notes but they quickly updated to blank with a time of the last edit the same time I tried opening them on my computer.
    Yesterday I updated to 4.3.4  I don't know if somehow that affected them. Are they stored somewhere else. Can I get them back?

  • How to get the previous state of my data after issuing coomit method

    How to get the previous state of some date after issuing commit method in entity bean (It should not use any offline storage )

    >
    Is there any way to get the state apart from using
    offline storage ?As I said the caller keeps a copy in memory.
    Naturally if it is no longer in memory then that is a problem.
    >
    and also what do you mean by auditlog?
    You keep track of every change to the database by keeping the old data. There are three ways:
    1. Each table has a version number/delete flag for each record. A record is never updated nor deleted. Instead a new record is created with a new version number and with the new data.
    2. Each table has a duplicate table which has all of the same columns. When the first table is modified the old data is moved to the duplicate table.
    3. A single table is used which has columns for 'table', 'field', 'data' and 'activity' (update, delete). When a change is made in any table then this table is updated. This is generally of limited useability due to the difficulty in recovering the data.
    All of the above can have a user id, timestamp, and/or additional information which is relevant to the data being changed.
    Note that ALL of this is persisted storage.
    I am not sure what this really has to do with "offline storage" unless you are using that term to refer to backed up data which is not readily available.

  • What is the first step of an abaper after getting the FDS

    what is the first step of an abaper after getting the Functional Document ?what we have to do? how to analyze it , and how to face such interview questions on FDS TDS . any resource available.

    Hi,
    After getting the FDS , first understand the functionality of the requirment or take the help of the functional consultant and then start preparing TS ( TEchnical Specification) and do coding  and get your doe reveirewed and prepare test cases and do testign in sand box and quality environment and after having got the confrimation that the requirment is met then port it to production.
    Regards,
    Irfan
    Note: Please award helpful answers.

  • Has anyone else had a problem with data? after updating my phone to the new update, i have all this data, and keep getting notifications that my data is getting high. i never had this problem before.

    has anyone else had a problem with data? after updating my phone to the new update, i have all this data, and keep getting notifications that my data is getting high. i never had this problem before.

    fair enough.  No need for any unnecessary posts either.  You issue had been addressed ad nauseum already in this forum had you bothered to search this forum (as forum etiquette would dictate) before posting.
    In any case, I hope that your problem was solved.

  • 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

  • Get PERNR in Dynpro on ABAP

    Hi,
    I`am developing a custom service for ESS on ABAP Dynpro.
    How can I get current employee PERNR inside of my ABAP implementation?
    The only way I know getting PERNR from 0105 i.t. using current sy-uname, but I dont like this solution.
    Is where any other way of getting current employee PERNR?
    thanks to all,
    Evgeny

    Hi Evgeny,
    It's probably best to post these types of questions in the HR/ABAP forums in the future. In any case, the only link between the employee record and the user record is IT 0105 so I'm afraid you don't have much choice there. If you don't want to access the employee record using SQL, I believe there is a function module called something like BAPI_EMPLOYEE_GET_DETAILS (check in SE37).
    Cheers,
    Dion

Maybe you are looking for

  • Upgraded to iTunes 7, get the error report window!

    I just upgraded to iTunes 7 from the most recent 6 version. When I tried to open iTunes, however, I got the Windows error message, "iTunes has encountered a problem and needs to close. " In the error report, it said that the file "C:\DOCUME~1\MAXWEN~

  • Delete duplicate rows -- based on 4 columns -- how?

    I asked this question on how to delete duplicates recently and received this suggestion which works well -- except -- With CTE AS SELECT *, ROW_NUMBER() OVER (Partition by fld1 order by fld1) RowNum FROM #tmpA DELETE From CTE WHERE RowNum > 1 -- the

  • Failed to Retrieve Data from the database.

    getting the following error message stating that Failed to retrieve data from the database. Details:4200:[Microsoft][ODBC SQL server Driver][SQL server] Incorrect syntax near 'Category ID', [Database Vendor Code: 102], i am not sure why I am getting

  • Any way to use an App Tab with exe File (such as Thunderbird.exe)?

    I'm trying to set up an App Tab in Firefox 4 Beta (9) to call up Thunderbird. But when I put the location of the exe file in the address window, Firefox sends me to the download manager, and won't open the file otherwise. I'm assuming you can't open

  • Asset Master - Business Area field [time dependent tab]

    Business Area field is gray with or without value if i create an asset either from scratch or with reference . I did check with u201CDefine Screen Layout for Asset Master Datau201D. & u201CSpecify Chart-of-Dep.-Dependent Screen Layout/Acct Assignment