How to upload an excel template file to SAP server

Dear Experts,
I am develpoing a program to generate the Excel file with a fixed template and save it to user's local drive, the excel template is stored in SAP server. I use the function module C13Z_FILE_DOWNLOAD_BINARY to do this is. But now my problem is I do not know how to upload the excel template to our SAP server. Do any friends can kindly tell me how to upload the excel template to SAP server?? Thanks.
Best Regards
Joe

Hi Joe,
Please refer following sample program:
http://abapcode.blogspot.com/2007/06/sample-program-to-upload-excel-document.html
Best regards,
Prashant

Similar Messages

  • How to Upload the excel flat file in LSMW

    Hi all,
    Can any one plz Help me,
    How to Upload a excel file format by suing the lsmw .
    Regadrs.
    [email protected]
    Upender..
    Edited by: Upender Reddy on Sep 12, 2008 8:37 AM

    Hi,
    In 7 th step of LSMW we need to specify the file ie flat file.
    In this step you describe all files to be used in the following steps:
    · Your legacy data on the PC and/or R/3 server
    · The file for the read data
    · The file for the converted data.
    As your legacy data is on the PC: ie your excel file that is tab delimited or comma delimited.
    here give ur file name, description , click data from one src structure, then delimiter is tabulator if so, in file structure click both check boxes if in ur flat file ur first row is column, file type is record end indicator, code page ASCII and conitnue that's it.
    you can go through this link very useful :
    ****************/Tutorials/LSMW/LSMWMainPage.htm.
    thanx.

  • How to upload comm seperated flate file into sap r/3?

    plz send me any simple report program

    Hi,
    Please refer code below:
    data : begin of itab1 occurs 0,
            values(1000) type c,
           end of itab1.
    PARAMETERS : p_file LIKE rlgrap-filename OBLIGATORY.
    DATA : filename TYPE string.
    DATA : w_textout LIKE t100-text.
    DATA: BEGIN OF messtab OCCURS 0.
            INCLUDE STRUCTURE bdcmsgcoll.
    DATA: END OF messtab.
    data : begin of itab occurs 0,
               BLDAT(10) TYPE C,
               BLART(2) TYPE C,
               BUKRS(4) TYPE C,
               BUDAT(10) TYPE C,
               MONAT(2) TYPE C,
               WAERS(5) TYPE C,
               NEWBS(2) TYPE C,
               NEWKO(17) TYPE C,
               WRBTR(13) TYPE C,
               SGTXT(50) TYPE C,
               GSBER(4) TYPE C,
               KOSTL(10) TYPE C,
               AUFNR(10) TYPE C,
               TNEWBS(2) TYPE C,
               TNEWKO(17) TYPE C,
               TWRBTR(13) TYPE C,
           end of itab.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
      CLEAR p_file.
      CALL FUNCTION 'F4_FILENAME'
        IMPORTING
          file_name = p_file.
    start-of-selection.
      filename = p_file.
      CALL FUNCTION 'GUI_UPLOAD'
        EXPORTING
         FILENAME                      = filename
         FILETYPE                      = 'ASC'
         HAS_FIELD_SEPARATOR           = 'X'
    *   HEADER_LENGTH                 = 0
    *   READ_BY_LINE                  = 'X'
    *   DAT_MODE                      = ' '
    *   CODEPAGE                      = ' '
    *   IGNORE_CERR                   = ABAP_TRUE
    *   REPLACEMENT                   = '#'
    *   CHECK_BOM                     = ' '
    *   VIRUS_SCAN_PROFILE            =
    * IMPORTING
    *   FILELENGTH                    =
    *   HEADER                        =
        TABLES
          DATA_TAB                      = itab1
    * EXCEPTIONS
    *   FILE_OPEN_ERROR               = 1
    *   FILE_READ_ERROR               = 2
    *   NO_BATCH                      = 3
    *   GUI_REFUSE_FILETRANSFER       = 4
    *   INVALID_TYPE                  = 5
    *   NO_AUTHORITY                  = 6
    *   UNKNOWN_ERROR                 = 7
    *   BAD_DATA_FORMAT               = 8
    *   HEADER_NOT_ALLOWED            = 9
    *   SEPARATOR_NOT_ALLOWED         = 10
    *   HEADER_TOO_LONG               = 11
    *   UNKNOWN_DP_ERROR              = 12
    *   ACCESS_DENIED                 = 13
    *   DP_OUT_OF_MEMORY              = 14
    *   DISK_FULL                     = 15
    *   DP_TIMEOUT                    = 16
    *   OTHERS                        = 17
      LOOP AT ITAB1.
          SPLIT ITAB1 AT ',' INTO ITAB-BLDAT ITAB-BLART ITAB-BUKRS ITAB-BUDAT ITAB-MONAT
                             ITAB-WAERS ITAB-NEWBS ITAB-NEWKO ITAB-WRBTR ITAB-SGTXT ITAB-GSBER ITAB-KOSTL ITAB-AUFNR.
        APPEND ITAB.
      ENDLOOP.
    Thanks,
    Sriram Ponna.

  • How to upload an excel file using ABAP.

    Hi,
    Can anyone please help me in understanding how to upload an excel file using ABAP.
    Thanks!!

    http://diocio.wordpress.com/2007/02/12/sap-upload-excel-document-into-internal-table/
    check the link
    TYPES: Begin of t_record,
    name1 like itab-value,
    name2 like itab-value,
    age   like itab-value,
    End of t_record.
    DATA: it_record type standard table of t_record initial size 0,
    wa_record type t_record.
    DATA: gd_currentrow type i.
    *Selection Screen Declaration
    PARAMETER p_infile like rlgrap-filename.
    *START OF SELECTION
    call function ‘ALSM_EXCEL_TO_INTERNAL_TABLE’
    exporting
    filename                = p_infile
    i_begin_col             = ‘1′
    i_begin_row             = ‘2′  “Do not require headings
    i_end_col               = ‘14′
    i_end_row               = ‘31′
    tables
    intern                  = itab
    exceptions
    inconsistent_parameters = 1
    upload_ole              = 2
    others                  = 3.
    if sy-subrc <> 0.
    message e010(zz) with text-001. “Problem uploading Excel Spreadsheet
    endif.
    Sort table by rows and colums
    sort itab by row col.
    Get first row retrieved
    read table itab index 1.
    Set first row retrieved to current row
    gd_currentrow = itab-row.
    loop at itab.
      Reset values for next row
    if itab-row ne gd_currentrow.
    append wa_record to it_record.
    clear wa_record.
    gd_currentrow = itab-row.
    endif.
    case itab-col.
    when ‘0001&#8242;.                              “First name
    wa_record-name1 = itab-value.
    when ‘0002&#8242;.                              “Surname
    wa_record-name2 = itab-value.
    when ‘0003&#8242;.                              “Age
    wa_record-age   = itab-value.
    endcase.
    endloop.
    append wa_record to it_record.
    *!! Excel data is now contained within the internal table IT_RECORD
    Display report data for illustration purposes
    loop at it_record into wa_record.
    write:/     sy-vline,
    (10) wa_record-name1, sy-vline,
    (10) wa_record-name2, sy-vline,
    (10) wa_record-age, sy-vline.
    endloop.

  • CRM ABAP How to upload an Excel file into an internal table?

    How to upload an Excel file using GUI_UPLOAD?? what should be the values of the parameters? The function modules ALSM_EXCEL_TO_INTERNAL_TABLE and KCD_EXCEL_OLE_TO_INT are not present in CRM. Please suggest me a way out!

    Hi saurabh,
    you can try the folowing sample..
    and make modifications according to your requirement..
    TYPE-POOLS: truxs.
    DATA: i_text_data TYPE truxs_t_text_data,
    v_filename_string TYPE string.
    DATA: BEGIN OF itab OCCURS 0,
    Name(30),
    Phone(15),
    Fax(500).
    DATA: END OF itab.
    PARAMETERS: p_file LIKE rlgrap-filename.
    START-OF-SELECTION.
    v_filename_string = p_file.
    CALL FUNCTION 'GUI_UPLOAD'
    EXPORTING
    filename = v_filename_string
    filetype = 'ASC'
    has_field_separator = 'X'
    * HEADER_LENGTH = 0
    * READ_BY_LINE = 'X'
    dat_mode = ''
    * IMPORTING
    * FILELENGTH =
    * HEADER =
    TABLES
    data_tab = i_text_data
    EXCEPTIONS
    file_open_error = 1
    file_read_error = 2
    no_batch = 3
    gui_refuse_filetransfer = 4
    invalid_type = 5
    no_authority = 6
    unknown_error = 7
    bad_data_format = 8
    header_not_allowed = 9
    separator_not_allowed = 10
    header_too_long = 11
    unknown_dp_error = 12
    access_denied = 13
    dp_out_of_memory = 14
    disk_full = 15
    dp_timeout = 16
    OTHERS = 17.
    IF sy-subrc <> 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.
    CALL FUNCTION 'TEXT_CONVERT_XLS_TO_SAP'
    EXPORTING
    i_field_seperator = 'X'
    * I_LINE_HEADER =
    i_tab_raw_data = i_text_data
    i_filename = p_file
    TABLES
    i_tab_converted_data = itab
    EXCEPTIONS
    conversion_failed = 1
    OTHERS = 2.
    IF sy-subrc <> 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.
    this is a sample code that uploads a excel file using GUI_UPLOAD, but uses another function module to convert that uploaded data into an internal table..
    regards
    satesh

  • How to upload normal excell file to ztable

    Hi All there,
    Can anybody tell me how to upload normal excell file to ztable directly.
    pl provide detail coding
    Regards
    Sagar

    Hi Sagar,
       first upload the excel data into your internal table using a FM than upload the data to your ZTABLE using BDC.
    parameters:
      p_file type rlgrap-filename          " File name
      data:
        lw_file  type string.              " File Path
    data:
      t_bdcdata type
       standard table
             of bdcdata,
      fs_bdcdata type bdcdata.             " Work area for bdcdata
    * Messages of call transaction
    data:
      t_messtab type
       standard table
             of bdcmsgcoll,
      fs_messtab type bdcmsgcoll.          " Work area for messtab
    at selection-screen on value-request for p_file.
      call function 'F4_FILENAME'
       exporting
         program_name        = syst-cprog
         dynpro_number       = syst-dynnr
         field_name          = ' '
       importing
         file_name           = p_file.
      lw_file = p_file.
      call function 'GUI_UPLOAD'
        exporting
          filename                    = lw_file
          filetype                    = 'ASC'
          has_field_separator         = 'X'
          dat_mode                    = 'X'
        tables
          data_tab                    = t_final_data
        exceptions
          file_open_error              = 1
          file_read_error              = 2
          no_batch                     = 3
          gui_refuse_filetransfer      = 4
          invalid_type                 = 5
          no_authority                 = 6
          unknown_error                = 7
          bad_data_format              = 8
          header_not_allowed           = 9
          separator_not_allowed        = 10
          header_too_long              = 11
          unknown_dp_error             = 12
          access_denied                = 13
          dp_out_of_memory             = 14
          disk_full                    = 15
          dp_timeout                   = 16
          others                       = 17.
      if sy-subrc <> 0.
        message id sy-msgid type sy-msgty number sy-msgno
              with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      endif.                               " IF SY-SUBRC <> 0
      if t_final_data is initial.
        message 'File not found'(003) type 'E'.
      endif.                               " IF T_FINAL_DATA IS INITIAL
    end-of-selection.
      perform upload_0585_data_using_bdc.  " populate the bdcdata table using tcode SHDB
      call transaction 'PA30' using t_bdcdata
                               mode 'A'
                           messages into t_messtab.
    form upload_0585_data_using_bdc.
      loop at t_final_data into fs_final_data.
    perform bdc_field       using 'Q0585-ACNTR(07)'
                                   w_curr.
    perform bdc_field       using 'Q0585-ACOPC'
                                   lw_flag.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=UPD'.
    perform bdc_dynpro      using 'MP058500' '2000'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/EBCK'.
    perform bdc_dynpro      using 'SAPMP50A' '1000'.
    endloop.
    *        Start new screen                                              *
    form bdc_dynpro using program dynpro.
      clear fs_bdcdata.
      fs_bdcdata-program  = program.
      fs_bdcdata-dynpro   = dynpro.
      fs_bdcdata-dynbegin = 'X'.
      append fs_bdcdata to t_bdcdata.
    endform.                               " Form bdc_dynpro using program...
    *        Insert field                                                  *
    form bdc_field using fnam fval.
        clear fs_bdcdata.
        fs_bdcdata-fnam = fnam.
        fs_bdcdata-fval = fval.
        append fs_bdcdata to t_bdcdata.
    endform.                               " Form bdc_field using fnam fval
    With luck,
    Pritam.

  • In an Excel template file, can I set the Folder Path in the SaveAs Dialog box?

    I have an Excel template file (xltm) and, with help from the forum, I now have a Workbook_BeforeSave subroutine to save the template as a macro enabled file (xlsm).  I’m so thankful for that help from Edward in the forum.
    I also want to set the default folder location to save the file. I really only need it when the template is saved as a new xlsm file, because if they open the xlsm file, it’s usually opened from the default folder path so any save would normally go back
    to where the file was opened.  However, with a template (even if the template is in the default folder) the Saved template reverts back to the user’s documents folder.
    Is there a good way to do this?
    I tried to modify the Workbook_BeforeSave code like this:
    Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
    Dim FolderDir As String
    Dim FileNameVal As String
    FolderDir = "Z:\save\data\place\"
    If SaveAsUI Then
    If Dir(WorkBookFolder, vbDirectory) <> "" Then
    Application.DefaultFilePath = WorkBookFolder
    End If
    FileNameVal = Application.GetSaveAsFilename(, "Excel Macro-Enabled Workbook (*.xlsm), *.xlsm")
    Cancel = True
    If FileNameVal = "False" Then 'User pressed cancel
    Exit Sub
    End If
    ThisWorkbook.SaveAs Filename:=FileNameVal & ".xlsm", FileFormat:=xlOpenXMLWorkbookMacroEnabled
    Application.EnableEvents = True
    End If
    End Sub
    But there are a lot of checks that would need to be done.
    I'm not sure how to only default the folder saved only when they open the template, but not change it when they just open an already saved Excel file created by the template (with all the active content, macros, etc.).
    Alan Edwards

    Hi Alan,
    store the path\filename in the 1st argument:
    FileNameVal = Application.GetSaveAsFilename("C:\*.xlsm", "Excel Macro-Enabled Workbook (*.xlsm), *.xlsm")
    Andreas.

  • How to upload the Excel sheet into SAP

    Hello Gurus,
    Please let me know the steps how to upload excel sheet file in sap at one time.Suppose i have entered the employee details and their caste .This detail has been maintained in Excel.I want to know the total steps how to upload this total file into SAP System.
    Regards
    AM

    . TCode : LSMW.
    2. Enter Project name, sub project name and object name.
    Execute.
    3. Maintain object attributes.
    Execute
    select Batch Input recording
    goto->Recording overview
    create
    recording name.
    enter transaction code.
    start recording
    do recording as per ur choice.
    save + back.
    enter recording name in lsmw screen.
    save + back
    Now there will be 14 steps.
    2. MAINTAIN SOURCE STRUCTURES.
    Here you have to enter the name of internal table.
    display change
    create
    save + back
    3. MAINTAIN SOURCE FIELDS.
    display change
    select structure
    source_fields->copy fields.
    a dialogue window will come .
    select -> from data file
    apply source fields
    enter No. of fields
    length of fields
    attach file
    save + back
    4. MAINTAIN STRUCTURE RELATIONS
    display change
    save + back
    5. MAINTAN FIELD MAPPING & CONVERSION RULE
    display change
    click on source field, select exact field from structue and enter
    repeat these steps for all fields.
    save+back
    6. MAINTAIN FIXED VALUES, TRANSACTION, USER DEFINED
    execute
    save + back
    7. SPECIFY FILES.
    display change
    click on legacy data
    attah flat file
    give description
    select tabulatore
    enter
    save + back
    8. ASSIGN FILE
    execute
    display change
    save + back
    9. IMPORT DATA.
    execute
    display change
    save + back
    10. DISPLAY IMPORTED DATA
    enter ok, it willl show records only.
    back
    11. CONVERT DATA
    execute
    display change
    save + back
    12. DISPLAY CONVERTED DATA
    execute
    display change
    save + back
    13. CREATE BATCH INPUT SESSION
    tick keep batch input folder
    F8
    back
    14. RUN BATCH INPUT SESSION.
    sm35 will come
    Object name will be shown here
    select object & process
    inputs given by KAPIL

  • How to upload  and download a files into AL11 directory in ABAP

    Hi,
                   How to upload  and download a files into AL11 directory in ABAP
    thanks
    Moderator message: please search for available information/documentation.
    Edited by: Thomas Zloch on Mar 21, 2011 9:18 AM

    You should try one of these forums for an answer to your question:
    http://swforum.sun.com/jive/forum.jspa?forumID=116
    http://community.java.net/netbeans
    http://linux.java.net

  • How to open an excel template and display onto a table in Laview

    Hi all,
    I would like to open an excel template file. Once called up, I would like to display it onto a table in Labview. From there, I would like to write data to the colums or rows in it. Can I do that? What do functions do I need. Please show some steps....
    Many thanks.

    What you would like to do is very easily done with the Report Generation Toolkit for MS Office. It has slightly different VI that the NIReports llb, in the way that those VIs also support Word and Excel reports. If you don�t have this toolkit, you will need to use the activeX properties and methods to set this up.
    If you would only like to open an Excel spreadsheet, you can use the File I/O VIs. To read an Excel tab deliminated file, use Read From Spreadsheet File.vi. One of its outputs is a 2D array that you feed into a LabVIEW table. Once you have the data in a LabVIEW table, you can just treat as a 2D array, and perform array functions on it to manipulate with the data
    If you do have the toolkit, please look at the examples that ship with the toolkit.
    Zve
    zdana S.

  • How to Upload pdf or ppt files from desktop to some learning object

    Hi All
    I have a query, How to Upload pdf or ppt files from desktop to some learning object, do I need to have content server for same?

    Hi,
    This is standard functionality, that you can read more about in the OLM User Manual. You can upload the files to an OLM content server or to any other content server that can be accessed with a URL.
    Regards Anders Northeved

  • How to upload words, exel, PDF file from the pc via itune to the iPad, and where will the uploaded file be saved? In the apps?

    How to upload words, exel, PDF file from the pc via itune to the iPad, and where will the uploaded file be saved? In the apps?

    You will need an app (or apps) on your iPad that is capable of reading the documents, as they will be saved with the app - if you don't have such an app then there is nothing to transfer them to or to read/access them.
    One method of transferring them is toconnect your iPad to your computer's iTunes, select it's app tab, and then scroll to the bottom of it - you should the apps That you've got that are capable of file-sharing (if you've got any).  Selecting/high-lighting one of them should then allow you to add files to it via the box to the right of it.
    An alternative way to get the documents onto your iPad is if the app that you want to transfer them to has a wifi setting, which will then allow you to transfer the documents wirelessly. You can also send the documents to yourself as attachments and then use Mail's 'open in' facility to copy them into your chosen app.
    Edit : more info on file sharing from the manual :
    File Sharing lets you transfer files between iPad and your computer. You can share files created with a compatible app and saved in a supported format.
    Apps that support file sharing appear in the File Sharing Apps list in iTunes. For each app, the Files list shows the documents that are on iPad. See the app’s documentation for how it shares files; not all apps support this feature.
    Connect iPad to your computer.
    In iTunes, select iPad in the Devices list, then click Apps at the top of the screen.
    In the File Sharing section, select an app from the list on the left.
    On the right, select the file you want to transfer, then click “Save to” and choose a destination on your computer.
    Transfer a file from your computer to iPad:
    Connect iPad to your computer.
    In iTunes, select iPad in the Devices list, then click Apps at the top of the screen.
    In the File Sharing section, click Add.
    Select a file, then click Choose (Mac) or OK (PC).
    The file is transferred to your device and can be opened using an app that supports that file type. To transfer more than one file, select each additional file.
    Delete a file from iPad: Select the file in the Files list, then tap Delete.
    Message was edited by: King_Penguin

  • How to upload and download any file from plsql through weblogic server

    hi all,
    how to upload and download any file from plsql through weblogic server? i am using oracle 10g express edition and jboss.
    Thanks and Regards,
    MSORA

    hi bala ,
    for a windown server u can use VNC (virtual network connection) which opens a session on u r desktop later u can drag and drop form there vice versa and for a linux box you can use Win SCP which helps to open a session with interface to u r desktop in both cases you can upload and down load files very easiy just as we drag and drop items in a simple pc .. we use the same technique...
    bye
    vamshi

  • How can open a html, pdf files from the server (c:\foldername\filename)

    Hi all,
    I am developing an application. in this app i have to implement RMI.
    My problem is this, How can a client open a files from the server.
    all the html, pdf files are stored in the server's directory like C:\audit\filename.
    There is a folder on the server's C directory which contains all the html , pdf files.
    please tell me how can a client open a file from the server using RMI.
    Please send me the solution as soon as possible.
    Thanks & Regards
    Bhavishya

    That's doing it the hard way. Why not use HTTP or FTP?

  • How to Get the excel sheet formula from the server side into the j2me app?

    How to Get the excel sheet formula from the server side into the j2me application?
    Here the excel sheet is in server side.i want to do get the excel sheet values (only some part of the excel sheet based on some conditions) from server side into j2me.In j2me I want to done some client side validation based on the formula of excel sheet.Then i resend the new updated data to the server.
    But here deosn't know any mehtod to get the excel sheet formula from server side.So kindly help me to get the excel sheet formula from the server.
    So how to get the excel sheet formula frome the server side into j2me Application...
    Plz guide me to solve this issue...
    thanks & regards, Sivakumar.J

    You should not post a thread more than once. You've crossposted this question to another forum. I have deleted that one.

Maybe you are looking for

  • AS2 Question/Problem..

    I have a swf where I'm calling two external swf files.  These external swf files also load data from an xml file.  The problem is that the first external swf file that I load is the only one that loads.  Well.. the other swf does load, but it loads t

  • Nokia N8 'Videos' Update (1217kb)

    I received the 'Videos' Update (1217kb) on my N8 through the Software update. I tried to update through a pc but the update didn't show up. I have tried many times to install it but the installation fails all the time. Any suggestions?

  • SQL 2008 R2 In-Place Upgrade or Fresh Install to SQL2104

    We have a server running Windows 2008 R2 and SQL 2008 R2 currently.  We will call it SQL01.  This houses databases for about 8 different applications and also has the name hard coded into a lot,  I repeat, a lot of various things. We are at the point

  • OSX and PEAP machine authentication

    We are starting to get a few OSX users in our environment, and they can't seem to authenticate to our wireless network using machine authentication with PEAP. They can bind to AD and I see the computer name in AD, but PEAP fails. Has anyone gotten th

  • Automatic Height Type on Portal Iviews

    Hi    We are developing a new look and feel for the company enterprise portal and we are facing a problem regarding automatic height off the content area and respective IViews.   Our Portal page should automatic adjust  to the current page content. T