cancel
Showing results for 
Search instead for 
Did you mean: 

RE : Uploading Excel file into abap wd screen

Former Member
0 Kudos

Hi All ,

My requirement is uploading excel file and showing it contents on internal table of the webdynpro screen.

I was able to upload CSV file and text file to wd abap screen , but , I don't want to convert excel file to CSV file or text file .

Just , i want to Upload the excel file to webdynpro screen as it is.

I searched all the forum i didn't get the solution.

Please help me

Thanks

Raj

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Have you tried using office Control UI element.

Former Member
0 Kudos

HI BHASKARAN ,

Thanks for your response.

I don't want to see Excel page on webdynpro screen using office control.

I am fine with CSV file and text file

Just , i want to upload the excel file (.xls extension ) and display contents of the excel in the table UI element of the wd screen.

Thanks ,

Rajpal

Answers (1)

Answers (1)

Former Member
0 Kudos

Iam new to this forum . Unfortunately i clicked as answered but its not

Former Member
0 Kudos

Raj,

see this wiki if it helps [http://wiki.sdn.sap.com/wiki/display/WDABAP/WDAforuploadingDatafrom+Excelsheet|http://wiki.sdn.sap.com/wiki/display/WDABAP/WDAforuploadingDatafrom+Excelsheet]

Former Member
0 Kudos

HI Bhaskar ,

I tried this link . That link is not clear to me .

In that code , they declared like

data : stru_up type if_sec=>element_up ,

but there is no information about the attributes of that structure.

Please let me know the structure of the stru_up .

Regards ,

Rajpal

Former Member
0 Kudos

This is true. it is a good document but missing valuable information on that.

if_sec=>element_up is to be interpreted as

view name is sec.

context node name is up ,cardinality 1..1,and it has a attribute FILE with type XSTRING. This basically used to get the uploaded file.

when the go button is clicked according to the wiki, the method does parsing the xstring and display it on the table.

the view also has a context node content o..n with attributes like num,name1,name2,name3 etc.

You need to modify the code to adjust to your need and append bind the itab to the content node which is binded to the table UI.

Former Member
0 Kudos

Bhaskar ,

I tried as you said . when we are converting Xstring to string the application giving dump at the line

convt->read( importing data = s_cont ).

and saying that " a character set conversion is not possible " .

what could be the reason .

Thanks

Former Member
0 Kudos

was this line executed without problem ?

convt = cl_abap_conv_in_ce=>create( input = item_file ).

Former Member
0 Kudos

Yes .

For CSV files and text files this code working fine.

It is giving dump for the excel file saying that "Character set conversion is not possible " .

Former Member
0 Kudos

how are you uploading the XLS file and what is the type passed to item_file, i assume it is xstring.

Former Member
0 Kudos

Iam uploading excel file with tab delimited using file upload UI element

Type of item_file is xstring only.

Former Member
0 Kudos

i think it is still to do with your xls files and the way you upload it. Where does this tab_delimited happening ?

Try with another normal excel file if you are able to convert it.

Former Member
0 Kudos

Tried with normal excel also . It is not working