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

LAST YEAR DATE IN SCRIPT

Former Member
0 Likes
955

HI,

HOW CAN I GET THE DATE OF TODAY BUT IN LAST YEAR IN A SAPSCRIPT?

FOR EXAMPLE;

DATE FROM DATE TO

30.03.2006 29.03.2007

THANKS IN ADVANCE

7 REPLIES 7
Read only

Former Member
0 Likes
913

Hi,

GET TO DAY DATE USING SY-DATUM or &date& ,for lost date subtract 12 months from it.........

thanx.

Message was edited by:

rambabu kondepati

Read only

0 Likes
913

FOR DATE TO I WROTE IN THE SCRIPT &SY-DATUM& I HAVE NO PROBLEM WITH IT.

BUT FOR DATE FROM I DON'T KNOW WHAT I SHOULD HAVE BETWEEN &&

Read only

0 Likes
913

HI,

CALCULATE IT IN DRIVER PROGRAM PASS IT THRU TEXT ELEMENTS........

REGARDS

RAM.

Read only

former_member673464
Active Contributor
0 Likes
913

Hi,

You can call subroutine for calculations purpose.call a subroutine in your script and store from date in your program and you can use it .

regards,

veeresh

Read only

0 Likes
913

CAN I HAVE THE CODE OF IT PLESE

Read only

0 Likes
913

hi,

here is syntax for calling subroutine in script.

/: PERFORM <form> IN PROGRAM <prog>

/: USING &INVAR1&

/: USING &INVAR2&

......

/: CHANGING &OUTVAR1&

/: CHANGING &OUTVAR2&

......

/: ENDPERFORM

INVAR1 and INVAR2 are variable symbols and may be of any of the four SAPscript symbol types.

OUTVAR1 and OUTVAR2 are local text symbols and must therefore be character strings.

The ABAP subroutine called via the command line stated above must be defined in the ABAP report prog as follows:

FORM <form> TABLES IN_TAB STRUCTURE ITCSY

OUT_TAB STRUCTURE ITCSY.

...

ENDFORM.

The values of the SAPscript symbols passed with /: USING... are now stored in the internal table IN_TAB . Note that the system passes the values as character string to the subroutine, since the field Feld VALUE in structure ITCSY has the domain TDSYMVALUE (CHAR 80).

regards,

veeresh

Read only

Former Member
0 Likes
913

\