Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Table UI element

Hi,

I have one file upload UI element and Upload button.Once I select the file and click upload, Im appendig it to a table. So each file uploaded will be a row in the table. Now, I would like to have link for each row for one column called filename. Once I click on that link I should be able to open the file.

can any one tell me how to get links for each file in the table?

Regards,

Ravi

Former Member
Former Member replied

Hi Ravi,

There are several ways to get the file name when user click on the FileName. Below is case where i read the entire line of the Table on which the user clicked, i have a buttons on each line...just put the source on the OnClick action of the LTA of your file name in table.

Getting the context value when a button is clicked on the row.

Method OnClick

"CONTEXT_ELEMENT

Data : lr_elem type ref to if_wd_context_element,

ls_data type ZST_My_struct.

CALL METHOD WDEVENT->GET_CONTEXT_ELEMENT

EXPORTING

NAME = 'CONTEXT_ELEMENT'

RECEIVING

VALUE = lr_elem.

CALL METHOD LR_ELEM->GET_STATIC_ATTRIBUTES

IMPORTING

STATIC_ATTRIBUTES = ls_data.

ls_data is esentially the entire data of the Table Row where the click was Made.

EndMethod.

Greetings

Prashant

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question