Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Infotype 2006

Former Member
0 Kudos
744

Hi all,

How can I read Infotype 2006 data.

Thanks,

Swapna

6 REPLIES 6

suresh_datti
Active Contributor
0 Kudos
247

Use the function module <b>hr_read_infotype</b>.

~Suresh

Former Member
0 Kudos
247

Hi,

The data of Infotype 2006 is stored in table PA2006, you can either write a select on the Table or you can use FM 'hr_read_infotype' or you can used LDB's to get the data. When using LDB's use Macro 'RP_READ_INFOTYPE pernr infty inftytab beg end' to get the data.

Check the link for how to used LDB's.

http://help.sap.com/saphelp_47x200/helpdata/en/60/d8bbe3576311d189270000e8322f96/content.htm

Regards,

Ramu N.

Message was edited by:

Ramu Nemurgommula

Message was edited by:

Ramu Nemurgommula

Former Member
0 Kudos
247

Hi all,

Couldn't read the 2006-Absence Quota's data.I tried with

RP-READ-INFOTYPE PERNR 2006 itab BEGDA ENDDA.

and with Function Module HR_READ_INFOTYPE

and also with RP_READ_ALL_TIME_ITY pnpbegda pnpendda .

Can anyone give me how to read 2006 data with sample example.

Thanks,

Swapna

0 Kudos
247

Hi,

DATA : IT_P2006 LIKE P2006 OCCURS 0 WITH HEADER LINE.

CALL FUNCTION 'HR_READ_INFOTYPE'

EXPORTING

  • TCLAS = 'A'

PERNR = PERNR

INFTY = '2006'

  • BEGDA = '18000101'

  • ENDDA = '99991231'

  • BYPASS_BUFFER = ' '

  • LEGACY_MODE = ' '

  • IMPORTING

  • SUBRC =

TABLES

INFTY_TAB = IT_P2006

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

Ramu N.

0 Kudos
247

Hi swapna,

1. We can simply use

select * from pa2006

into mypa2006

where pernr = '1'.

2. There u can also specify the SUBTY

regards,

amit m.

Former Member
0 Kudos
247

Hi ,

Thanks for the response.

Actually in the infotypes declaration I added mode n.That 's why I got that problem.But when I removed it started working.

So when should we use mode n declaration fro the time infotypes.When to use the Macro RP_READ_ALL_TIME_ITY pnpbegda pnpendda.And when the F.M HR_TIME_RESULTS_GET.

Can anyone explain me clearly.

Thanks,

Swapna