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

re : report

Former Member
0 Likes
543

hai

1. is there any time difference for running a particular report when it is run directly

and when it is run in background.

2. how to subtract years/months/date from particular date. is there any functional module available.

thanks

rahul

hai

1. is there any time difference for running a particular report when it is run directly

and when it is run in background.

2. how to subtract years/months/date from particular date. is there any functional module available.

thanks

rahul

3 REPLIES 3
Read only

Former Member
0 Likes
526

Hi,

Check the following code for subtract years/months/date from particular date:

DATA: EDAYS LIKE VTBBEWE-ATAGE,

EMONTHS LIKE VTBBEWE-ATAGE,

EYEARS LIKE VTBBEWE-ATAGE.

PARAMETERS: FROMDATE LIKE VTBBEWE-DBERVON,

TODATE LIKE VTBBEWE-DBERBIS DEFAULT SY-DATUM.

call function 'FIMA_DAYS_AND_MONTHS_AND_YEARS'

exporting

i_date_from = FROMDATE

i_date_to = TODATE

  • I_FLG_SEPARATE = ' '

IMPORTING

E_DAYS = EDAYS

E_MONTHS = EMONTHS

E_YEARS = EYEARS.

WRITE:/ 'Difference in Days ', EDAYS.

WRITE:/ 'Difference in Months ', EMONTHS.

WRITE:/ 'Difference in Years ', EYEARS.

INITIALIZATION.

FROMDATE = SY-DATUM - 60.

Regards,

Bhaskar

Read only

Former Member
0 Likes
526

1.Out will be same in both cases but in background you can set time and it will be run automatically Ex. payment program we can set for every month no need to do any thing once it is set. It get run background

2. in SAP we can direcly do date - date will give you the number od days diffrence

20.01.2007 - 10.01.2007 give you 10 directly.

Rewards if useful......................

Minal

Read only

Former Member
0 Likes
526

Hi,

I think there is no difference when ur running in forground and running in background...

and for splitting year , month and date do following code...

variable : date1(12).

date2= sy-datum.

date1 = date2 + 0(2).

date1 = date2 + 2(2).

date1 = date2 + 4(4).

like u can split then u can pass all the value into some other date variable...

<b>reward me if it is use full answer ...</b>

praveen