Application Development 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: 

Regarding date field

Former Member
0 Kudos

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

Former Member
0 Kudos

Hi,

u can just adde 1 to the date

date = date + 1.

regards,

lavanya

7 REPLIES 7

Former Member
0 Kudos

Hi,

u can just adde 1 to the date

date = date + 1.

regards,

lavanya

Former Member
0 Kudos

var = '19.05.2008'.

var = var + 1.

Regards,

Madan.

matt
Active Contributor
0 Kudos

>

> var = '19.05.2008'.

>

> var = var + 1.

>

> Regards,

> Madan.

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

matt

peter_ruiz2
Active Contributor
0 Kudos

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

Former Member
0 Kudos

hi,

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


date = date1 + 1. 

Regards,

Santosh

Former Member
0 Kudos

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.

Former Member
0 Kudos

Hi,

You can do as below:


start-of-selection.

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

Thanks,

Sriram Ponna.