on 07-05-2010 4:05 PM
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
thx!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It creates an XML Excel file. Which is exactly what the standard ALV component does - it reuses the standard ALV functionality to create the file.
The XLS format is not open - you need to licence technology from Microsoft to create XLS files. The newer XLSX format is open and there is work currently happening to allow exporting and even importing in that format.
Cheers,
Chris
Thank you for your reply, but I have an error on your source code while I'm trying to call get_interface method at this point:
get a reference to the interface for updating details of the ALV table
lo_interface = lo_component->if_salv_wd_component_table~get_interface( ).
The following syntax error appears:
Class CL_SALV_WD_C_TABLE does not contain an interface IF_SALV_WD_COMPONENT_TABLE ...
How can I get the interface?
I don't understand if the source code is wrong, or we are working on different releases...
Can you help me?
Thanks a lot...
Hello,
I am not sure why you are getting that syntax error. But have a look at the method IF_SALV_WD_COMPONENT_TABLE~GET_INTERFACE in the class CL_SALV_WD_C_TABLE using transaction se24.
you should be able to find the method there and the return parameter of that method is of type IF_SALV_WD_COMP_TABLE_IF.
Please check if your declarations and usage is proper.
Hope this helps!
Regards,
Srilatha
Hi,
I'm 100% sure there is no method with GET_INTERFACE name, neither IF_SALV_WD_COMPONENT_TABLE interfase, I type the methods inside class CL_SALV_WD_C_TABLE:
IF_SALV_WD_COMPONENT~ADD_COMPONENT_USAGE
IF_SALV_WD_COMPONENT~BEFORE_NAVIGATION
IF_SALV_WD_COMPONENT~CREATE_COMPONENT_USAGE
IF_SALV_WD_COMPONENT~DELETE_COMPONENT_USAGE
IF_SALV_WD_COMPONENT~FIRE_EVENT
IF_SALV_WD_COMPONENT~FREE
IF_SALV_WD_COMPONENT~INIT
IF_SALV_WD_COMPONENT~POST_PROCESSING
IF_SALV_WD_COMPONENT~SET_CUSTOM_CONTROLLER
IF_SALV_WD_COMPONENT~VIEW_BEFORE_ACTION
IF_SALV_WD_COMPONENT~VIEW_GET
IF_SALV_WD_COMPONENT~VIEW_INIT
IF_SALV_WD_COMPONENT~VIEW_MODIFY
IF_SALV_WD_COMPONENT~VIEW_ON_EVENT
IF_SALV_WD_COMPONENT~VIEW_ON_HANDLE_EVENT
IF_SALV_WD_COMPONENT~VIEW_REGISTER
IF_SALV_WD_KAYAK~GET_PDF_XML
IF_SALV_WD_COMP_TABLE_PERS~DELETE
IF_SALV_WD_COMP_TABLE_PERS~LOAD
IF_SALV_WD_COMP_TABLE_PERS~SAVE
IF_SALV_WD_COMP_TABLE_PERS~SAVE_P13N
IF_SALV_WD_COMP_TABLE_PERS~SAVE_AS
IF_SALV_WD_COMP_TABLE_PERS~GET_VIEW_LIST
IF_SALV_WD_COMP_TABLE_PERS~GET_SCOPE_LIST
IF_SALV_WD_COMP_TABLE_PERS~GET_SCOPE_DEPENDENCY_LIST
IF_SALV_WD_COMP_TABLE_PERS~SET
IF_SALV_WD_COMP_TABLE_PERS~GET_DIALOG_SETTINGS
IF_SALV_WD_COMP_TABLE_PERS~GET_VIEW_SETTINGS
IF_SALV_WD_COMP_TABLE_PERS~SAVE_PROPERTIES
IF_SALV_WD_COMP_TABLE_PERS~GET_VIEW_PROPERTIES
IF_SALV_WD_COMP_TABLE_PERS~GET_VIEW_SAVE_AS
IF_SALV_WD_COMP_TABLE_PERS~GET_VIEW_DELETE
IF_SALV_WD_COMP_TABLE_PERS~GET_VIEW_SAVE
IF_SALV_WD_COMP_TABLE_PERS~GET_CONFIG
IF_SALV_WD_COMP_TABLE_PERS~GET_VIEW_FROM_LIST
IF_SALV_WD_COMP_TABLE_PERS~GET_CONFIG_DATA
IF_SALV_WD_COMP_TABLE_PERS~MAP_CONFIG_TO_MODEL
IF_SALV_WD_COMP_TABLE_PERS~SET_START_MODEL
IF_SALV_WD_COMP_TABLE_PERS~SET_VIEW_SETTINGS
IF_SALV_WD_COMP_TABLE_PERS~SET_DIALOG_SETTINGS
IF_SALV_WD_COMP_TABLE_PERS~CLOSE
IF_SALV_WD_COMP_TABLE_PERS~INIT
IF_SALV_WD_COMP_TABLE_PERS~GET_START_MODEL
IF_SALV_WD_COMP_TABLE_PERS~SET_STANDARD_VIEW
IF_SALV_WD_COMP_TABLE_PERS~SET_CONFIG_LOADED
IF_SALV_WD_COMP_TABLE_PERS~SET_VIEW_UI_LIST_CHANGED
IF_SALV_WD_COMP_TABLE_PERS~SET_VIEW_UI_ITEM_CHANGED
IF_SALV_WD_COMP_TABLE_PERS~SET_START_MODEL_FILLED
IF_SALV_WD_COMP_TABLE_PERS~SET_VIEW_LIST_CHANGED
IF_SALV_WD_COMP_TABLE_PERS~SET_VIEW_UI_LIST_CHANGED_P13N
IF_SALV_WD_COMP_TABLE_IF~DATA_CHECK
IF_SALV_WD_COMP_TABLE_IF~GET_DATA_XML
IF_SALV_WD_COMP_TABLE_IF~GET_FILTER_VALUES
IF_SALV_WD_COMP_TABLE_IF~GET_FUNCTION_ELEMENTS
IF_SALV_WD_COMP_TABLE_IF~GET_MODEL
IF_SALV_WD_COMP_TABLE_IF~GET_SERVICES
IF_SALV_WD_COMP_TABLE_IF~GET_UI_INFO
IF_SALV_WD_COMP_TABLE_IF~REFRESH
IF_SALV_WD_COMP_TABLE_IF~SET_DATA
IF_SALV_WD_COMP_TABLE_IF~SET_DATA_XML
IF_SALV_WD_COMP_TABLE_IF~SET_DIALOG_SETTINGS
IF_SALV_WD_COMP_TABLE_IF~SET_END_OF_LIST
IF_SALV_WD_COMP_TABLE_IF~SET_FILTER_VALUES
IF_SALV_WD_COMP_TABLE_IF~SET_FOCUS
IF_SALV_WD_COMP_TABLE_IF~SET_FUNCTION_ELEMENTS
IF_SALV_WD_COMP_TABLE_IF~SET_TOP_OF_LIST
CONSTRUCTOR
GET_CONFIG_CONTROLLER
GET_END_OF_LIST
GET_PARENT_COMPONENT
GET_TOP_OF_LIST
SET_COMPONENT_INTERFACE
SET_CONFIG_LOADED
SUPPLY_DRDN_VALUES
ON_NEW_DATA
ON_NEW_MODEL
Thanks.
Hi Chris,
I tried to use your logic as mentioned in your blog but I am getting Null Object reference error in the below line:
lo_interface->set_data(
exporting
only_if_new_descr = abap_false
changing
r_data_source = lo_nd_table ).
Even though this method exists IF_SALV_WD_COMPONENT_TABLE~GET_INTERFACE in the class CL_SALV_WD_C_TABLE and I am using 7.02 release as wel.
Please let me know what is the problem here.
Regards,
Sarathy.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.