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

low n High

Former Member
0 Likes
734

Hi,

I have done my fetch as follows in program:

SELECT objectclas objectid changenr udate utime FROM cdhdr

INTO TABLE t_cdhdr FOR ALL ENTRIES IN t_test

WHERE objectclas = c_material

AND udate = w_date

AND utime = w_time.

But I want to give the udate condition as follows:

low value for udate = w_date

high value for udate = sy-datum

Can you plz tell me how to do???

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
706

Hi Ginger,

You can take a range for your date or in selection screen is there you can go for select options and in your query you can do something like:

SELECT objectclas objectid changenr udate utime FROM cdhdr

INTO TABLE t_cdhdr FOR ALL ENTRIES IN t_test

WHERE objectclas = c_material

AND udate IN s_date.

With luck,

Pritam.

Hi,

I have done my fetch as follows in program:

SELECT objectclas objectid changenr udate utime FROM cdhdr

INTO TABLE t_cdhdr FOR ALL ENTRIES IN t_test

WHERE objectclas = c_material

AND udate = w_date

AND utime = w_time.

But I want to give the udate condition as follows:

low value for udate = w_date

high value for udate = sy-datum

Can you plz tell me how to do???

6 REPLIES 6
Read only

Former Member
0 Likes
706

Hi,

SELECT objectclas objectid changenr udate utime FROM cdhdr

INTO TABLE t_cdhdr FOR ALL ENTRIES IN t_test

WHERE objectclas = c_material

AND udate GE w_date

and udate LE sy-datum

AND utime = w_time.

Regards,

Subramanian

Edited by: Subramanian PL on Jul 18, 2008 12:10 AM

Read only

Former Member
0 Likes
707

Hi Ginger,

You can take a range for your date or in selection screen is there you can go for select options and in your query you can do something like:

SELECT objectclas objectid changenr udate utime FROM cdhdr

INTO TABLE t_cdhdr FOR ALL ENTRIES IN t_test

WHERE objectclas = c_material

AND udate IN s_date.

With luck,

Pritam.

Read only

0 Likes
706

Just to elaborate a bit on Pritam's example:

select-options: s_udate for cdhdr-udate no-display.

start-of-selection.

move w_date to s_udate-low.

move sy-datum to s_udate-high.

move 'I' to s_udate-option.

move 'BT' to s_udate-sign.

append s_udate.

This would set the range... note that the no-display on the select-options statement would render the select-option "locked".

Read only

Former Member
0 Likes
706

Hi,

Use select-options to give low and high value ,

overwrite the high value with sy-datum.

Regards

Adil

Read only

Former Member
0 Likes
706

hi,

If You are using a selection screen then take the date in the SELECT OPTIONS.

There you can easily have LOW and HIGH values.

SELECT objectclas objectid changenr udate utime FROM cdhdr
INTO TABLE t_cdhdr FOR ALL ENTRIES IN t_test
WHERE objectclas = c_material
AND udate IN s_date
AND utime = w_time.

If You are not Using that then PLz use The Ranges Option. That will help.

Regards

Sumit Agarwal

Read only

0 Likes
706

Hi, try this one

select-options: s_date like cdhdr-udate.

INITIALIZATION.

s_date-low = w_date.

s_date-high = sy-datum.

s_date-sign = 'I'.

s_date-option = 'BT'.

APPEND s_date.

you can mention in the where condition like

udate IN s_date.

Regards.

sriram.