Skip to Content
author's profile photo Former Member
Former Member

Reading values within a timeperiod out of HR table

Hi

I need to collect values X associated with their ID and the value of DATETO out of the EMPLOYEE table. I am only interested in the values that lie between a specific timeperiod from y to z.

How can I do that? I have seen that there is a provide function but does it also work with dates?

Further I have read something like that an FM exists, anybody got an idea about where I can find it or how it was called?

Thanks a lot,

Greetings,

Nana

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Best Answer
    Posted on Mar 24, 2006 at 02:41 PM

    Hi,

    if you want to read the employee data then you can use this FM <b>HR_READ_INFOTYPE</b> , infotype PA0001, pass begda and endda. and get the data.

      CALL FUNCTION 'HR_READ_INFOTYPE'
           EXPORTING
                TCLAS           = 'A'
                PERNR           = PERNR-PERNR
                INFTY           = '0001'
               BEGDA           = '18000101'
               ENDDA           = '99991231'
    *         BYPASS_BUFFER   = ' '
    *    IMPORTING
    *         SUBRC           =
           TABLES
                INFTY_TAB       = INFTY_0000
           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

    Vijay

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Mar 24, 2006 at 02:26 PM

    Hi nana,

    1. simple

    there is a standard fm for it.

    2.

    DATA : p0001 LIKE TABLE OF p0001 WITH HEADER LINE.

    *----


    Read Info Type 1

    CALL FUNCTION 'HR_READ_INFOTYPE'

    EXPORTING

    tclas = 'A'

    pernr = mypernr

    infty = '0001'

    begda = begda

    endda = endda

    • BYPASS_BUFFER = ' '

    • LEGACY_MODE = ' '

    • IMPORTING

    • SUBRC =

    TABLES

    infty_tab = p0001

    EXCEPTIONS

    infty_not_found = 1

    OTHERS = 2

    3. just provide the start and enddate

    in begda and endda respectively

    regards,

    amit m.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.