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

sqvi problem

Former Member
0 Likes
965

hi experts,

can i calculate difference between two dates and print the calculated date in another column.

pls provide soln on urgent basis.

thanks,

8 REPLIES 8
Read only

Azeemquadri
Contributor
0 Likes
928

colum1 = date1

colum2 = date2

colum3 = date1 - date2. " colum3 is difference in dates.

Read only

0 Likes
928

hi azeem,

can u explain in detail.

thanks.

Read only

Former Member
0 Likes
928

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

Read only

0 Likes
928

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.

Read only

0 Likes
928

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

Read only

0 Likes
928

INFOSET NUMBER IS GENERATED BUT I AM NOT ABLE TO FIND OUT INFOSET NAME

PLS GUIDE ON THIS.

THANKS IN ADVANCE

Read only

Former Member
0 Likes
928

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

Read only

0 Likes
928

thanks bhaskar for the code but how can i add a new column of difference in sqvi