‎2009 Nov 20 11:30 AM
Hi Experts,
i need to pass report or function module input as table name:LFA1.
I Need to get all the data with fileds for those table.
say : i/p
paramters: s_tabname like (tabname).
here s_tabname ='lfa1'.
output :all the fileds details with whole data like se16 or se11 transaction for table.
is there any function module.
Thanks
nag
‎2009 Nov 20 11:39 AM
‎2009 Nov 20 1:13 PM
‎2009 Nov 20 2:07 PM
Hi,
you can create this easily using runtime creation of objects and SALV for display.
Although I would never do something like this...
REPORT zzzz.
DATA:
gr_itab TYPE REF TO data,
gr_salv TYPE REF TO cl_salv_table.
PARAMETERS:
p_table TYPE tabname.
FIELD-SYMBOLS:
<tab> TYPE table.
START-OF-SELECTION.
create data gr_itab type table of (p_table).
ASSIGN gr_itab->* TO <tab>.
select *
from (p_table)
into table <tab>.
TRY.
cl_salv_table=>factory(
IMPORTING
r_salv_table = gr_salv
CHANGING
t_table = <tab> ).
CATCH cx_salv_msg. "#EC NO_HANDLER
ENDTRY.
DATA:
lr_functions TYPE REF TO cl_salv_functions_list.
lr_functions = gr_salv->get_functions( ).
lr_functions->set_all( abap_true ).
gr_salv->display( ).You won't find anything simpler.
Regards,
Clemens