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
654

Hello,

How do I select applicable P0000 record where date entered on the selection screen equals P0000-AEDTM. Date is not a parameter.It is a select-option..

Thanks

Vicky

8 REPLIES 8
Read only

suresh_datti
Active Contributor
0 Likes
629

use the following..

select * from pa0000 into table i_pa0000
         where aedtm in s_aedtm.

~Suresh

Read only

Former Member
0 Likes
629

Hi Vicky,

data itab type table of p0000.

select * from pa0000 into corresponding fields of table itab where aedtm in so_aedtm.

hope this helps.

Sajan.

Message was edited by: Sajan Joseph

Read only

Former Member
0 Likes
629

Hi,

use the IN operator..

EX.

SELECT-OPTIONS SO_DATE FOR SY-DATUM.

DATA: T_VBAK TYPE STANDARD TABLE OF VBAK.

SELECT * FROM VBAK

WHERE <b>ERDAT IN SO_DATE</b>.

Thanks,

Naren

Read only

0 Likes
629

I used get pernr.So I also need to include condition for pernr. How do I do this?

Read only

0 Likes
629

get pernr.
loop at p0000 where ( aedtm le s_aedtm-high and a
                      aedtm ge s_aedtm-low ).
*
endloop.


~Suresh

Read only

0 Likes
629

Thanks Suresh for the reply..Now the thing is I need to pull the applicable records from P0001 P0002 P0007 using P0000-begda..How do i use this?

Thanks

VIcky

Read only

0 Likes
629

Thanks Suresh for the reply..Now the thing is I need to pull the applicable records from P0001 P0002 P0007 using P0000-begda..How do i use this?

Thanks

Read only

0 Likes
629

try this..

tables:pernr.
infotypes:0000,0001,0002,0007.
get pernr.
loop at p0000 where ( aedtm le s_aedtm-high and a
                      aedtm ge s_aedtm-low ).

rp-provide-from-last p0001 space p0000-begda p0000-begda.
if pnp-sw-found eq 1.
*p0001 will have the reqd record
endif.
rp-provide-from-last p0002 space p0000-begda p0000-begda.
if pnp-sw-found eq 1.
*p0002 will have the reqd record
endif.
rp-provide-from-last p0007 space p0000-begda p0000-begda.
if pnp-sw-found eq 1.
*p0007 will have the reqd record
endif.


endloop.
 
 
end-of-selection.

~Suresh