Skip to Content
0
Former Member
Jan 03, 2012 at 12:25 PM

Calling method of class CL_RSAR_FUNCTION from an End routine

446 Views

I am trying to determine the number of days between two dates as part of End routine logic - one of the dates is looked up and determined in the End routine.

What I am trying to do is as follows:

1. Set Key Figures based on the value the number of days returns

2. I have noticed that the formula field level routine uses the method DATE_DIFF from the class CL_RSAR_FUNCTION and I want to determine the number of days in

a similar way

What I am not sure on is how to write the logic for calling the method. So far I have written something like:

if <RESULT_FIELDS>-DATE_1 is initial.

data: date_diff type I.

CALL METHOD CL_RSAR_FUNCTION=>DATE_DIFF

ENDMETHOD. "FORMULA__2_1

What I am not sure is what I have to import and where to store the results. The two dates which I am comparing are DATE_2 and SY-DATUM

Can someone advise?

Thanks