cancel
Showing results for 
Search instead for 
Did you mean: 

How to get filtered values from WD TABLE

giri_pailla
Explorer
0 Kudos

Hi experts,

I have a requirement to export the data from the table to spread sheet.

I can able to export the data from the table, when I switch on the filter it has to export the filtered values to the excel.

How can I achieve this requirement ?

Please suggest.

Thanks in advance,

Giri

Accepted Solutions (0)

Answers (2)

Answers (2)

ramakrishnappa
Active Contributor
0 Kudos

Hi Giri,

You can read the filtered table data by using method GET_TABLE_DATA( ) of method handler

 

DATA lt_data TYPE wdr_table_row_data_tab.

"get filtered table data
lt_data = wd_this->go_method_handler->get_table_data( ).

To know more about filter in Table ui WDA : Filtering in table UI element | Team ABAP

Hope this helps you.

Regards,

Rama

giri_pailla
Explorer
0 Kudos

Hi Rama,

Thanks for the reply,

Please correct me if I'm wrong, what is the data type of go_method_handler.

If the type ref is IF_WD_TABLE_METHOD_HNDL , then I don't see any method called GET_TABLE_DATA( ) in it.


Regards,

Giri

ramakrishnappa
Active Contributor
0 Kudos

Hi Giri,

You are not able to see method GET_TABLE_DATA as your system release is on lower side. I think this method is available in SAP_ABA 731 onwards.

Please refer the below blog for logic to read filtered table data.

Hope this helps you.

Regards,

Rama

Former Member
0 Kudos

Hi,

Refer one of my blog posts which will help you.

Reading ALV Filter values in Webdynpro ABAP

Thanks

KH

giri_pailla
Explorer
0 Kudos

Hi Katrice,

Thanks for the reply,

I have seen your link before posting itself, it seems it will work for WD ALV.I need the same functionality for normal WD Table UIE.

Is it possible to achieve ?

Regards,

Giri

harsha_jalakam
Active Contributor
0 Kudos

Hi Giri,

Once you are filtered the values, bind the filtered values to a temp node and export the values into excel sheet based on temp node. This would fetch the filtered values.

Regards,

Harsha

giri_pailla
Explorer
0 Kudos

Hi Harsha,

Thanks for reply,

Could you please let me know, where to get the filtered values to copy them to temp node. I'm using the standard interface method(IF_WD_TABLE_METHOD_HNDL-APPLY_FILTER) to filter the data.

Regards,

Giri