Skip to Content
avatar image
Former Member

increment date (calday)

Hello everybody!

I need sb to give me a hand with the issue of increasing date (calday). I initializad :

date = '01012006'.

how do I do the the increment? : date = date + 1. (in order to have date = '02012006')

or: CALL FUNCTION 'CALCULATE_DATE'

EXPORTING

days = '+1'

start_date = date

IMPORTING

result_date = date.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

5 Answers

  • avatar image
    Former Member
    Oct 20, 2008 at 01:11 PM

    Hi Adrian,

    use this.

    CALL FUNCTION 'RP_CALC_DATE_IN_INTERVAL'

    EXPORTING

    date = initial_date

    days = 01

    months = 0

    signum = '+'

    years = 0

    IMPORTING

    calc_date = increm_date.

    regards,

    kais

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Oct 20, 2008 at 01:21 PM

    What is the data type of the field date ?

    you can use the function CALCULATE_DATE

    but the date format that it accepts is of type sy-datum ( yyyymmdd)

    regards,

    Advait

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Oct 20, 2008 at 01:26 PM

    Do you need the next working day or the next date only. For next working day you need to know the type of calender you need to use.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Function modules can be a great help for re-usability of code. But they do have an interface which must be understood. If there is no documentation and you are new to ABAP, it's often easy to code yourself. You learn more and in this case, it's dead simple.

      Rob

  • avatar image
    Former Member
    Oct 20, 2008 at 01:38 PM

    To get next working day you can use the FM 'BKK_ADD_WORKINGDAY'. Here you need to put the calender type used for your need.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Oct 20, 2008 at 01:38 PM

    To get next working day you can use the FM 'BKK_ADD_WORKINGDAY'. Here you need to put the calender type used for your need.

    Add comment
    10|10000 characters needed characters exceeded