Importing and Returning Value Parameter in ITAB BASICS

Hello ABAPers,

In the part, when we sort the updated table, why does the Importing parameter inside the method sort_itab got changed and received the value of the updated table?

Should updated_data not be overwritten by the initial_data (6 entries from method fill_itab)?

I don’t see in method add_to_itab something like initial_data = updated_data.

METHOD sort_itab.
updated_data = initial_data.
Sort updated_data by group ascending number descending.
ENDMETHOD.

Many Thanks

Hi ShayHoss,
I see what you’re getting at. If you look at the whole class ZCL_ITAB_BASICS from the exercise, you will note that it does not have any member variables, like the ITAB from the exercise. So we just have to assume that the methods from this class are performed on an internal table outside of the class. Note, that all the methods are public, too.