2007 Sep 13 8:03 AM
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
2007 Sep 13 8:05 AM
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
2007 Sep 13 8:09 AM
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
2007 Sep 13 8:12 AM
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
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |