Excel Save As functionality using ABAP

Hi Gurus,
   I have an Excel file on Presentation server. I need to save this file in specified directory in Presentation server (Means Save As functionality). How can I do it in ABAP.
Is there any API available. Could you help me on this.
Thanks,
Rayudu

Hi,
To upload the Excel file, please refer this thread :
Re: Upload excel file
To download the Excel file on application server, please refer this thread :
Excel download in Application Server
To summarize :
You need to use GUI_UPLOAD to upload the excel file and need to use FM MS_EXCEL_OLE_STANDARD_DAT to download the excel file on application server.
Best regards,
Prashant

Similar Messages

  • Copy Function using ABAP Exit Function

    Hi Experts,
    I am trying to write a copy function using Exit Function (ABAP Code) for BPS-BW. Can anyone suggest me any how-to document provided by SAP for this purpose which mentions the standard steps as well as exactly where to change if I want to change some characteristics values. e.g. I would like to copy from one submission to another, so I would like to change the values of the characteristics SUBMISSION.
    Points will be rewarded.
    Thanks in advance

    Or alternatively you can suggest me, what changes do I need to make in the following code if I want to append to the xth_data rather than replacing the values. I want to use it for copy purpose to want to add extra record in the cube with modified characteristic value rather than replacing the first with the second.
    ""Local Interface:
    *"  IMPORTING
    *"     REFERENCE(I_AREA) TYPE  UPC_Y_AREA
    *"     REFERENCE(I_PLEVEL) TYPE  UPC_Y_PLEVEL
    *"     REFERENCE(I_METHOD) TYPE  UPC_Y_METHOD
    *"     REFERENCE(I_PARAM) TYPE  UPC_Y_PARAM
    *"     REFERENCE(I_PACKAGE) TYPE  UPC_Y_PACKAGE
    *"     REFERENCE(IT_EXITP) TYPE  UPF_YT_EXITP
    *"     REFERENCE(ITO_CHASEL) TYPE  UPC_YTO_CHASEL
    *"     REFERENCE(ITO_CHA) TYPE  UPC_YTO_CHA
    *"     REFERENCE(ITO_KYF) TYPE  UPC_YTO_KYF
    *"  EXPORTING
    *"     REFERENCE(ET_MESG) TYPE  UPC_YT_MESG
    *"  CHANGING
    *"     REFERENCE(XTH_DATA) TYPE  HASHED TABLE
    FIELD-SYMBOLS: <ls_data> TYPE ANY,
    <ch_struct> TYPE ANY,
    <cl_coorder> TYPE ANY.
    LOOP AT xth_data ASSIGNING <ls_data>.
    now <ls_data> points to a line of xth_data and can
    be used to reference each characteristic and/or
    keyfigure contained within.
    choose first structure which contains the characteristics.
    ASSIGN COMPONENT 'S_CHAS' OF STRUCTURE <ls_data> TO
    <ch_struct>.
    *Assign fields for value assignment in the record (ls_data)
    choose the characteristic '0COORDER' (use uppercase)
    ASSIGN COMPONENT '0COORDER' OF STRUCTURE <ch_struct> TO
    <cl_coorder>.
    *<cl_coorder> now contains the value of the internal order in the
    *record...
    *Make the changes in the values
    <cl_coorder> = '2'.
    When I am changing <cl_coorder> value to '2', I want it to get appened to xth_data as an additional record. That means the earlier <cl_coorder> value must be available in the cube as it is. What changes do I need to do in the code, please suggest.

  • Why should we using ABAP code in RSQ02

    Hi,
    I want to know why should we using ABAP cobe in RSQ02 ,
    while we creating the infoset we writing code using extras icon .
    with out abap code we can't creat infoset query in SAPBW?
    Regards,
    Goodyear.

    Hi dear,
    this is only an additional possibility to manipulate your data, but this is not due !
    Did you know that Marc Bernard wrote a very useful doc about ABAP and BW ?
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/events/bw-and-portals-05/five ways to enhance sap bi backend functionality using abap.pdf
    Hope it helps!
    Bye,
    Roberto

  • How to upload Excel file in BI using function module in abap program

    How to upload Excel file in BI using function module in abap program?

    Hi Anuj,
    To upload the file , you can try a standard program "RSEPSFTP" .
    while you execute the program , a selection screen appears in which the inputs should be give as
    RFC destination - The target server name
    FTP command- PUT
    local file - your file name
    local directory - path of your local file
    remote file - your target file name
    remote directory - where it has to be stored
    Hope this is useful for you
    Thanks & regards
    Anju

  • Original document should not copy thro save as Function in WORD & EXCEL

    Hi,
    When the microsoft originals like Word or XL file are displayed using ECL viewer in document display transaction (CV03N), the originals can be copied to local disc using " SAVE AS" function in microsoft word and excel menu. Is there any option to make those button in display mode.
    Please suggest.
    Regards
    Chandrasekaran

    Hi
    SAP DMS and also ECL Viewer & Office viewer does not have any authorization object for controlling "save as.." function.
    All existing authorization objects are related to Display originals. It means that if users have authorization object for Display an original, also they can "save as" this original.
    But you can set "save as" to gray (display) with ABAP codes by changing related screens.
    regard,
    akbar rangamiz

  • How to upload excel file in Webdynpro application using ABAP

    Hi Experts,
    Am developing a webdynpro application in which it will take an excel file as input and display the contents in the form of a table in output. I am able to upload tab delimited text file and populate the table using the below code but not able to do the same with .xls file. Pls let me know if I need to use a different function module for upload excel file.
    get single attribute
      wd_context->get_attribute(
        EXPORTING
          name =  `DATASOURCE`
        IMPORTING
          value = l_xstring ).
      CALL FUNCTION 'HR_KR_XSTRING_TO_STRING'
        EXPORTING
          in_xstring = l_xstring
        IMPORTING
          out_string = l_string.
      SPLIT l_string  AT cl_abap_char_utilities=>newline INTO TABLE i_data.
    Bind With table Element.
      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 t_table1.
      ENDLOOP.
    lo_nd_data = wd_context->get_child_node( 'DATA_TAB' ).
    lo_nd_data->bind_table( T_TABLE1 ).
    Thanks,
    Subathra

    Dear Exports
    Can anyone guide me how to uplode the .xlsx or ..xls formatted excel file using abap webdynpro without converting it to .txt file. Because my client requirement is only to upload the excel file. because to convert the .xlsx flie to .txt file it will be time taking and cost expanssive. Another requirement is suppose today i have create a application for uploading a file which has 8 columns and 10 rows. suppose tomorrow the client will make some changes in that flat file means the client will add 2 extra columns and 10 more columns in that fil. and will upload that file. Then the new file will be display on the browser or old file. but my requirement is to display the new file in browser.
    Can anyone kindly help to solve my problem. I am completely fresher in this field and I need to do it as soon as possible. Please help to solve the problem. 
    Regards
    Rashmita

  • 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&#8242;
    i_begin_row             = ‘2&#8242;  “Do not require headings
    i_end_col               = ‘14&#8242;
    i_end_row               = ‘31&#8242;
    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.

  • Upload an excel file input into an itab,display in ALV using ABAP objects

    Requirement:
    Create a selection screen which takes an excel file as input with parameters emp id, emp name, salary, mnth, ph no.
    Create a database table with the same fields.
    The program needs to have two modes. Display mode and update mode.
    Display mode only displays the file data in alv grid and update mode updates database table with similar parameters as above and also shows alv grid output.
    task is to do using Object oriented approach. This should also have the facility to modify the cell values in ALV grid and once saved then it needs to update the database accordingly.
    I have done the same functionality in a report program without using ABAP objects but finding difficulty in using object oriented approach.Please help me as i am new to abap-objects.
    Thanks in advance.......

    Hi,
    The selection screen design and all remains the same.
    Get all the detials which you need in your final internal table.
    This internal table will be used to display in the ALV grid.
    The approach remains the same as the normal programing.
    Prepare a field catalog table and then use it along with the internal table to display in the grid.
    The only change is that instead of FM you will have to make us of classes and their methods.
    Firstly you will have to create a screen.
    On this screen create a custom control object and give it some name. say for eg. CC_CONTAINER.
    This will be a container on which the ALV grid object will be placed.
    2 objects are needed to display the grid
    CL_GUI_CUSTOM_CONTAINER and CL_GUI_ALV_GRID.
    In the PBO of the screen first create an instance of object CL_GUI_CUSTOM_CONTAINER
    CREATE OBJECT y_lobj_cont
          EXPORTING
             container_name              = 'CC_CONTAINER'
          EXCEPTIONS
            cntl_error                  = 1
            cntl_system_error           = 2
            create_error                = 3
            lifetime_error              = 4
            lifetime_dynpro_dynpro_link = 5
            OTHERS                      = 6.
        IF sy-subrc NE 0.
          MESSAGE ID sy-msgid TYPE y_k_s NUMBER sy-msgno
                   WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
        ENDIF.
    Then create a instance of the GRID
    IF y_lobj_grid IS INITIAL.
          CREATE OBJECT y_lobj_grid
            EXPORTING
              i_parent          = y_lobj_cont
             EXCEPTIONS
               error_cntl_create = 1
               error_cntl_init   = 2
               error_cntl_link   = 3
               error_dp_create   = 4
               OTHERS            = 5 .
          IF sy-subrc NE 0.
            MESSAGE ID sy-msgid TYPE y_k_s NUMBER sy-msgno
                       WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
          ENDIF.
        ENDIF.
    Then call the method SET_TABLE_FOR_FIRST_DISPLAY to display the grid.
    CALL METHOD y_lobj_grid->set_table_for_first_display
          EXPORTING
            it_toolbar_excluding          = y_v_lt_exclude
          CHANGING
            it_outtab                     = y_li_tbl
            it_fieldcatalog               = y_li_fcat
          EXCEPTIONS
            invalid_parameter_combination = 1
            program_error                 = 2
            too_many_lines                = 3
            OTHERS                        = 4.
        IF sy-subrc NE 0.
          MESSAGE ID sy-msgid TYPE y_k_s NUMBER sy-msgno
                     WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
        ENDIF.
    Check the example program BCALV_GRID_EDIT for better understanding.
    Regards,
    Ankur Parab

  • Save a attachment file in the shared folder of receiver using ABAP report

    Hi all
    Is it possible to save an attachment file in the folder of receiver's desktop using ABAP report?
    I am using the standard mail sending code to mail the excel file as an attachment.
    Consumer wants that file to be stored automatically in the folder of a shared drive he is using.
    Is it possible?

    You can do that via class CL_GUI_FRONTEND_SERVICES method gui_download. But this is not working in background. Reports running in background cant reach presentation servers.
    If you have XI/PI in place you can set up a scenario for that.

  • SmartView disables the "Save As" Function in MS Excel 2007 / Vista

    Does anyone know how to get around this issue? I have Vista and Office 2007. When SmartView is installed, it does not allow me to use the "Save As" Function in Excel. SmartView has now rendered my Excel to be useless. Thank you Oracle.
    Does anyone have any thoughts?
    Thanks,

    Hi,
    Could this be related to this thread:
    Smartview Office Error (Unable to Save)
    Seb

  • How to extract a query in EXCEL Form using ABAP?

    Hi,
      is there a way using ABAP to extract the results from a specific BW Query and save them in an EXCEL format file?

    Hi,
    You can do it by using InfoSpoke or RSCRM_BAPI.
    see in the following URL, there one blog  in(https://wiki.sdn.sap.com/wiki/display/profile/Surendra+Reddy)
    How to transfer the Data from SAP-System to Non-SAP system without additional Cost/License
    /people/surendrakumarreddy.koduru/blog/2009/03/11/how-to-transfer-the-data-from-sap-system-to-non-sap-system-without-additional-costlicense
    Re: Running Quaries automatically and saving them in as a Excel file in Server
    Re: Data transfer to external systems
    Re: Loading from a Custom R/3 Table
    Re: How can I schedule my Bex report to execute in background
    Re: How can I insert the RSCRM_BAPI into Process chain?
    Thanks
    Reddy

  • ActiveX Save As function for Microsoft Excel 97- Excel 2003 & 5.0/95 Workbook (*.xls)

    Can someone show me how to use Active X - Save As function?
    I want to save it in  Microsoft Excel 97- Excel 2003 & 5.0/95 Workbook (*.xls)
    thanks in advance!
    Best regards,
    Krispiekream
    Solved!
    Go to Solution.

    Oh,
    I thought people stopped reading my other post so I posted another.
    sorry.
    but i found the solution
    FileFormat variant name integer code
    Microsoft Excel Workbook xlWorkbookNormal -4143
    Web Page xlHTML 44
    Template xlTemplate 17
    Text (Tab Delimited) xlCurrentPlatformText -4158
    Unicode Text xlUnicodeText 42
    Microsoft Excel 5.0/95 Workbook xlExcel5, xlExcel7 39
    Microsoft Excel 97-2000 & 5.0/95 Workbook xlExcel9795 43
    CSV (Comma Delimited) xlCSV 6
    Microsoft Excel 4.0 Worksheet xlExcel4 33
    Microsoft Excel 3.0 Worksheet xlExcel3 29
    Microsoft Excel 2.1 Worksheet xlExcel2 16
    Microsoft Excel 4.0 Workbook xlExcel4Workbook 35
    WK4 (1-2-3) xlWK4 38
    WK3, FM3 (1-2-3) xlWK3FM3 32
    WK3 (1-2-3) xlWK3FM3 15
    WK1, FMT (1-2-3) xlWK1FMT 30
    WK1, ALL (1-2-3) xlWK1ALL 31
    WK1 (1-2-3) xlWK1 5
    WKS (1-2-3) xlWKS 4
    WQ1 (Quattro Pro/DOS) xlWQ1 34
    DBF 4 (dBASE IV) xlDBF4 11
    DBF 3 (dBASE III) xlDBF3 8
    DBF 2 (dBASE II) xlDBF2 7
    Formatted Text (Space Delimited) xlTextPrinter 36
    Text (Macintosh) xlTextMac 19
    Text (MS-DOS) xlTextMSDOS 21
    CSV (Macintosh) xlCSVMac 22
    CSV (MS-DOS) xlCSVMSDOS 24
    DIF (Data Interchange Format) xlDIF 9
    SYLK (Symbolic Link) xlSYLK 2
    I know that its saving in the correct format. BUT I don't know why it wouldnt save 2 worksheets, but instead it only have 1.
    Best regards,
    Krispiekream

  • Errors in MS Office Excel save function

    When saving a file the save to function opens with a number of suggested locations. When one of those clicks the save box opens, however it doesn't open to the chosen location it opens to the last used location.
    When the file is saved the save box reopens (in the location the file was saved to) requiring you to close it down (or save again, then getting a question as to whether you want to overwrite the file you've just saved!)
    Sort it out Microsoft, I don't pay LOTS of money to get such a shoddy product and sort out the customer support function, I should get automatic error reporting options if I pay for a professional licence.
    Running:
    Window 8
    Microsoft Office Professional 2013

    Hi,
    Are we talking about the "Save" or "Save As" function?
    I wonder if it's caused by an add-in, you can verify by running Excel in Safe Mode to open and save the file:
    Press Win + R and type “excel /safe” in the blank box, then press Enter.
    If there’s no problem in Safe Mode, disable the suspicious add-ins to verify which add-ins caused this issue.
    If this doesn't fix the problem, is there any error message?
    You can also provide some images to OneDrive and share with me so that I can have a better understanding on the issue:
    https://onedrive.live.com/
    Feel free to post back.
    Regards,
    Melon Chen
    TechNet Community Support

  • How to use RTRIM function in ABAP

    Hey,
    I have a question on using trim function in ABAP. According to all documents, I should be able to use rtrim as
    shorttext = rtrim('abcde-xx', '-xx').
    But when I do that, it gives me an error message "Comma without preceding colon (after shorttest?)"
    Anyone can tell me why is this happening? how should I use this trim function? And for me to cut off variable's last few character, what else method can I use? 
    Thank you very much.

    DATA : T1    TYPE STRING VALUE 'abcde-xx',
                T2    TYPE STRING  VALUE '-xx'.
    REPLACE T2 INTO T1 WITH SPACE.
    WRITE :/, T1.
    result output is :    'abcde'.
    regards
    Guna

  • Make Number stored as text - in excel using ABAP

    Hello all,
    How can I make a value to be stored as text in excels, without adding apostrophe in front of the value using ABAP.
    Im using ECC6.0 system. In erlier version 4.6C, values are displaying as numbers.
    We are calling methods in RSAQEXCE dynamically in our program to get the excel.
    Can any one help me in this regard.
    Thanks in advance.
    Best Regards,
    Sasidhar Reddy Matli.

    Hi Sasidar,
    In Excel right click the column select format cells and then select  the format as text which is general by default.
    Regards,
    Anil.

Maybe you are looking for

  • Operation can't be completed because an item of same name already exist

    Hi, my first post. I've search the net for similar problems but nothing exact. I have a Maxtor OneTouch 4 (1TB)that just returned cos I got it exchanged. While it was being exchanged, I used a Maxtor OneTouch (640GB). I had transferred everything fro

  • Since updating to Mavericks, my graphics card keeps crashing OSX and forcing a reboot. Anything I can do?

    Hello community! This is the first major problem I've had with my Macbook since I got it over a year ago. This is a 15" Macbook Pro with Retina Display (Mid-2012 - 2.2 GHz). Everything was fine until I upgraded to Mavericks, and ever since then, my e

  • How to list printers on the client machine to print the documents in ADF

    Hi, I have a requirement to print multiple documents stored on the server. I am trying to find out how to list the printers or get a default printer on the client machine and print the documents using ADF. Thanks Sukarna

  • Phantom command symbol

    Recently, when I start up, a quarter-size image of the command pretzel has appeared in the middle of the desktop - it fades in quickly, remains only a second, and fades away. I'm beginning to think of it as a ghost. Does this convey a ghastly warning

  • Flash Pro CS6 fails to load

    Flash Pro CS6 loads and suddenly disappear while "loading fonts".  I found similar discussions, and their solution suggests to find fontinfo.txt and edit it, but i fail to find the fontinfo.txt but found a missfont.map. Help needed, thanks in advance