Regarding HR_READ_INFOTYPE.

Hi All,
I have an internal table itab_ssn which contains pernr like '00060119'.
I am using function module "HR_READ_INFOTYPE" and passing this pernr to read details of infotype 0001
into table itab_0001. But in this table i am getting pernr like '60119000'.
I am not getting why.
Can anyone tell me please.
CALL FUNCTION 'HR_READ_INFOTYPE'
    EXPORTING
*   TCLAS                 = 'A'
      pernr                 = itab_ssn-pernr            " Here pernr is '00060119'
      infty                 = '0001'
*   BEGDA                 = '18000101'
*   ENDDA                 = '99991231'
*   BYPASS_BUFFER         = ' '
*   LEGACY_MODE           = ' '
* IMPORTING
*   SUBRC                 =
    TABLES
      infty_tab             = itab_0001            "When we loop on this itab pernr is '60119000'
* EXCEPTIONS
*   INFTY_NOT_FOUND       = 1
*   OTHERS                = 2
  IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  ENDIF.
Regards,
Nidhi Srivastava.

Hi Nidhi,
Please check manualy through tcode:- SE37. Its return same or not......
I think u r define internal table itab_0001 like PA0001... (If define PA0001.. please define P0001)......

Similar Messages

  • Regarding the Function module HR_READ_INFOTYPE

    Hi Experts,
    I'm using the Function module HR_READ_INFOTYPE and the code is as following
    CALL FUNCTION 'HR_READ_INFOTYPE'
            EXPORTING
              pernr     = g_pernr
              infty     = '0002'
            TABLES
              infty_tab = it0002.
          CLEAR wa0002.
          READ TABLE it0002 INTO wa0002 WITH KEY pernr = g_pernr.
    it is not fetching the data for a particular PERNR but the sy-subrc is 0 after the executing the Function module.
    Please help me out.
    Thanks
    Nivash S

    Hi Experts,
    Thanks for Ur advice. Actually there is no authorization for that particular PERNR thats why it has skipped that particular record.
    Thanks Once again,
    Nivash S
    Edited by: Nivash S on May 12, 2009 8:49 AM

  • HR_READ_INFOTYPE...not working.. for infty 2011

    hi
    i have just put this code and its not working for the pernr for which i have data..which i can c in pa20 transaction.
    actually its throwing exceptionn as infotype not found.
    where as 2011 is std infotype...
    DATA : p_2011 TYPE STANDARD TABLE OF p2011 WITH HEADER LINE.
    start-of-selection.
    get pernr.
    CALL FUNCTION 'HR_READ_INFOTYPE'
          EXPORTING
            pernr     = pernr-pernr
            infty     = '2011'
          TABLES
            infty_tab = p_2011
           EXCEPTIONS
       INFTY_NOT_FOUND       = 1
       OTHERS                = 2.
    end-of-selection.
    plz help me
    regards
    vivek

    The previous response is correct.. Time Events are stored in the TEVEN db Table.. the Infotype 2011 is only a frontend to load this table.. you cannot use HR_READ_INFOTYPE in this case as the Infotype 2011 table ( PA2011 ) doesn't exist. PL go through the following <a href="http://help.sap.com/saphelp_erp2005/helpdata/en/8a/98589346c411d189470000e829fbbd/frameset.htm">SAP Help</a> on Infotype 2011.
    You can use the function call HR_EVENT_READ to read the Time events data displayed on Infotype 2011.
    ~Suresh

  • Function 'HR_READ_INFOTYPE'  not fetching any records in rfc

    Hi All,
       We have created a custom info type 9110 , we have a wrapper RFC build around the function 'HR_READ_INFOTYPE' to read the data from it as we have a separate web dynpro ECC 6.0 system and a 4.7 back end system.
       The rfc is working correctly in the 4.7 system but when we call it from the we dynpro system it does not return any records.
       Is this a problem with the function 'HR_READ_INFOTYPE' ?
    Thanks & Regards
    Gaurav Jain

    hi check this..
    there is no problem with the function module but there may be some wrong data passing into the input of the fm ....mainly at the dates ....the date format is inportant ....otherwise it will not return any thing...

  • FM HR_READ_INFOTYPE to read records from 3 infotypes

    Hi all,
    I am writing a report using PNP as my LDB. So there is a selection screen which can takes in the pernr and the dates as begda and endda. Based on this scenario, how do you normally use this FM 'HR_READ_INFOTYPE' to all the records from let say 2 fields from infotype p0000, 2 fields from p0001 and 3 fields from infotype p9999?

    Hi,
    Since your are using PNP logical data base,  I recomended extract the information via  begda and endda limits for each infotype, ie.
    GET PERNR.   " fill all infotypes
    rp_provide_from_last p0001 space pn-begda pn-endda.   "extracts the records that meet the criteria
    IF pnp-sw-found = '1'.               "If found records DO ... whatever you want
      write:/ 'Infotipo P001: ', p0001.
    ELSE.
      REJECT.                                  "If not fount records ... next record.
    ENDIF.
    This example with  infotype 0001, tha same method to infotype 0000, infotype 0002,  to infotype 9999.
    Regards
    José Luis.
    Edited by: Aguirre Eguiluz Jose Luis on Dec 9, 2010 10:32 AM
    Edited by: Aguirre Eguiluz Jose Luis on Dec 9, 2010 10:33 AM
    Edited by: Aguirre Eguiluz Jose Luis on Dec 9, 2010 10:34 AM

  • Read infotype using HR_READ_INFOTYPE

    Hi all,
    I Try to read infotype (pa0021) using HR_READ_INFOTYPE. Its getting fine.
    Im using Web Dynpro ABAP Interactive form.
    I want to insert some value in infotype pa0021, so i used HR_INFOTYPE_OPERATION.
    Data's are Inserting.
    The problem is if i press the Save button, Inserting values are not getting, when i use HR_READ_INFOTYPE in the same session. The new values are updated in the Backend but its not getting
    in the same session. because if i press the save button means, i want to save the data and again i want to show the saved data back .But if i close the session and open once again means its reflection the new values.
    I used BAPI_TRANSACTION_COMMIT also but i no success.
    Please Give some solution for this problem, its very urgent.
    Thanks & Regards,
    Hemachandran.R
    Edited by: hemachandran R on Oct 22, 2008 8:54 AM
    Edited by: hemachandran R on Oct 22, 2008 8:54 AM

    Hi hemachandran R ,
    When all your conditions are satisfied, You can get the updated values from the contexts which you are using to update in the contexts by which you are displaying it on the screen.
    You need not to fetch the data from the back end.
    Regards,
    Rohit

  • Reading Infotype using HR_READ_INFOTYPE

    Hi all,
    I Try to read infotype (pa0021) using HR_READ_INFOTYPE. Its getting fine.
    Im using Web Dynpro ABAP Interactive form.
    I want to insert some value in infotype pa0021, so i used HR_INFOTYPE_OPERATION.
    Data's are Inserting.
    The problem is if i press the Save button, Inserting values are not getting, when i use HR_READ_INFOTYPE in the same session. The new values are updated in the Backend but its not getting
    in the same session. because if i press the save button means, i want to save the data and again i want to show the saved data back .But if i close the session and open once again means its reflection the new values.
    I used BAPI_TRANSACTION_COMMIT also but i no success.
    Please Give some solution for this problem, its very urgent.
    Thanks & Regards,
    Hemachandran.R
    Edited by: hemachandran R on Oct 22, 2008 9:02 AM

    Hi Hema,
    Make a new context attribute 'ca_temp'
    and then
    set single attribute
            lo_el_context->set_attribute(
              EXPORTING
                name =  `CA_TEMP`
                value = <new_value> ).
    And use this CA_TEMP where ever you want. for more than one value make node in place of attribute.
    Hope it works.
    Regards,
    Rohit

  • HOW to use HR_READ_INFOTYPE FM

    Hi Guy's,
    How to use " HR_READ_INFOTYPE" Function module.
    Thanks and Regards,
    Bhavani

    hi use this,
    *& Report  ZVENKAT_03
    REPORT  ZVENKAT_03.
    tables:p0002.
    data: it_data type p0002 occurs 0 with header line.
    data: it_data1 type p0008 occurs 0 with header line.
    data:v_name1 like p0002-cname,
         v_date like p0041-dat01.
    data:begin of it_p0002 occurs 0,
         pernr like p0002-pernr,
         begda like p0002-begda,
         endda like p0002-endda,
         vorna like p0002-vorna,
         nachn like p0002-nachn,
         end of it_p0002.
    data:begin of it_p0008 occurs 0,
         pernr like p0008-pernr,
         begda like p0008-begda,
         endda like p0008-endda,
         ansal like p0008-ansal,
         bet01 like p0008-bet01,
         preas like p0008-preas,
         end of it_p0008.
    parameters:p_pernr like p0002-pernr.
    start-of-selection.
    CALL FUNCTION 'HR_READ_INFOTYPE'
      EXPORTING
        pernr                 = p_pernr
        infty                 = '0002'
      TABLES
        infty_tab             = it_data.
    if sy-subrc eq 0.
    it_p0002-pernr = it_data-pernr.
    it_p0002-begda = it_data-begda.
    it_p0002-endda = it_data-endda.
    it_p0002-vorna = it_data-vorna.
    it_p0002-nachn = it_data-nachn.
    append it_p0002.
    clear it_p0002.
    endif.
    CALL FUNCTION 'HR_READ_INFOTYPE'
      EXPORTING
        pernr                 = it_data-pernr
        infty                 = '0008'
       BEGDA                  = it_data-begda
       ENDDA                  = it_data-endda
      TABLES
        infty_tab             = it_data1.
    if sy-subrc eq 0.
    it_p0008-pernr = it_data1-pernr.
    it_p0008-begda = it_data1-begda.
    it_p0008-endda = it_data1-endda.
    it_p0008-ansal = it_data1-ansal.
    it_p0008-bet01 = it_data1-bet01.
    it_p0008-preas = it_data1-preas.
    append it_p0008.
    clear it_p0008.
    endif.
    sort it_p0002 by pernr begda.
    read table it_p0002 index 1.
    write:/ it_p0002-pernr,it_p0002-begda,it_p0002-endda,it_p0002-vorna,it_p0002-nachn.
    sort it_p0008 by pernr.
    read table it_p0008 with key pernr = it_p0002-pernr.
    write:/ it_p0008-pernr,it_p0008-begda,it_p0008-endda,it_p0008-ansal,it_p0008-bet01,it_p0008-preas.
    sort it_p0008 by pernr.
    read table it_data1 index 2 .
    write:/ it_data1-ansal.
    regards,
    venkat.

  • Subtype in HR_READ_INFOTYPE

    Hi
    i have a requirement where i need t fetch subtype specific data from infotype '0006' using HR_READ_INFOTYPE.
    how do we get this done?
    Thanks & Regards
    Manjari

    >
    Marat wrote:
    > Yes, I agree with you. This will work much faster.
    But I don't quite agree.. Using the function call will save you the need to check for Authns.. with a direct db Select, you will have to put in explicit Authority-checks..
    ~Suresh

  • Data Updating other fileds with FM - HR_READ_INFOTYPE

    Hi ABAPers,
    I am trying to fetch a record with HR_READ_INFOTYPE Function Module, It is giving data but the data is updating with other fields in internal table
    PERNR is updating as a part in both MANDT & PERNR two fields.
    ENDDA is updating as a part in both ENDDA & BEGDA two fields.
    BEGDA is updating as a part in ENDDA & SEQNR two fields.
    The code, I used.
    data : lt_pa0001 type standard table of pa0001,
             lv_infty type infty,
             lv_pernr type persno.
            lv_pernr = '00001000'.
            lv_infty  =  '0001'.
    CALL FUNCTION 'HR_READ_INFOTYPE'
       EXPORTING
        TCLAS                 = 'A'
         PERNR                 = lv_pernr
         INFTY                 = lv_infty
       TABLES
         INFTY_TAB             = lt_pa0001.
    Pls. Let me know, Where i did mistake.
    Regards,
    Sree

    Hi ABAPers,
    I got solution, i declared internal table P0001 instead of PA00001. Now it is updating.
    Reagards,
    Sree

  • Fetching data from HR_READ_Infotype

    Hi,
    I am fetching the data from pa0001,pa0002 and pa0105 using the function module 'HR_READ_Infotype' like below:
    CALL FUNCTION 'HR_READ_INFOTYPE'
        EXPORTING
          TCLAS                 = 'A'
          pernr                 = wa_pa0002-pernr
          infty                 = '0002'
          begda                 = sy-datum
          endda                 = sy-datum
      BYPASS_BUFFER         = ' '
      LEGACY_MODE           = ' '
    IMPORTING
      SUBRC                 =
        TABLES
          infty_tab             = it_pa0002
       EXCEPTIONS
         infty_not_found       = 1
         OTHERS                = 2
    But it_pa0002 does not contain anything after the processing though the data is there in the infotypes.
    I have declared the internal table as
    data it_pa0002 type standard table of pa0002.
    The wa is defined like:
    data: wa_pa0002 like line of it_pa0002.
    Please suggest the solution.

    Hi Sunil,
    Your both input (pernr) and output depend on the same table (it_pa0002) which is filled after the function is called -however as pernr is not yet determined the function returns empty-.
    Thus, you need to fill the pernr field from another internal table which is filled prior to this function ot you may fill the pernr field from the selection screen field directly.
    Regards,
    Dilek

  • Use FM - HR_READ_INFOTYPE one time but to read mulitple Info types

    Dear All,
    I have a select-option where in users enter the Info types Numbers.
    Now I have to read and every infotype and display related data from each info type .
    I have to use FM - HR_READ_INFOTYPE  but we need to declare data for each and every infotype so I need to use this 10 times in case If I have 10 infotype.
    Is their any generlaised way exist where in I will pass the variable e.g., P0001 and build the internal table and use it for a FM. Kindly explain.
    Regards,
    Mangalagi S V

    Yes you can.
    1.) Declare fields as follows:
    FIELD-SYMBOLS <it> TYPE STANDARD TABLE.
    DATA  l_table_name LIKE feld-name.
    DATA: wa_0008 TYPE STANDARD TABLE OF p0008,
              0008_line LIKE LINE OF wa_0008.
    2)  In Step 3 I have a form that you will need to call like this:
            MOVE 'wa_0008' TO l_table_name.
            ASSIGN (l_table_name) TO <it>.
            PERFORM read_infotype USING pernr
                                        '0008'
                                        begda
                                        endda.
            wa_0008 = <it>.
    3) Your form will need to look like this
    FORM read_infotype USING pers_num
                             it_num
                             begin
                             end.
      CALL FUNCTION 'HR_READ_INFOTYPE'
        EXPORTING
          pernr             = pers_num
          infty             = it_num
          begda             = begin
          endda             = end
        TABLES
          infty_tab         = <it>
        EXCEPTIONS
          infty_not_found = 1
          OTHERS          = 2.
      IF sy-subrc  = 1.
      ENDIF.
    ENDFORM.                    " read_infotype
    You can then call your form passing different infotype numbers to it.
    Hope that helps.
    Mary

  • Reg. FM HR_READ_INFOTYPE

    Hi all,
          I have a requirtement where in i used the FM HR_READ_INFOTYPE to fetch data from PA0001 and PA0105tables.
    Prior to this i am using theFM FM HRCA_GETEMPLOYEESDETAILS_FROMUSER, where i pass sy-uname and sy-datum and get the pernr . In this sy-uname will be our login id.
    I am loggging into SAP system with my id( say some XXXXX) now while executing the program when i change the sy-uname  in the FM HRCA_GETEMPLOYEESDETAILS_FROMUSER to some YYYYY then the FM HR_READ_INFOTYPE  fetches the data from PA0001but for PA0105 it yields no results.
    But when i am not changing the sy-uname then the FM HR_READ_INFOTYPE fetches the data from both PA0001 and PA0105.
    In PA0105 the data exist and the sy-uname in that table is XXXX.
    Does the FM HR_READ_INFOTYPE checks for any authorizations kind of thing.
    Or do we need to map the pernr everytime to the sy-uname.
    Please help me to know why data is not being fetched from PA0105.
    Thanks in advance.
    Regards,
    Durga.

    Hi,
    The logic goes this way..
    call function 'HRCA_GETEMPLOYEEDATA_FROMUSER'
        exporting
          username                  = sy-uname
          validbegin                = sy-datum
        importing
          employeenumber            = lv_pernr
        exceptions
          user_not_found            = 1
          countrygrouping_not_found = 2
          infty_not_found           = 3
          call_others               = 4
          others                    = 5.
    During debugging, changed  the sy-uname from XXXX to YYYY and got the pernr relating to YYYY.
    Now after this we r fecthing the data from IT0001 and IT0105 but when the sy-uname is changed to some YYYY unable to fetch data from IT0105 even though data is present in that infotype table for the pernr.
    call function 'HR_READ_INFOTYPE'
        exporting
          pernr           = lv_pernr
          infty           = '0001'
          bypass_buffer   = 'X'
        tables
          infty_tab       = it_p0001
        exceptions
          infty_not_found = 1
          others          = 2.
      if sy-subrc eq 0.
        sort it_p0001 by begda descending.
        read table it_p0001 into wa_p0001 index 1.
        "Passing the company code retrived to the output parameter list
        companycode = wa_p0001-bukrs.
          call function 'HR_READ_INFOTYPE'
            exporting
              pernr           = lv_pernr
              infty           = ' 0105'
              bypass_buffer   = 'X'
            tables
              infty_tab       = it_p0105
            exceptions
              infty_not_found = 1
              others          = 2.
          if sy-subrc eq 0.
       SORT THE INTERNAL TABLE TO GET THE LATEST VALUE AND READ THE TABLE.
            sort it_p0105 by begda descending.
            read table it_p0105 into wa_p0105 with key subty = '0010'
                                                            binary search.
            if wa_p0105-usrid_long ne ' '.
              emp_mailid = wa_p0105-usrid_long.
              "retrieving the mail id of the employee
            else.
             " error message when mail id not found.
              raise userid_not_found.
            endif.
    here it is raising exception n givin error tht "user id is not found".
    Edited by: durga bhavani on Jan 9, 2009 8:14 AM

  • Regarding sy-index and sy-tabix

    Hi,
    What is the major difference between sy-index and sy-tabix ,
      can you give me one good example with code..
    Regards,
    Reddy.

    Hi,
    SY-TABIX - Current line of an internal table. SY-TABIX is set by the statements below, but only for index tables. The field is either not set or is set to 0 for hashed tables.
    APPEND sets SY-TABIX to the index of the last line of the table, that is, it contains the overall number of entries in the table.
    COLLECT sets SY-TABIX to the index of the existing or inserted line in the table. If the table has the type HASHED TABLE, SY-TABIX is set to 0.
    LOOP AT sets SY-TABIX to the index of the current line at the beginning of each loop lass. At the end of the loop, SY-TABIX is reset to the value that it had before entering the loop. It is set to 0 if the table has the type HASHED TABLE.
    READ TABLE sets SY-TABIX to the index of the table line read. If you use a binary search, and the system does not find a line, SY-TABIX contains the total number of lines, or one more than the total number of lines. SY-INDEX is undefined if a linear search fails to return an entry.
    SEARCH FOR sets SY-TABIX to the index of the table line in which the search string is found.
    SY_INDEX - In a DO or WHILE loop, SY-INDEX contains the number of loop passes including the current pass.
    sy-tabix is the tab index - the index of the record in the internal table you are accessing,
    sy-index is the loop counter.
    If you use a condition in LOOP the sy-index will go from 1 to n, but sy-tabix will refer to the line in the internal table.
    Hope this helps u.
    Thanks,
    Ruthra

  • Regarding Field Missing in Dso Transformation

    Hi
    Folks
    I am facing the issue like
    In Datasouce to DSO transformation i can see the 55 objects in DSO table, and in DSO to Cube Transformation i can see 54 fields in DSO table, one field is missing , the object  0TXTSH(short discription) is mapped to field 0TXZ01in DS to DSO transformation.
    so How can i get the field in DSO to Cube transformation.??
    any settings have to be change???
    waiting for yours Valuable answers
    Regards
    Anand

    Hi,
    Please identify the object and check it whether it is an attribute or a characteristic, if it is attribute only disable that option then check it.
    Regards,
    Srinivas

Maybe you are looking for

  • Text Inset in Container File Loses Conditional Tag

    Hi, (Framemaker 8.0p277,unstructured) I have a number of books that make use of text inset and conditional text.  Some text insets contain conditional text in their source. Then, after the inset is put into the container file, the inset may be furthe

  • CS3 palette problem

    Not sure if I'm missing something but my levels and curves dialogue windows seem to have attached themselves to the top of the screen, I can't move them around as usual and it means I can't see what I'm doing to the image. Have tried re-installing ph

  • SAP Netweaver Trial 7.02 contents

    Hi, In the interest of self learning SAP BW , I download the SAP Netweaver ABAP Trial. I am quite new to SAP  wanted to know if the trial does contain BW (or now BI) functionality . if  not what would be the best way to get my hands dirty ? I wanted

  • How to convert jpeg to AI files

    I need to convert jpeg to AI files...

  • We do not have a dvd drive. how do we install the photoshop software?

    I would like to install but do not have a dvd drive. how do we that?