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

Regarding date field

Former Member
0 Likes
998

I have taken date field as select-options and I want to get value from that range intially i have the value 19.05.2008 and i want to increase it to 20.05.2008 in runtime, how can we achieve it?

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
966

Hi,

u can just adde 1 to the date

date = date + 1.

regards,

lavanya

I have taken date field as select-options and I want to get value from that range intially i have the value 19.05.2008 and i want to increase it to 20.05.2008 in runtime, how can we achieve it?

7 REPLIES 7
Read only

Former Member
0 Likes
967

Hi,

u can just adde 1 to the date

date = date + 1.

regards,

lavanya

Read only

Former Member
0 Likes
966

var = '19.05.2008'.

var = var + 1.

Regards,

Madan.

Read only

matt
Active Contributor
0 Likes
966

>

> var = '19.05.2008'.

>

> var = var + 1.

>

> Regards,

> Madan.

If var is type d, or type a data dictionary date type.

matt

Read only

peter_ruiz2
Active Contributor
0 Likes
966

hi,

you could add 1 to your date parameter to increment your dates.

for example:


p_date = 20080519. "YYYMMDD

do 5 times.
add 1 to p_date.

write: / p_date.
enddo.

the output would be.

20080520

20080521

20080522

20080523

20080524

you could also check if you have already reached the last day of the month via FM NUMBER_OF_DAYS_PER_MONTH_GET

regards,

Peter

Read only

Former Member
0 Likes
966

hi,

do this way .. Just add one to the date to get the next date ..


date = date1 + 1. 

Regards,

Santosh

Read only

Former Member
0 Likes
966

Hi,

Check the below code.

selection-screen begin of block blk1 with frame.

select-options: s_date for sy-datum default sy-datum.

selection-screen end of block blk1.

start-of-selection.

if not s_date[] is initial.

s_date-low = s_date-low + 1.

endif.

write:/ s_date-low.

Read only

Former Member
0 Likes
966

Hi,

You can do as below:


start-of-selection.

if sp_date is initial.
sp_date = sp_date + 1.
endif.

Thanks,

Sriram Ponna.