Skip to Content
author's profile photo Former Member
Former Member

Regarding date field

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?

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

6 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on May 19, 2008 at 11:14 AM

    Hi,

    u can just adde 1 to the date

    date = date + 1.

    regards,

    lavanya

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on May 19, 2008 at 11:14 AM

    var = '19.05.2008'.

    var = var + 1.

    Regards,

    Madan.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on May 19, 2008 at 11:19 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on May 19, 2008 at 11:20 AM

    hi,

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

    date = date1 + 1. 

    Regards,

    Santosh

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on May 19, 2008 at 11:22 AM

    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.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on May 19, 2008 at 11:56 AM

    Hi,

    You can do as below:

    start-of-selection.
    
    if sp_date is initial.
    sp_date = sp_date + 1.
    endif.
    

    Thanks,

    Sriram Ponna.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.