cancel
Showing results for 
Search instead for 
Did you mean: 

Adding multiple files to the ALV format.

Former Member
0 Kudos

Hi Friends,

I created the application with a file upload UI and view container UI element. And i used interface controller as ALV component.

Right now i want to add the multiple files to the ALV component.

I have a node NODEFILES and on the button event ONACTIONSUBMIT

----


lo_nd_filelist = wd_context->get_child_node( name = wd_this->wdctx_filelist ).

  • get element via lead selection

lo_el_filelist = lo_nd_filelist->get_element( ).

  • get all declared attributes

    • lo_el_filelist->get_static_attributes(

    • IMPORTING

    • static_attributes = ls_filelist ).

data:

itab_files type table of ZFILES

itab_files_all type table of ZFILES.

ls_filelist-ZFILE_NO = 1.

ls_filelist-zfile_name = lv_filename.

ls_filelist-ZFILE_SIZE = file_size.

ls_filelist-zdate = sy-datum.

ls_filelist-ztime = sy-uzeit.

append ls_filelist to itab_files.

data: lr_node type ref to if_wd_context_node.

lr_node = wd_context->get_child_node( 'NODEFILES' ).

lr_node->bind_elements( itab_files_all ).

And i want to add to this ALV as many files as possible from the upload UI element.

Techies have any ideas on this.

Thanks .

Srinivas.

Accepted Solutions (0)

Answers (1)

Answers (1)

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

>And i want to add to this ALV as many files as possible from the upload UI element.

>Techies have any ideas on this.

You seem to already have a pretty good idea of how to structure things here. What part are you having problems with? The actual upload. Getting the information into the ALV isn't anything special, just normal context binding stuff

Former Member
0 Kudos

Hi Thomas Jung,

When i debugged the code

DATA ls_filelist TYPE wd_this->element_filelist.

ls_filelist-ZFILE_NO = 1.

ls_filelist-zfile_name = lv_filename.

ls_filelist-ZFILE_SIZE = file_size.

ls_filelist-zdate = sy-datum.

ls_filelist-ztime = sy-uzeit.

append ls_filelist to itab_files.

I thought the values will come from context, but it is not coming from there.

When ever i select a file the values are not coming , so thats why i used the statement

append ls_filelist to itab_files.

I donot have problem with 1st file,when i go and select the second file , it is getting added to the lead selection.

Is there any probelm with the context. Or did you see any other problem ?

Srini.