cancel
Showing results for 
Search instead for 
Did you mean: 

Multiple ALV used in Tab

ChandraMahajan
Active Contributor
0 Kudos

Hi All,

We have WD application where we are using multiple tabs. In those tabs, we are showing data in ALV. we are using 5 to 6 ALV, and as per requirement we need to set the table headings as defined by business. Setting column heading is done in WDDOINIT method for each ALV.

below code is used for it,

LOOP AT lt_columns INTO ls_column. " get header of column

ls_column-r_column->delete_header( ).

CASE ls_column-id.

WHEN 'XYZ'.

lr_col_header = ls_column-r_column->create_header( ).

lr_col_header->set_ddic_binding_field( if_salv_wd_c_column_settings=>ddic_bind_none ).

CLEAR l_string.

  • Get the text symbols

l_string = wd_assist->if_wd_component_assistance~get_text( '026' ).

lr_col_header->set_text( EXPORTING value = l_string ).

.......

.......

WHEN OTHERS.

ENDCASE.

ENDLOOP.

My Question is, each time when the application is refreshed, it will go to WDDOINIT method and execute all this code again. And as there are 5 ALV, it seems performance issue.

Is there any better way to improve on this? Also is there any way to set ALV when only particular tab is selected?

Please let me know.

Thanks,

Shekhar

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

Are you using 5 different ALV component usage for each ALV? Are the nodes different for each ALV.

You can handle this by using only one component usage and mapping the node dynamically using set_data method of interface controller.

You need to pass the name of the node to set_data method on tab click and you can configure each column there.

Below link describes how to use set_data methos

http://help.sap.com/saphelp_nw70/helpdata/EN/c3/96b9bedeff4140a3e6d4343a324a9c/content.htm

Thanks,

Feroz