Looping at variated internal tables with one single statement
I'm tring to loop at tree different tables with the same loop statement.
The code looks like this:
DATA w_table_name TYPE string.
IF r_contr = 'X'. " Contratos
w_table_name = 'it_contrato'.
ELSEIF r_oper = 'X'. " Operandos
w_table_name = 'it_operando'.
LOOP AT (w_table_name).
The problem is, it dosen't work at all!
I've also tried to use FIELD-SYMBOLS, but it failed again (field-symbols don't support this kind of reference).
Thanks for the help.