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

A doubt regarding Select-Options

Former Member
0 Likes
637

Dear Friends,

Kindly clarify whether can we use comparision operators for a field belonging to select-options.

Following is the scenario:

In my selection-screen I have posting date in select-options as s_budat.

In the Select statement I have to pickup all those documents whose clearing date is less than the range in s_budat or in other words less than s_budat-low.

I have written it as following at present

where budat <= s_budat.

shall it give me the desired result?

Pls suggest.

Regards,

Alok.

6 REPLIES 6
Read only

Former Member
0 Likes
621

Hi,

select-options s_budat for budat no-intervals.

in initialization event populate like below

initialization .

s_budat-option = LT.

s_budat-sign = 'I'.

append s_budat.

select ........ where budat in s_budat.

Read only

Former Member
0 Likes
621

use like this

budat <= s_budat-low.

Read only

uwe_schieferstein
Active Contributor
0 Likes
621

Hello Alok

A date can be inside or outside a range but not not less than a range.

In your case you should use a simple parameter:


PARAMETERS:
  p_budat        TYPE d.

START-OF-SELECTION.

  SELECT * FROM ....
    WHERE ( budat < p_budat ).
...

Regards

Uwe

Read only

Former Member
0 Likes
621

Deffinately it will work.See the following code for example :


Select-Options s_budat for budat.

Start-Of-Selection.

Select * from XYZ into table ITAB where budat <= s_budat-low.

*ITAB is u r internal table

*XYZ is a DB table from where u have data.

Thats it,it will work for sure.

Reward if found helpful.

Read only

Former Member
0 Likes
621

Hello Alok-

Select-option is an internal table you cannot compare with EQ or <> keywords this type of comparision is possible with parameters.So first pull all the records by IN keyword and later delete the records as per your requirement.

Cheers,

~Srini.....

Read only

prasanth_kasturi
Active Contributor
0 Likes
621

hi,

use like this

in select options use no intervals edition

select-options s_budat for budat no-intervals.

in initialization event populate like below

initialization .

s_budat-option = LT.

s_budat-sign = 'I'.

append s_budat.

select ........ where budat in s_budat.

regards

prasanth