cancel
Showing results for 
Search instead for 
Did you mean: 

How to put Download button on Webdynpro ALV

Former Member
0 Kudos

Hi,

I used SELECT_OPTIONS WDR_SELECT_OPTIONS as webdynrpo components in my ALV report.I also need download option on the output.I am using just one main view to display the results.

Also ,Output is always defaulting to 5 rows only.. Where can I change this default?

Rgds

Vara

Accepted Solutions (1)

Accepted Solutions (1)

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

I'm a little confused because you talk about both Select-Options and ALV. Which are you wanting to download and which is only dispaying 5 rows. I'm going to assume that you mean the ALV and the mention of Select-Options is actually inmaterial.

The ALV Component already has an export button built into it standard. Were you looking for something else - and if so what kind of functionality did you want.

To adjust the number of visible rows in the ALV use the configuration model interface that is exposed by the component usage: cl_salv_wd_config_table.. Here is an example. You will need to adjust the name of the component usage for the name you actually used. I used ALV - then wd_this->wd_cpuse_alv. You would need to adjust this to wd_this->wd_cpuse_<your name> and wd_this->wd_cpifc_<your name>.

DATA: l_ref_cmp_usage TYPE REF TO if_wd_component_usage.
  l_ref_cmp_usage =   wd_this->wd_cpuse_alv( ).
  IF l_ref_cmp_usage->has_active_component( ) IS INITIAL.
    l_ref_cmp_usage->create_component( ).
  ENDIF.

  DATA l_salv_wd_table TYPE REF TO iwci_salv_wd_table.
  l_salv_wd_table = wd_this->wd_cpifc_alv( ).
  DATA l_table TYPE REF TO cl_salv_wd_config_table.
  l_table = l_salv_wd_table->get_model( ).
  l_table->if_salv_wd_table_settings~SET_VISIBLE_ROW_COUNT( 20 ).

Former Member
0 Kudos

Thomas,

Sorry for the confusion.

My goal is in my ALV webdynpro report.

I should have a Selection screen with Select-options & also the output should be downloaable to excel.

Right now I am able to see the output but there is no download button on the output table.How do I activate it?

FYI.. I used Viewcontainer for Select-options and for output I used TABLE.

Rgds

Vara

Edited by: Vara K on Jan 14, 2009 7:14 PM

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

Are you sure you are using an ALV to display your output. The export button is there by default and you actually have to write code to hide it. It sounds like you have a normal table instead of an ALV.

Former Member
0 Kudos

Thomas,

My mistake.I just used table.I will go ahaed and change it.

Thank you.

Vara

Answers (0)