cancel
Showing results for 
Search instead for 
Did you mean: 

Regarding excel file download from webdynpro table element

Former Member
0 Kudos

Hi All,

I want steps to do excel download from webdynpro table element.

Thanks in advance.

Regards,

Muneesh Gitta.

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi Kalpana

Cardanality 1..1

and selcetion 0..1

Mary

Former Member
0 Kudos

Hi Gitta,

There are 2 ways in doing it, one is using GUI DOWNLOAD FM or using class clwd_runtime_services.

DATA:

node_node_alv TYPE REF TO if_wd_context_node,

elem_node_alv TYPE REF TO if_wd_context_element,

stru_node_alv TYPE wd_this->element_node_alv,

itab_node_alv TYPE TABLE OF wd_this->element_node_alv..

  • navigate from <CONTEXT> to <NODE_ALV> via lead selection

  • @TODO handle not set lead selection

IF ( node_node_alv IS INITIAL ).

ENDIF.

  • get all declared attributes

node_node_alv->get_static_attributes_table(

IMPORTING

table = itab_node_alv ).

DATA:

node_file_download TYPE REF TO if_wd_context_node,

elem_file_download TYPE REF TO if_wd_context_element,

stru_file_download TYPE wd_this->element_file_download ,

item_fname LIKE stru_file_download-fname.

  • navigate from <CONTEXT> to <FILE_DOWNLOAD> via lead selection

node_file_download = wd_context->get_child_node( name = wd_this->wdctx_file_download ).

  • get element via lead selection

elem_file_download = node_file_download->get_element( ).

  • get single attribute

elem_file_download->get_attribute(

EXPORTING

name = `FNAME`

IMPORTING

value = item_fname ).

CALL FUNCTION 'GUI_DOWNLOAD'

EXPORTING

filename = item_fname

  • FILETYPE = 'ASC'

TABLES

data_tab = itab_node_alv.

IF sy-subrc <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

OR

check this blog for

Former Member
0 Kudos

Could you tell me wht can be the cordinality for FILE_DOWNLOAD NOde ?

Rgds,

Kalpana .

Former Member
0 Kudos

Hi Kalpana

Cardanality 1..1

and selcetion 0..1

Mary

Former Member
0 Kudos

Im getting the following error when i tired to implement the steps you suggested .

" The following error text was processed in the system EC6 : Could not ascertain code page "

Could you help me in this ?

rgds,

kalpana

Former Member
0 Kudos

Hi Kalpana,

go to ST22 transaction, run today's runtime error code, select the latest one.

"Check for source code" where exactly it is throwing error.

Mary

Former Member
0 Kudos

Hi Joseph,

Could you please give steps to do that .

Regards,

Muneesh Gitta.

Former Member
0 Kudos

Hi, Gitta,

Please refer this link for file download.

http://help.sap.com/saphelp_erp2005/helpdata/en/09/a5884121a41c09e10000000a155106/frameset.htm

also refer this example WDR_TEST_UI_ELEMENTS & WDR_TEST_EVENTS.

Mary