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.. Date range..URgent...

former_member2382
Active Participant
0 Likes
693

Hi All,

Can anyone let me know.. how to give last one month date range in select options.

Regards,

Parvez.

Hi All,

Can anyone let me know.. how to give last one month date range in select options.

Regards,

Parvez.

4 REPLIES 4
Read only

Former Member
0 Likes
655

Hi ,

You can calculate the current month , once you get it get the previous month from it and then assign this to the FM RP_LAST_DAY_OF_MONTHS

which will give you the last date of the month ( in this case last date of previous month) and then use this in your select options.

Regards

Arun

Read only

Former Member
0 Likes
655

hi,

you can manipulate the start date and end date of the previous month using any fm and use "between st_date and end_date" in your select query....but you could better build a range for the same and use it in the query...

if helpful, reward

Sathish. R

Read only

Former Member
0 Likes
655

Hi,

In the INITIALIZATION event you can do that.

v_month = sy-datum+4(2) - 1.

v_year = sy-datum+0(4).

concatenate v_year v_month 01 to v_date1

concatenate v_year v_month 31 to v_date2

Or get the 1st and last dates of the last month and

s_date-low = date1 (1st date of last month).

s_date-sign= 'I'

s_date-high = date2 (last date of last month).

s_date-option = 'BT'

append s_date.

reward if useful

regards,

anji

Read only

Former Member
0 Likes
655

Hi,

Try FM <b>LAST_DAY_OF_MONTHS</b>

reward if useful.