Application Development and Automation 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: 
Read only

Data Selection

Former Member
0 Likes
513

I need to pull the applicable records from P0001 P0002 P0007 using P0000-begda..How do i use this?

2 REPLIES 2
Read only

Former Member
0 Likes
487

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

Read only

0 Likes
487

Iam using a 'get pernr' statement for selection screeen..So how do I get data?