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

SELECT-OPTIONS

Former Member
0 Likes
575

Hi

below is my code

SELTAB_WA-SELNAME = 'S_DATE'.

SELTAB_WA-KIND = 'S'.

SELTAB_WA-SIGN = 'I'.

SELTAB_WA-OPTION = 'BT'.

SELTAB_WA-LOW = V_DATE.

SELTAB_WA-HIGH = SY-DATUM.

APPEND SELTAB_WA TO SELTAB.

now my question i want to select few fields from table where date in s_date.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
539

Hi,

Use IN operator in the select statement..But it should have only sign, option, low and high..

Example.

-


RANGES: R_DATE FOR SY-DATUM.

R_DATE-SIGN = 'I'.

R_DATE-OPTION = 'BT'.

R_DATE-LOW = V_DATE.

R_DATE-HIGH = SY-DATUM.

APPEND R_DATE.

SELECT * FROM ZTABLE WHERE DATE <b>IN R_DATE</b>.

Is this what you want..

Thanks,

Naren

5 REPLIES 5
Read only

Former Member
0 Likes
539

You can achieve this usign ranges. Ranges are similar to Select options but are not shown in screen as select options do.

Use this:

Ranges R_Date for sy-datum.

R_DATE-SIGN = 'I'.

R_DATE-OPTION = 'BT'.

R_DATE-LOW = V_DATE.

R_DATE-HIGH = SY-DATUM.

Append R_DATE.

Select * from TABLE where date in R_DATE.

- Guru

Read only

Former Member
0 Likes
540

Hi,

Use IN operator in the select statement..But it should have only sign, option, low and high..

Example.

-


RANGES: R_DATE FOR SY-DATUM.

R_DATE-SIGN = 'I'.

R_DATE-OPTION = 'BT'.

R_DATE-LOW = V_DATE.

R_DATE-HIGH = SY-DATUM.

APPEND R_DATE.

SELECT * FROM ZTABLE WHERE DATE <b>IN R_DATE</b>.

Is this what you want..

Thanks,

Naren

Read only

0 Likes
539

I dont want to display the selection field on the screen. and cant we use the select-options which i mentioned above

iam using this code

SELECT-OPTIONS: S_DATE FOR LIKP-ERDAT." default sy-datum no-display.

Message was edited by:

satya v

Read only

Former Member
0 Likes
539

Hi,

Then use RANGES as described above in my previous reply..

Thanks,

Naren

Read only

Former Member
0 Likes
539

Hi satya,

Whatever narendran suggested that will work for your requirment.