‎2009 Oct 18 11:26 PM
Hi All
In Dialog programs attributes I didn't see any logical database field. How can I access Infotype data into dialog program without specifying the Logical database(i.e. PNP).
Thanks,
Vivek.
‎2009 Oct 18 11:50 PM
Can we access PA0001 PA0002 using normal SQL statements?
Lat me try and get back for more help.
Thanks
Vivek.
‎2009 Oct 19 3:06 AM
Hi Vivek,
<li>You can access HR infotype tables data without LDB mentioned in Program attributes or in module or dialog program.
<li>Method - 1
<li>Method - 2
DATA it_p0001 LIKE p0001 OCCURS 100 WITH HEADER LINE.
CALL FUNCTION 'HR_READ_INFOTYPE'
EXPORTING
tclas = 'A' " Master Data and Time Data
pernr = '00001001' " Employee Number
infty = '0001' " Infotype number
begda = '18000101' " It gets all the records existed for employee in the table PA0001
endda = '99991231' " It gets all the records existed for employee in the table PA0001
TABLES
infty_tab = it_p0001.
"Loop your internal table and get the required information
<li>Method - 3
INFOTYPES:0001.
INCLUDE dbpnpmac.
rp_read_infotype '00001001' '0001' p0001 '18000101' '99991231'.
"Loop your internal table and get the required information
" rp_read_infotype a b c d e.
"----------------------------
" a Requested Personalnumber
" b Requested Infotypnumber
" c Output Table Like PNNNN
" d Requested Interval-Begin
" e Requested Interval-End
I hope that it helps you.
Thanks
Venkat.ODATA it_p0001 LIKE p0001 OCCURS 100 WITH HEADER LINE.
SELECT *
FROM pa0001
INTO TABLE it_p0001
WHERE pernr = '00001001'
AND begda GE s_date-low "date given on selection-screen
AND endda LE s_date-high."date given on selection-screen
"Loop your internal table and get the required information