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

How can I upload data from excel file from Application Server?

Hi

Can anyone tell me how can I upload data from excel file and that is from Application Server?

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Posted on Dec 08, 2005 at 07:49 PM

    You need to use the OPEN DATASET and READ DATASET statements. You may have a problem uploading from excel, you might want to try to upload from a comma delimited file, or .CSV

    Regards,

    Rich Heilman

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 08, 2005 at 08:00 PM

    Hi ,

    Please first copy the EXcel file to .DAT or .CSV file . Then upload by using GUI_UPLOAd (if from Presentation Server) or use Data sets.

    Add a comment
    10|10000 characters needed characters exceeded

    • Here is a sample, This program will upload a comma delimited file from app server, and break it up into specific fields of an ITAB.

      
      report zrich_0001
             no standard page heading.
      
      
      parameters: d1 type localfile default '/usr/sap/TST/SYS/Data1.csv'.
      
      data: begin of itab occurs 0,
            fld1(20) type c,
            fld2(20) type c,
            fld3(20) type c,
            end of itab.
      data: wa(2000) type c.
      
      
      start-of-selection.
      
        open dataset d1 for input in text mode.
        if sy-subrc = 0.
          do.
            read dataset d1 into wa.
            if sy-subrc <> 0.
              exit.
            endif.
            split wa at ',' into itab-fld1 itab-fld2 itab-fld3.
            append itab.
          enddo.
        endif.
        close dataset d1.
      
      

      Regards,

      Rich Heilman

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.