Skip to Content

How to call manually Export to Excel event of ALV standar component

Hi gurus,

I want to call manually Export to excel standar event within my wda application but I don't know which is the way to do it?

Is there any place to call it directly? Example: draw a custom button that calls Expor standar function pressing on it...

Thanks

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Jul 06, 2010 at 02:08 AM

    Hello,

    have a look at my blog -

    [Using WD ABAP ALV export - the hacked way|http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/19646] [original link is broken] [original link is broken] [original link is broken];

    this give you a code example of how to call the ALV Excel export functionality from a button other than the standard ALV export one. (you don't even need to be displaying an ALV table in your app).

    Hope this helps,

    Chris

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi,

             I am facing the same problem which you was, please help me if you come with a any solution for this.I want to add my custom header on the ALV after downloading it into excel sheet.

      Thanks and regards,

      Mandar Gavkar

  • avatar image
    Former Member
    Jul 06, 2010 at 01:30 AM

    you can do:

    
    DATA:
    
    lr_filter                       TYPE REF TO if_salv_wd_std_functions,
    lcn_alv                         TYPE REF TO if_wd_context_node,
    lr_interfacecontroller          TYPE REF TO iwci_salv_wd_table,
    l_value                         TYPE REF TO cl_salv_wd_config_table.
    
    lcn_alv = wd_context->get_child_node( name = if_main_view=>wdctx_alv ). "your main view name and ALV node at the context node"
    lr_interfacecontroller = wd_this->wd_cpifc_alv( ). "your ALV name
    l_value = lr_interfacecontroller->get_model( ).
    
    IF l_value IS NOT INITIAL.
    
    lr_filter  ?= l_value. 
    lr_filter->set_export_allowed( abap_true ).
    
    ENDIF
    
    

    thanks!

    Jason PV

    Add comment
    10|10000 characters needed characters exceeded

  • Jun 02, 2011 at 03:13 PM

    thx!

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Arunagiri A

      Hi,

             I am facing the same problem which you was, please help me if you come with a any solution for this.I want to add my custom header on the ALV after downloading it into excel sheet.

      Thanks and regards,

      Mandar Gavkar