Is it possible to return an internal table when calling a method of a class?
The idea is the following: In my method, i am calculating all periods within a certain date-range. E.g my range is: 01.01.2020 - 31.03.2020, so I want to get an internal table with the following results:
01.01.2020 - 31.01.2020
01.02.2020 - 28.02.2020
01.03.2020 - 31.03.2021
The calculation already works and i can display the results via the WRITE statement, but I am not sure how to return the result.
I created an internal table with the following structure:
TYPES: BEGIN OF periods,
begda TYPE dats,
endda TYPE dats,
END OF periods.
DATA: lt_periods TYPE STANDARD TABLE OF periods.
But I don't understand how to return the data to work with it in another method. Thank you in advance.