‎2007 Oct 04 9:04 AM
is there any function from which i can fetch any number of fields of infotype tables
PA0001 PA0002 etc
‎2007 Oct 04 12:18 PM
‎2007 Oct 04 9:12 AM
‎2007 Oct 04 10:08 AM
‎2007 Oct 04 10:43 AM
Hi Karan,
Use the function module
HR_READ_INFOTYPE
Example:
data: itab_0001 like p0001 occurs 0 with header line.
data: itab_0002 like p0002 occurs 0 with header line.
CALL FUNCTION 'HR_READ_INFOTYPE'
EXPORTING
TCLAS = 'A'
PERNR = pernr "pass pernr here
INFTY = '0001'
BEGDA = '18000101'
ENDDA = '99991231'
BYPASS_BUFFER = 'X'
TABLES
INFTY_TAB = itab_0001
EXCEPTIONS
INFTY_NOT_FOUND = 1
OTHERS = 2 .
CALL FUNCTION 'HR_READ_INFOTYPE'
EXPORTING
TCLAS = 'A'
PERNR = pernr "pass pernr here
INFTY = '0002'
BEGDA = '18000101'
ENDDA = '99991231'
BYPASS_BUFFER = 'X'
TABLES
INFTY_TAB = itab_0002
EXCEPTIONS
INFTY_NOT_FOUND = 1
OTHERS = 2 .
‎2007 Oct 04 10:57 AM
i have used this FM but all the entries are not coming correct
it gives only few entries like this
‎2007 Oct 04 12:18 PM
‎2007 Oct 04 12:25 PM
Thats the best one to READ data. You may also check following -
HR_ECM_READ_INFOTYPE
BAPI_PERSDATA_GETDETAIL
Apart from this you may use Logical Database to read Infotypes.
Or Class like this -
CALL METHOD read_infotype->read
EXPORTING
tclas = tclas_employee
pernr = pernr
infty = infty
subty = subty
objps = objps
sprps = sprps
begda = begda
endda = endda
no_auth_check = no_auth_check
IMPORTING
infotype_tab = infotype_tab_prel
missing_auth = missing_auth.
Regards,
Amit
Rerward all helpful replies.
‎2007 Oct 04 12:35 PM
Hi,
I think you might have declared in the following way
data: itab_0001 like pa0001 occurs 0 with header line.
data: itab_0002 like pa0002 occurs 0 with header line.
The correct way of declaration is
<b>data: itab_0001 like p0001 occurs 0 with header line.
data: itab_0002 like p0002 occurs 0 with header line.</b>
‎2007 Oct 04 12:47 PM