‎2008 Mar 17 12:45 PM
hi experts,
can i calculate difference between two dates and print the calculated date in another column.
pls provide soln on urgent basis.
thanks,
‎2008 Mar 17 12:47 PM
colum1 = date1
colum2 = date2
colum3 = date1 - date2. " colum3 is difference in dates.
‎2008 Mar 17 1:22 PM
‎2008 Mar 17 12:50 PM
I think that is possible.
You migt have to declare a field group in the Infoset. and in the Infoset you will have to write code to perform this logic.
Let me know if you need any more information.
Hope this helps.
Thanks,
Balaji
‎2008 Mar 17 12:54 PM
hi Balaji,
as i don't have knowledge about infoset can u explain me the step how to perform the infoset in detail by giving some simple solution.
thanks in advance.
‎2008 Mar 18 6:15 AM
1. In SQVI check the Infoset name associated with the query you are trying to run.
2. Go to SQ02 using the infoset name.
3. Select "Field Groups" on the toolbar. Add the field in this field group.
4. Go to the "Code" tab on the next screen.
5. Select "Code Section" as "Record Processing" and write the code to populate the
column.
6. Activate the Infoset and then activate the Query also.
Hope this helps.
Thanks,
Balaji
‎2008 Mar 18 9:17 AM
INFOSET NUMBER IS GENERATED BUT I AM NOT ABLE TO FIND OUT INFOSET NAME
PLS GUIDE ON THIS.
THANKS IN ADVANCE
‎2008 Mar 17 1:09 PM
Hi,
Try like this:
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
‎2008 Mar 17 1:27 PM
thanks bhaskar for the code but how can i add a new column of difference in sqvi