Rama,
One subroutine which can be called repeatedly to fetch the data from different tables as mentioned below ...?
pseudocode
perform get_data using v_table itab. "ex MARA
perform get_data using v_table itab "ex MAKT
(where v_table will be dynamic for the different table names and itab also dynamic for the structures of the respective tables).
For that even the where clause for the select queries should also be build up dynamically based on the primary keys of the respective tables.Not impossible but I say a bit complex.
Better go with the conventional way of fetching the data rather than reusing the subroutines and using dynamic internal tables and dynamic where clauses.
K.Kiran.