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 from selection screen

Former Member
0 Likes
504

Hi,

This is my code.

SELECT pernr usrid FROM pa0105 INTO TABLE t_pa0105

FOR ALL ENTRIES IN t_bseg

WHERE pernr = t_bseg-pernr AND

subty = c_9int AND

usrty = c_9int AND

begda <= p_endda AND

endda >= p_begda.

Iam unable to get the values , for the specified dates?

Example: if i want to display data only from 01/08/2006 to 08/08/2006. It's not displaying. Its showing all the related data from all dates. I want data for the selected dates only.

Can you help me friends.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
462

Hi Manju

You have to modify the Code as follow:-

SELECT pernr usrid FROM pa0105 INTO TABLE t_pa0105

FOR ALL ENTRIES IN t_bseg

WHERE pernr = t_bseg-pernr AND

subty = c_9int AND

usrty = c_9int AND

begda ge p_endda AND

endda le p_begda.

3 REPLIES 3
Read only

Former Member
0 Likes
462

Hi Manju,

If you are getting your date in using Select Options then use <b>IN</b> in your select query, than using <= or >=.

Hope thuis might help you.

Regards,

Prashanth

Read only

dani_mn
Active Contributor
0 Likes
462

HI,

Check the date format in the p_begda and p_endda.

is this the same format for which you are querying or not.

and try this query.

<b>SELECT pernr usrid FROM pa0105 INTO TABLE t_pa0105
FOR ALL ENTRIES IN t_bseg
WHERE pernr = t_bseg-pernr AND
subty = c_9int AND
usrty = c_9int AND
begda >= p_begda AND
endda <= p_endda.</b>

Regards,

Wasim Ahmed

Read only

Former Member
0 Likes
463

Hi Manju

You have to modify the Code as follow:-

SELECT pernr usrid FROM pa0105 INTO TABLE t_pa0105

FOR ALL ENTRIES IN t_bseg

WHERE pernr = t_bseg-pernr AND

subty = c_9int AND

usrty = c_9int AND

begda ge p_endda AND

endda le p_begda.