cancel
Showing results for 
Search instead for 
Did you mean: 

using function module HR_READ_INFOTYPE

Former Member
0 Kudos

Hi,

I am fetching the data from PA0001,PA0002 and PA0105 using function module HR_READ_INFOTYPE.But when I am passing the prnr as 7 , it is getting changed to 7000 in the function module. Thats why it is not fetching the data.Please suggest why is it happening. ALso I have to fetch name of the pernr. But from PA0002 , I am not able to fetch the name.Please suggest the solution.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

Try to test the function module using SE37. Give the function module and click on Test. It will ask for the below Options.

TCLAS = "A" This should be the same as this is Master Data.

PERNR = Enter the personnel number.

INFTY = Enter the infotype number

BEGDA = Enter the Begin Date

ENDDA = Enter the End Date

and try to execute. Ensure that for the above personnel number there is a basic pay record. This should fetch the record. If successful, then the function module by standard is working fine. Please revert for any help.

Thanks and Regards

Team Member.

Former Member
0 Kudos

Its working fien and returning row when the function module is run from SE37.But when it is run from the progarm then only the error occurs.Please suugest

Former Member
0 Kudos

How do you pass the PERNR?

Kirsten

Former Member
0 Kudos

Make sure for data Declaration in you program you have defined Pernr like


        pernr         LIKE p0000-pernr,            "Personnel Number

Also check the valid infotype records exists for the dates you are passing


  CALL FUNCTION 'HR_READ_INFOTYPE'
          EXPORTING
             TCLAS                 = 'A'
             pernr                 = g_t_table-pernr
             infty                 = '0002'
             begda                 = g_t_table-begda
             endda                 = g_t_table-endda
*             BYPASS_BUFFER         = ' '
*             LEGACY_MODE           = ' '
*           IMPORTING
*             SUBRC                 =
          TABLES
            infty_tab             = p0002
          EXCEPTIONS
            infty_not_found       = 1
            OTHERS                = 2

Former Member
0 Kudos

..sorry - thought the previous answer was from the originator.

former_member75029
Contributor
0 Kudos

For fetching the name use "Ename" field from pa0001.

Afrasyab