Skip to Content
author's profile photo Former Member
Former Member

Excel file upload in Webdynpro ABAP

Hello Friends,

I have gone through several threads regarding the excel file upload in Webdynpro Application.

Threads dates back to 2010 and before ( Old threads ).

Is it still not possible to upload the excel file directly into Webdynpro application. Is it necessary to create a text tab delimited file from that excel and upload ?

Expecting your valuable inputs.

Thank you.

Best Regards,

Hari.

Add a comment
10|10000 characters needed characters exceeded

Related questions

8 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Jun 11, 2012 at 09:34 AM

    Solved on my own.

    Not possible to directly upload excel file.Only Comma separated or Text tab demilited file can be uploaded into Webdynpro Application

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Apr 17, 2012 at 04:12 PM

    Eh?

    To my understanding this is possible...

    http://wiki.sdn.sap.com/wiki/display/WDABAP/Excel+File+Upload+And+Display+Data+Using+Web+DynPro+ABAP

    You mean uploading an excel file without copy-paste its content into a txt.file and making ";" between for seperators or the like, do I understand correctly? Should work using the approach in Patel's Wiki 😭

    Cheers, Lukas

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Apr 18, 2012 at 04:01 AM

    Hi,

    First you need to download a template from your Web Dynpro application and fill the data into that excel file and save it and upload the same file, then the data gets uploaded into your application.

    For every application you need to do this because there is some format which the WDA application can understand which is specific to its respective applications only so you need to download a template fill it and then upload. If you try using other excel file which is not downloaded from your application the data

    would still get uploaded but you can see in some kind of binary format which cannot be converted into strings or any other type.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Apr 18, 2012 at 04:58 AM

    Hi hari,

    No need to copy it into a plain text file delimited by ';'. In built function modules are there to convert excel data into internal tables.

    1. Use a FileUploadUIElement to upload the file.

    2. The uploaded file content will be raw data( xstring).

    3. Pass it to TEXT_CONVERT_XLS_TO_SAP if file is xls.

    4.In case of xlsx use

    'ALSM_EXCEL_TO_INTERNAL_TABLE' or 'KCD_EXCEL_OLE_TO_INT_CONVERT'

    5. Now you can process the internal table data which is received from the Function Module

    Regards,

    Fareez

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Apr 26, 2012 at 07:14 PM

    Hi Hari,

    I tried few solutions suggested by lot of people nothign worked, Please let me know if you find any solution,if i find it i will share that with you here.

    Bye

    sasi

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Apr 27, 2012 at 09:14 AM
    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on May 10, 2012 at 05:32 AM

    Hello Hari,

    Try and follow the steps given in the link below

    http://www.saptechnical.com/Tips/ABAP/UploadExcel/Prg.htm

    Regards,

    Tushar

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on May 10, 2012 at 06:25 AM

    Hi Hari...

    Try this...

    Create a componenet controller

    Create View

    Create Window

    And in ONACTIONUPLOAD method of View give the fllowing code..

    method onactionon_upload .
    types: begin of s_data,
    name(15) type c,
    age(2) type c,
    end of s_data.
    data: it_table1 type standard table of s_data,
    i_data type standard table of string,
    lo_nd_data type ref to if_wd_context_node,
    lo_el_data type ref to if_wd_context_element,
    l_string type string,
    fs_table type s_data,
    l_xstring type xstring,
    fields type string_table,
    lv_field type string.


    wd_context->get_attribute(

    exporting
    name = 'DATASOURCE'
    importing
    value = l_xstring
    ).

    call function 'HR_KR_XSTRING_TO_STRING'
    exporting
    * FROM_CODEPAGE = '8500'
    in_xstring = l_xstring
    * OUT_LEN = OUT_LEN
    importing
    out_string = l_string
    .

    split l_string at cl_abap_char_utilities=>newline into table i_data.

    loop at i_data into l_string.
    split l_string at cl_abap_char_utilities=>horizontal_tab into table fields.

    read table fields into lv_field index 1.
    fs_table-name = lv_field.

    read table fields into lv_field index 2.
    fs_table-age = lv_field.

    append fs_table to it_table1.


    endloop.

    lo_nd_data = wd_context->get_child_node( name = 'DATA_TAB' ).
    lo_nd_data->bind_table( it_table1 ).

    endmethod.

    Regards

    Pradeep


    COmp_Contro.JPG (87.4 kB)
    view.Jpg (126.8 kB)
    Winodw.Jpg (82.7 kB)
    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.