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 option for date

Former Member
0 Likes
13,183

i want give default values in select option for date (for a period)

I used

SELECT-OPTIONS y_s_mnth FOR y_v_dt_month default first to last OPTION BT.

first and last are dates.

I am getting error dialog box....specify ranges...

Please give sample code..

1 ACCEPTED SOLUTION
Read only

JozsefSzikszai
Active Contributor
0 Likes
4,448

hi Suhas,

do like:

INITIALIZATION.

y_s_mnth-sign = 'I'.

y_s_mnth-option = 'BT'.

y_s_mnth-low = <i>first_day</i>

y_s_mnth-high = <i>last_day</i>

APPEND y_s_mnth.

hope this helps

ec

5 REPLIES 5
Read only

JozsefSzikszai
Active Contributor
0 Likes
4,449

hi Suhas,

do like:

INITIALIZATION.

y_s_mnth-sign = 'I'.

y_s_mnth-option = 'BT'.

y_s_mnth-low = <i>first_day</i>

y_s_mnth-high = <i>last_day</i>

APPEND y_s_mnth.

hope this helps

ec

Read only

Former Member
0 Likes
4,448

Hi suhas,

SELECT-OPTIONS : s_date for sy-datum.

initialization.

s_date-low = first_date.

s_date-high = last_date.

append s_date.

Read only

Former Member
0 Likes
4,448

You can also define like

y_s_mnth FOR y_v_dt_month DEFAULT SPACE TO SY-DATUM.

Read only

Former Member
0 Likes
4,448

Hi Suhas,

I hope this code will help you. Reward me if it is helpful.

select-options : y_s_mnth FOR sy-datum.

initialization.

y_s_mnth-sign = 'I'.

y_s_mnth-option = 'BT'.

y_s_mnth-low = sy-datum - 30. "first_day

y_s_mnth-high = sy-datum. "last_day

append y_s_mnth.

clear y_s_mnth.

Regards,

Sagar

Read only

Former Member
0 Likes
4,448

ok