Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Adding 30 days from sysdate or any date in SAP script

Ho do I add a some days to a date in SAP Scripts. I have tried using a the following procedure.

/: DEFINE NEW_dATE = ' '

/: PERFORM ADD_DATE IN PROGRAM ZREP01

/: USING &SY-DATUM&

/: CHANGING &NEW_DATE&

/: ENDPERFORM

  • New date = &NEW_DATE&

In the program ZREP01

FORM ADD_DATE TABLE INTAB STRUCTURE ITCSY

OUTTAB STRUCTURE ITCSY .

READ TABLE INTAB INDEX 1.

OUTTAB-VALUE = INTAB-VAUE.

ADD 1 TO OUTTAB-VALUE.

CONDENSE OUTTAB-VALUE.

MODIFY OUTTAB INDEX 1.

ENDFORM.

However a value 'XX.XX.XXXX' is being passed to intab istead of the system date.

An exception is being thrown.

What could be causing that and what cold be the remedy to that problem...

Tags:
Former Member
Not what you were looking for? View more on this topic or Ask a question