Well, the difference is that you pass the table to the routine using USING or TABLES.
In the first case, you get a table without , so WA_LIKE will also be a table.
In the second case, IT_DATA will be a table with a heading : this calls IT_DATA actually means IT_DATA as a structure or IT_DATA[] as a table, depending on the context. Particulary, DATA ... LIKE IT_DATA will refer to the header, not the entire internal table.
You can verify this with the debugger:
DATA T_DATA TYPE STRING_TABLE. PERFORM TEST_01 USING T_DATA. PERFORM TEST_02 TABLES T_DATA. FORM TEST_01 USING IT_DATA TYPE STRING_TABLE. DATA : WA_LIKE LIKE IT_DATA "This is a Table , WA_LINE LIKE LINE OF IT_DATA. BREAK-POINT. ENDFORM. FORM TEST_02 TABLES IT_DATA TYPE STRING_TABLE. DATA : WA_LIKE LIKE IT_DATA "This is a String , WA_LINE LIKE LINE OF IT_DATA. BREAK-POINT. ENDFORM.
source share