HR ABAP : Read Infotype.

Hi,
I have small query regarding HR abap infotype.
Take example of infotye PA0001. From this infotype I require to retrieve all PERNR which are effective on today (say 22nd Nov 2006).
Is there any standard Function Module or micro available?
Thanks,
Sunil Bhavsar

hmmm sunil but functions also use select statements somewhere deep down to get the data you want. only difference is that there are more checks involved which are not when you do select straight away (like authorisation for infotype 0001 can already be included in the function)
It is only from a programming point of view always advisable to use functions or bapis to retrieve or alter information if the are around so you are certain that when you upgrade that the functions keep on working while you're own code might not because of changes in the system
I don't see a faster way to make the select
select pernr from pa0001 into corresponding fields of table i_pernr
where... (see above example).
it always help to look in se11 at pa0001 to see which fields are indexed. if you can you can optimize you're code by adding keyfields to you're where statement to minimize you're selection.
i'm not behind sap now but if the company is for instance a keyfield you can do
select pernr from pa0001 into corresponding fields of table i_pernr
where company = 'companycode'
Message was edited by:
        A. de Smidt

Similar Messages

  • Hr abap custom infotype  updatation

    hiii frnds,
        i creatred custom inotype 9910 and i enterded some data for  this infotype in pa30 when i click on the save it is noty saving in the pa9910 table...... can any one send sample code to save the data into table

    Did you read [Developing an Infotype in Personnel Administration|http://help.sap.com/printdocu/core/print46c/en/data/pdf/PAXX/PYINT_INFOTYP.pdf] (or more recent documentation) and a guide like [Steps to Customize infotypes|http://wiki.sdn.sap.com/wiki/display/ABAP/StepstoCustomize+infotypes]
    Regards,
    Raymond

  • 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

  • ABAP-HR:Infotype

    Hi,
    I am working with ABAP-HR.
    In Personal Administration, while defining Infotypes , they say 'each infotype requirs at least 2 structures and atleast 1 internal table'.
    Will any body please help me to get the idea.
    Thanks in advance.
    Anirban Bhattacharjee

    hi
    Each infotype has two structures and One associated table.
    PSnnnn - this structure contains all of the infotype data fields.
    Pnnnn - this structure contains infotype key fields and all the data fields from the structure PSnnnn.
    Here nnnn is the infotype number.
    PAnnnn PBnnnn etc are actual database tables hoilding the data.
    In ABAP-HR Infotype are grouped in INfoGroups. They have Screens associated with it. And a user has to fill those screens and it is possible that user might chane a value many times before actually saving it.
    So these structures acts as a temporary storage for thise values.
    Hope this wil help.
    Reward if useful.
    Sumit Agarwal

  • RP-READ-INFOTYPE

    Hi ,
      i need to delete all the records  with subty X1 for infotype  p0019 . I should n't use the logical database instead i am using  macro RP-READ-INFOTYPE to retrieve the valid data  but  here in case of P0019 the begda and endda of a record will be same and i need to delete the records even if they are in past . But the macro RP-READ-INFOTYPE  is not going to work in this case as it checks against dates and the records are in past so it will not retrieve any data . So any thoughts on how to get the data for P0019  with subty X1 without using the logical database PNP. 
    Thanks,
    Latha.

    Use HR_READ_INFOTYPE FM to retreive the desired result.........
    Pass begda 01/01/1800 endda = '12/31/9999' and subtype you want.......
    Not your infotype table will fill with all the data now you manipulate as you desired
    Let me know if you need any further help!!!
    Sas

  • Need an alternative to rp-read-infotype to display infotype txts frm a BSP?

    Hi All,
    I need to display infotypes maintained texts(F9) from a bsp.  I created a test program to read these texts using rp-read-infotype and got it working but didn't realise i couldn't use this method in a BSP until i copied it in.  total bummer!
    Does anyone know of an alternative that i can use in a BSP.
    Thanks in advance,
    Liz.

    Can you try using FM READ_TEXT  / RFC_READ_TEXT to get the infotype text
    and then find the equivalent function on BSP side .

  • Rfc to read infotypes

    hi...
    is there any RFC function modules for reading infotype details.........
    thank
    prabhakar

    BAPI_EMPLCOMM_GETDETAIL - Communication infotype - infotype 0105
    BAPI_INTCONTROL_GETDETAIL - Internal cont - infotype 32
    BAPI_PDOTYPES_GETDETAILEDLIST - PD infotypes
    BAPI_ABSENCE_GETDETAIL - infotype 2001
    BAPI_W4W5INFOUS_GETDETAIL - W4/W5 info of an emp - infotype 210
    BAPI_DATESPECS_GETDETAILEDLIST - Date specifications -infotype 41
    RFC_ABSENCETYPES_READ - RFC which Lists absence types
    HR_BEN_READ_CREDIT_PLANS - RFC for reading credit plans
    HR_BEN_READ_INSURE_PLANS - RFC for reading insurance plans.
    HR_BEN_READ_HEALTH_PLANS_RFC RFC for Reading Health plans

  • To read Infotype 0025

    Friends i'm writing a report. Which give employees qualification and desired and assessed profeciencies. I'm unable to read infotype 0025. Data is there, but pa0025 table is showing empty status.

    Hi u wont find any entries in PA0025.
    Try using this FM
    HRWPC_RFC_QUALIFICATION_STAFF
    In this FM U have to pass the Qualification ID
    U can also have a look at
    CALL FUNCTION 'RHPP_Q_PROFILE_READ'
       EXPORTING
         BEGDA                  = sy-datum
         ENDDA                  = sy-datum
         WITH_STEXT             = 'X'
         WITH_QK_INFO           = 'X'
      CHECK_NOTE             = ' '
        TABLES
          OBJECTS                = IT_P_OBJECTS
      ERR_OBJECTS            =
          PROFILE                = IT_QUALIFICATION_TAB
    EXCEPTIONS
       NO_AUTHORITY           = 1
       WRONG_OTYPE            = 2
       OBJECT_NOT_FOUND       = 3
       UNDEFINED              = 4
       OTHERS                 = 5
      IF SY-SUBRC <> 0.
        raise nothing_found.
      ENDIF.
    ~ BiSu
    Message was edited by:
            Biswajit Das
    Message was edited by:
            Biswajit Das

  • HR Abap - Reading table control for infotype 0416

    Hi,
    Infotype 416 'Create Time Quota Compensation' has a table control for 'Absence Quotas'.
    I have to read this table control in user exit ZXPADU02.
    Please assist in how to go about doing this.
    Regards,
    Warren.

    Hi All,
    I am using ZXPADU02.
    The FM's suggested don't work because the user enters a compensation value at runtime and when user clicks 'save' I need to pick this value up. The FM's pick up existing absence records but I need the ones being created at runtime.

  • ABAP HR infotype use and retrival

    Hi,
    I am new to abap hr.In hr module we are using provide statement for retriving data.
    My doubt is
    1. why we are using provide instead of select?
    2. Why we are using structure instead of direct tr table?
    3. Why we are using infotype in hr and what is the use?
    4. why we are retriving data using infotype in report instead of using tr.table using select?
    5. What we have to specify if i want to retrive data from infotype?
    6. We have to declare table/structure/infotype for retriving data?
    7. And why we are specifying mode in declaration what is it mean?
    if anybody knows tell me/send me the materials please.
    Thanks,
    Regards,
    Nandha..

    Hi Nandha,
    The statements PROVIDE and ENDPROVIDE define a loop through a statement block. In this loop, any number of internal tables itab1 itab2 ... are processed together. A single table can appear several times. For every table itab you must specify a FIELDS clause. After FIELDS you must specify the character * for all components or a list comp1 comp2 ... for specific components of the relevant table. The names of the components comp1 comp2 ... can only be specified directly.
    To be able to process internal tables using PROVIDE, all tables itab1 itab2 ... must be fully typed index tables and contain two special columns that have the same data type (d, i, n, or t) for all relevant tables. For every table you must specify the names intliml1 intliml2 ... and intlimu1 intlimu2 ... of these columns using the addition BOUNDS.
    Eg:
    PROVIDE FIELDS {*|{comp1 comp2 ...}}
                   FROM itab1 INTO wa1 VALID flag1
                   BOUNDS intliml1 AND intlimu1
                   [WHERE log_exp1]
            FIELDS {*|{comp1 comp2 ...}}
                   FROM itab2 INTO wa2 VALID flag2
                   BOUNDS intliml2 AND intlimu2
                   [WHERE log_exp2]
            BETWEEN extliml AND extlimu
            [INCLUDING GAPS].
    ENDPROVIDE.

  • Doubt reading Infotypes.

    Good Morning Friends.
    I'm working with ABAP - HR and it is my firts time with HR.
    I'm working with a program and I heve a code:
    lm_read_infty <ls_pa9002>-pernr '0002' lt_p0002 <ls_pa9002>-begda <ls_pa9002>-endda.
    I,m reading the infotype with dates <ls_pa9002>-begda  and  <ls_pa9002>-endda.
    The functional wants that i change the <ls_pa9002>-endda and insert '99991231'.
    then i do:
    lm_read_infty <ls_pa9002>-pernr '0002' lt_p0002 <ls_pa9002>-begda '99991231'.
    Ok worked .
    But now the functional wants that i read the infotype only with '99991231' and remove the <ls_pa9002>-begda.
    if i write:
    lm_read_infty <ls_pa9002>-pernr '0002' lt_p0002  '99991231'.
    occurs errors  of quantity of parameters:
    How can I do this read only with '99991231'.?
    Thanks for help

    Just go for
    lm_read_infty <ls_pa9002>-pernr '0002' lt_p0002 '00000000' '99991231'.
    or
    lm_read_infty <ls_pa9002>-pernr '0002' lt_p0002 sy-datum '99991231'.
    That should do the trick.

  • HR-ABAP-regarding infotype 0041-dates specifications

    Hi All,
                   Can any body help in this problem that.
    I am retrieving one particular date from infotype 0041 by passing the date type U9.
    I want to know from which dardt(date type field in PA0041) i.e., dar01 or dar02 or dar03- - - - dar12, the date is coming .
    Pls let me know urgently this.
    Andvance thanks for all of your efforts.
    Thanks&Regards,
    Jeevakala.

    Hello,
    The option i have implememted for a similar scenario is as follows
    data: v_darxx like p0041-dar01,
             v_datxx like p0041-dat01.
    select single * from pa0041 into int_pa0041 after passing key fields
    do 12 times
    varying v_darxx from i_it41-dar01 next i_it41-dar02
    varying v_datxx from i_it41-dat01 next i_it41-dat02.
    if v_darxx = 'U9' and v_datxx gt v_dat.
    "You have your required date
    endif.
    enddo
    the same has been discussed in the following link,
    Reading dates from infotype 41
    Hope the suggestions gave you some idea
    Reward if helpful
    Regards
    Byju

  • HR ABAP:  table/infotype relationships

    Hi.
    I'm experienced in doing ABAP programming for all the rest of the modules, but with ABAP HR, I am new and doing one for the first time.  I need your help regarding how to find tables/infotypes and relationships to each other.
    Specific work example/scenario: 
    From selection criteria of requisition information, I am supposed to have an output report with application and candidacy information.
    1.) How can I relate Infotype 5125 with info type 5132 and 5102? 
    I am more comfortable with select statements hence I prefer explanation using the transparent tables HRP5125, HRP5132, etc.
    2.) How can I make use of the table HRP1001 to establish relationships between different tables/infotypes of HR?
    Also, kindly send any links and documents that can give an at-a-glance summary of what I can use when doing ABAP for HR for the first time. 
    Thanks for your help and expertise and may God bless us all!
    Celeste

    More exactly look at tables
    - [HRP1000 |https://www.sdn.sap.com/irj/sdn/advancedsearch?query=hrp1000+&cat=sdn_all]: org. units, positions, etc.
    - [HRP1001|https://www.sdn.sap.com/irj/sdn/advancedsearch?cat=sdn_all&query=hrp1001&adv=false&sortby=cm_rnd_rankvalue] : links between org. units, positions, etc.
    Look at this thread Tables for ORG model  and FM [RH_STRUC_GET|https://www.sdn.sap.com/irj/sdn/advancedsearch?query=rh_struc_get&cat=sdn_all]
    Regards

  • HR ABAP : Custom Infotype updations through FM HR_INFOTYPE_OPERATION

    Hi All,
              Actually, I want to update the custom infotype 3 fields as per my user inputs. I am fetching the data from the PA table acoording to sy-datum falling in the begda, enda limitations. now I am changing the field with new values in the work area. And pass with the following data to the FM.
              But I am getting the error 'No data stored for 9008 in the selected period', eventhough it is already having a data in the database table. I had seen prvious therads, but could not get how they solved the issue.
    Please provide the inpus for the following code.
              ( I had also passed the validity start and end from the database entry. at this moment it gets dumped at the statement
      assign record to <record> casting type (tabname). "XDP UniCode
    where tabname is proposed from t777d-ppnnn. which is a structure and having a value as P9008. If i change the value at debug point to PA9008. it works fine. is there anything extra i need to do to solve this issue? )
    CALL FUNCTION 'HR_INFOTYPE_OPERATION'
    EXPORTING
    infty = '9008'
    number = pernr
    "SUBTYPE =
    "OBJECTID =
    "LOCKINDICATOR =
    "VALIDITYEND =
    "VALIDITYBEGIN =
    "RECORDNUMBER =
    record = wa_pa9008
    operation = 'MOD'
    "TCLAS = 'A'
    "DIALOG_MODE = '0'
    "NOCOMMIT =
    "VIEW_IDENTIFIER =
    "SECONDARY_RECORD =
    IMPORTING
    return = l_bapireturn
    key = bapipakey_tab
    Regards,
    Brijesh Patel

    Hi,
    Check this code once
    Read Infotype9004 Record for the personnel No
        CALL FUNCTION 'HR_READ_INFOTYPE'
          EXPORTING
            tclas           = A
            pernr           = pernr
            infty           = 9004
          IMPORTING
            subrc           = v_subrc
          TABLES
            infty_tab       = it_pa9004
          EXCEPTIONS
            infty_not_found = 1
            OTHERS          = 2.
    Read it_pa9004 into wa_pa9004 with some condition.
    if sy-subrc eq 0.
    Lock the employee for processing infotype 9004
        CALL FUNCTION 'HR_EMPLOYEE_ENQUEUE'
          EXPORTING
            number = wa_pa9004-pernr.
      v_begda = wa_9004-begda.
          v_endda = wa_9004-endda.
    CALL FUNCTION 'HR_INFOTYPE_OPERATION'
            EXPORTING
              infty         = c_9004
              number        = wa_9004-pernr
              subtype       = c_0001
              validityend   = v_endda
              validitybegin = v_begda
              record        = wa_9004
              operation     = c_mod
              tclas         = c_a
             dialog_mode   = c_0
              dialog_mode   = '2'
            IMPORTING
              return        = wa_return.
    CALL FUNCTION 'HR_EMPLOYEE_DEQUEUE'
          EXPORTING
            number = wa_pa9004-pernr.
    endif.
    reward the points if it is helpful.
    Regards,
    Srilatha

Maybe you are looking for

  • Replacement of Function module in ECC 6.0

    Hello All, The Function module 'NAMETAB_GET' is shown to be obsolete in ECC 6.0 . Please suggest which of the function modules among 'DDIF_FIELDINFO_GET'  and 'DDIF_NAMETAB_GET' can be used as a replacement for the same. Also ,it would be helpful if

  • Process Chain giving error

    Hi All, We are using a web service data source (gets data from MDM through XI). We created a process chain for this load, but when it's run, the chain is failed at the process type " Close any Open requests (this process consists of the corresponding

  • Bug with Copy Style?

    I tried using the keyboard shortcut for Copy Style (Option-Command-C) to change the background color swatch on a shape, but it did the same thing as the regular Copy command (the Edit menu even highlighted temporarily). The Paste Style shortcut worke

  • I was in the process of backing up my 4s to activate my 5s.

    During the process, I lose connection and my 4s becomes locked and is stuck in Restore Mode. Work phone with massive contacts list. I tunes says I must restore to factory settings. Then says do I want to lose all my saved stuff? ***! He'll no, I want

  • How to change convergence default mail forward option inline

    Hi All, Convergence 1.0 by default mail forward option is attachment.How to change it to inline.please help me . Regards Das