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

Selection Screen

Former Member
0 Likes
317

Hi,

I need to have s_date-low defaulted to previous month then s_date-high to current month.

How can I achieve this? Thanks in advance.

3 REPLIES 3
Read only

amit_khare
Active Contributor
0 Likes
297

Write Code in INITIALIZATION event.

s_date-high = sy-datum+4(2).

w_date = sy-datum - 30.

s_date-low =w_date+4(2).

Regards,

Amit

Read only

Former Member
0 Likes
297

Hi Please look into the code below.

select-options: s_date for sy-datum. "yyyymmdd

initialization.

s_date-high = sy-datum.

s_date-low0(4) = sy-datum0(4).

s_date-low4(2) = sy-datum4(2) - 1.

s_date-low6(2) = sy-datum6(2).

append s_date.

Thanks,

siddu

Read only

Former Member
0 Likes
297

HI,

see this code.


select-options: s_date for sy-datum.

initialization.
s_date-high = sy-datum.
s_date-low = sy-datum.
s_date-low+4(2) = sy-datum+4(2) - 1.
append s_date.

rgds,

bharat.