Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

How to get current fieldcat of salv table?

Former Member
0 Kudos
660

I've got an custom button in mine toolbar of salv table.
Can i get current (modifield ) fieldcat and data after clicking it?

4 REPLIES 4

RobertVit
Active Contributor
0 Kudos
581

Does the layout button not provide you the fields?

Kind regards
Robert

Former Member
0 Kudos
581

I found how to get fieldcat
gc_columns = gc_alv_table->get_columns( ).

gc_columns->set_optimize( ).
lo_aggregations = gc_alv_table->get_aggregations( ).
gt_fieldcat = cl_salv_controller_metadata=>get_lvc_fieldcatalog(
r_columns = gc_columnsr_aggregations = lo_aggregations ).

loop at gt_fieldcat ASSIGNING <FS_FIELDCAT> where no_out is initiaL

But how to get filtred values?

Sandra_Rossi
Active Contributor
0 Kudos
581

same way but with get_filters?

Former Member
0 Kudos
581

and what to do next? i found

gc_filters = gc_alv_table->get_filters( ).
my_value = cl_salv_controller_metadata=>GET_LVC_FILTER(

R_FILTERS = gc_filters ).


I need to loop at my table with switch and 20 cases inside? Can i do it easier or not, its EHP3 version, and methods like get_data( ) set_filter( ) get_model( ) doesn't exist.