‎2006 Nov 09 10:17 PM
I need to pull the applicable records from P0001 P0002 P0007 using P0000-begda..How do i use this?
‎2006 Nov 09 10:43 PM
Hi Vicky,
I assume that you need to get the org assignment data, personal data and the planned working time of an employee...
you can use the following logic.
tables:
pa0000.
data:
lt_pa0000 type table of pa0000 with header line,
lt_pa0001 type table of pa0001 with header line,
lt_pa0002 type table of pa0002 with header line,
lt_pa0007 type table of pa0007 with header line.
select-options so_begda for pa0000-begda.
start-of-selection.
select * from pa0000 into table lt_pa0000 where
begda in so_begda.
check not lt_pa0000[] is initial.
select * from pa0001 into table lt_pa0001
for all entries in lt_pa0000 where
begda = lt_pa0000-begda .
select * from pa0002 into table lt_pa0002
for all entries in lt_pa0000 where
begda = lt_pa0000-begda .
select * from pa0007 into table lt_pa0007
for all entries in lt_pa0000 where
begda = lt_pa0000-begda .
Hopefully, now you have all the data in the corresponding internal tables.
you can read the required internal tables using the read statement......providing all the keys..PERNR SUBTY OBJPS
SPRPS ENDDA BEGDA SEQNR etc...
Hope this sample code helps you...
may not be the optimal solution...but you can work with this..
Sajan.
corrected <b>ls_pa0000[]</b> to <b>lt_pa0000[]</b> in the 3rd line after start-of-selection.
Also corrected wrongly written <b>pa000-begda</b> to <b>pa0000-begda</b>
Message was edited by: Sajan Joseph
‎2006 Nov 10 1:13 AM
Iam using a 'get pernr' statement for selection screeen..So how do I get data?