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 on date

Former Member
0 Likes
2,282

Hi All,

I have a select-options variable on a date variable in which i want to default the date range as last week. I tried the following but it didnt worked.

SELECT-OPTIONS:

s_date FOR pa0000-begda default sy-datum - 7 to sy-datum.

Any clues how it can be done.

Thanks & Regards,

Rahul Rathi

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,096

Hi

SELECT-OPTIONS: S_DATE FOR SY-DATUM.

INITIALIZATION.

S_DATE(3) = 'IEQ'.

S_DATE-LOW = SY-DATUM - 7.

S_DATE-HIGH = SY-DATUM.

APPEND S_DATE.

Max

5 REPLIES 5
Read only

Former Member
0 Likes
1,097

Hi

SELECT-OPTIONS: S_DATE FOR SY-DATUM.

INITIALIZATION.

S_DATE(3) = 'IEQ'.

S_DATE-LOW = SY-DATUM - 7.

S_DATE-HIGH = SY-DATUM.

APPEND S_DATE.

Max

Read only

Former Member
0 Likes
1,096

hi do like this

SELECT-OPTIONS:

s_date FOR pa0000-begda .

initialization ."event

s_date-low = sy-datum-7.

s_date-high = sy-datum-7.

it wii work now.

mark points if helpful.

regs

manas raznjan panda.

Read only

Former Member
0 Likes
1,096

Hi Rahul,

Try this:

INITIALIZATION.

s_date-low = sy-datum - 7.

s_date-high = sy-datum.

Append s_date.

SELECT-OPTIONS:

s_date FOR pa0000-begda.

Hope this helps you,

Regards,

Pragya

Read only

0 Likes
1,096

Hii..

you can try out this code

INITIALIZATION.

S_DATE(3) = 'BT'.

S_DATE-LOW = SY-DATUM - 7.

S_DATE-HIGH = SY-DATUM.

APPEND S_DATE.

Read only

Former Member
0 Likes
1,096

Hi Rahul,

if you mean last week as the last 7 days than use

the mentioned puposes.

If you mean last week as the intervall of the

last week (mo - su) than try the FMs:

GET_WEEK_INFO_BASED_ON_DATE

LAST_WEEK and NEXT_WEEK

and put it in the s_date-low and s_date-high.

Regards, Dieter