‎2011 Jan 03 12:11 PM
Hi ABAP Gurus,
I am facing a problem while reading infotype 0015 record using following:
PROVIDE * FROM p0015 BETWEEN pn-begda AND pn-endda.
.....
ENDPROVIDE.
I have also tried following:
call function 'HR_READ_INFOTYPE_AUTHC_DISABLE'.
call function 'HR_READ_SUBTYPE'
exporting
pernr = pernr-pernr
infty = '0015'
subty = '6100'
begda = pn-begda
endda = pn-endda
tables
infty_tab = t_0015
EXCEPTIONS
INFTY_NOT_FOUND = 1
INVALID_INPUT = 2
OTHERS = 3.
User don't have full access to infotype 0015. Out of 20 subtypes user is authorize to read only 2 sub types.
When user run this custom report, he is not able to see anything in preview. Although he can see the data from PA20.
Thanks for solution in advance.
Waqas Rashid
‎2011 Jan 03 2:03 PM
Ok. I have identified the problem. But I don't know solution. Following is the culprit. When I remove following statement and read infotype using FM HR_READ_SUBTYPE then it works fine.
INFOTYPES: 0015 NAME p0015.
I don't want to use FM HR_READ_SUBTYPE because of following reasons:
1- Data retrieval is slow.
2- I will have to call this FM to read data from lot of different infotypes, which will increase code size.
3- I want to read only 2 sub types from infotype 0015. For this I will have to call FM HR_READ_SUBTYPE 2 times.
4- ....
5- ....
Waiting for a good solution.
Thanks,
Waqas Rashid
‎2011 Jan 04 3:38 AM
Hi,
Please try by giving 'BYPASS_BUFFER' importing parameter as 'X" in the FM 'HR_READ_SUBTYPE'.
Regards,
Soumya.
‎2011 Jan 04 4:25 AM
Hi,
Write a select statement on PA0015 and get the data for the particular pernr and for the subtypes.
clear : it_pa0015[] , it_pa0015.
Select pernr .... from PA0015 into table it_pa0015
where pernr = pernr-pernr and
subty in r_subty and " populate r_subty with the 2 values you need
endda ge pn-begda and
begda le pn-endda.
Regards,
Srini.
‎2011 Jan 04 6:08 AM