Using GUI_DOWNLOAD and FILE_SAVE_DOWNLOAD in WebDynpro

Hi Experts,
i have a WebDynpro, in which i try to create a FILE-Download-Window to save a File in the temp-folder.
For this i used the CL_GUI_FRONTEND_SERVICES=>FILE_SAVE_DIALOG and the the function GUI-DOWNLOAD. Both I tested in an report. they worked, but in the WebDynpro they didn't work.
Have anybody an idea for solving this problem?
Thanks a lot

Hi,
You need not use these Function modules in WD application because WD Object library provides options for uploading and Downloading function. Just use these buttons in your screen and the functions will come automatically.
ags.

Similar Messages

  • Problem with header download using GUI_DOWNLOAD

    Hi folks,
    Iam facing a particular problem while downloading an internal table to excel file using GUI_DOWNLOAD and file type as 'DBF'.
    Once i download the file, iam getting an automatic header with contents as "F1, F2, F3,...." for all the columns. But, i want to put my own header there. Is there any way out ?
    Thanks and Regards,
    Vijay.

    hi,
    may be this code will be helpful to u
    Just take one field in header(internal table) of type c. and push all the field headings into it.
    and give that internal table to fieldnames it will resolve the problem.
    DATA:BEGIN OF HEADER OCCURS 0,
          F1(30) TYPE C ,
         END OF HEADER.
    DATA:BEGIN OF ITEM OCCURS 0,
           IT1(30) TYPE C,
           IT2(3) TYPE C,
           IT3(4) TYPE C,
         END OF ITEM.
       HEADER-F1 = 'NAME'.
       APPEND HEADER.
       CLEAR HEADER.
       HEADER-F1 = 'AGE'.
       APPEND HEADER.
       CLEAR HEADER.
       HEADER-F1  = 'STAT'.
       APPEND HEADER.
       CLEAR HEADER.
    ITEM-IT1 = 'MANOHAR'.
    ITEM-IT2 = '124'.
    ITEM-IT3 = 'T'.
    APPEND ITEM.
    CLEAR ITEM.
    ITEM-IT1 = 'SAI'.
    ITEM-IT2 = '24'.
    ITEM-IT3 = 'T'.
    APPEND ITEM.
    CLEAR ITEM.
    CALL FUNCTION 'GUI_DOWNLOAD'
      EXPORTING
        filename                        = 'C:\FILE13.XLS'
       FILETYPE                        = 'DBF'
      tables
        data_tab                        = ITEM
        FIELDNAMES                      = HEADER.
    regards,
    manohar.

  • Fixing columns while downloading using GUI_DOWNLOAD!!

    Hi,
    I have declared an internal table which is downloaded using GUI_DOWNLOAD and after downloading the required outpout should appear in their own place for example:
    MATNR MEINS PLANS
    123       test1    test2
    12         test3    test3
    but whats actually happening ...
    123test1test2
    12test3test3
    how to fix the columns so that field value appear in that location only and from the same postion for all the records once downloaded..
    Regards
    Gunjan

    Hi Gunjan,
    You can try this:
    CALL FUNCTION 'GUI_DOWNLOAD'
      EXPORTING
        FILENAME                      =  v_filename
        FILETYPE                      =  'ASC'
        WRITE_FIELD_SEPARATOR         = ' '
    For ASCII download, if you specify the field separator as spaces, then it will automatically separate fields with TABS.
    Hope this helps.
    Thanks,
    Rajesh

  • Why do we use inbound and outbound plugs in abap webdynpro?

    hi all,
    why do we use inbound and outbound plugs in abap webdynpro?
    Thanks

    Actually we have 2 types of plugs
    1.View plugs
    2.Window plugs/Interface Plugs
    plugs are for navigating one view to the other and also you can pass the parameters along with the plugs.
    Outbound plug is to navigate from one view to other view,also we can pass parameters along with the plug.
    Inbound plug is like event handler/receiver of the outbound plug.
    Using window plugs we can call other Web Dynpro applications.for more information check this link.
    http://help.sap.com/SAPHELP_NW04S/helpdata/EN/45/19bf8c16f25d7ae10000000a11466f/frameset.htm
    Thanks
    Suman

  • Issue in conversion of output file from alv to csv file using GUI_DOWNLOAD

    hi,
    I am using GUI_DOWNLOAD to convert the internal table that am getting as the output of an alv into a csv(comma separated file) file.I am using the following code but its not generating a csv file instead it is generating a normal space delimited file.
    The code is as follows:
    data : lv_fname type string.
    lv_fname = 'C:\Users\pratyusha_tripathi\Desktop\status8.csv'. " Provide the file path & file name with CSV extention
    CALL FUNCTION 'GUI_DOWNLOAD'
    EXPORTING
    filename = lv_fname " File name including path, give CSV as extention of the file
    FILETYPE = 'DAT'
    WRITE_FIELD_SEPARATOR = '#' " Provide comma as separator
    tables
    data_tab = ITAB " Pass the Output internal table
    FIELDNAMES =
    EXCEPTIONS
    OTHERS = 22
    IF sy-subrc 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    Kindly let me know what changes can be made to make my code work.Also can GUI_download be used for batch processing and storing the output in application server?
    Thanks ,
    Pratyusha

    Hi,
    the short text description for WRITE_FIELD_SEPARATOR is "Separate Columns by Tabs in Case of ASCII Download", so why do you expect a comma?
    Try SAP_CONVERT_TO_CSV_FORMAT and then download.
    And no, GUI_DOWNLOAD is only for download via SAP GUI to a users computer.
    Best regards,
    Oliver

  • Actions - How to replace GUI_DOWNLOAD and CL_GUI_FRONTEND_SERVICES= FILE_SA

    Hi,
    In sap gui was trigered action whih is using smartform and then output was being downloaded and saved as using:
    CALL FUNCTION 'GUI_DOWNLOAD' - to
    CALL METHOD CL_GUI_FRONTEND_SERVICES=>FILE_SAVE_DIALOG
    After the ubgrade this action is not working in web ui.
    Anyone knows how to change this to work in web ui?
    Thank you in advance

    Hi Tanja Lukovic 
    Pls check the settings defined in the SPRO path CRM->Basic settings->actions under this select your relevant application area and check whether any start/schedule conditions are not met (check in conditions) , apart from this reason there could be other reasons also pls check the trigger  processing type (it should be smart form print).
    if the actions are already created , you can change actions and conditions.
    Thanks & Regards
    Raj

  • GUI_DOWNLOAD and background processing

    Hello,
    I have created a process which creates a file. this process uses GUI_DOWNLOAD to put the file on the users C drive or other directory on our network. The user wants to run this process in background and the program is returning a 6  (error unknown) from the GUI_DOWNLOAD FM. I was looking on SDN and found out the GUI_DOWNLOAD only works in foreground. You have to use OPEN and CLOSE DATASET statements to process in background. I am thinking about putting a button to denote foreground/background processing and using the appropriate statements to process the file. I will then have to get the file from the app server to a place will the user can get access to it.
    <b>first question</b> - is there a FM to do a FTP from the app server to a directory on our network for the user to access?
    <b>second question</b> - is this the right approach or is there something else that I should be doing.
    thanks in advance for your help

    Hi,
    Yes, your right, GUI_DOWNLOAD wil not work in background mode, you need to place the file in Application server, here.
    See the below link for a FTP program, use the proper commands(i do not know whether downloading the file is possible through the commands)
    http://www.sap-img.com/ab003.htm
    or else, write a small program which downloads the data from the application server, but it should run in the foreground
    Regards
    Sudheer

  • Heading  during downloading into local file using GUI_DOWNLOAD fun.module

    Hi Guru's
    we have a requirement that we want the plant description as a heading (first line of the file) in the local file. iam using "GUI_DOWNLOAD" function module for downloading data for which iam passing the charecter type internal table. before downloading iam passing all the filed headings to that table and then appending the internal table data into it. now iam getting data properly with field headings . but before that heading i want one more description for a plant field which iam using in my selection screen
    in the fun.module "GUI_DOWNLAOD"
    we have HEADER file but it is of XSTRING type so it is taking only 2 char.
    so how to use this . Plz help me.
    thanks well in advance.
    UR's
    GSANA

    Hi,
    Please check the below link,
    header in 'gui_download'
    Also check Manoj kumar's reply in the link,
    header information to gui_download
    Hope this helps.
    Best Regards.

  • Is there anything to be taken care of while using GUI_DOWNLOAD in ITS?

    Hi All,
             I have a requirement on which I am using GUI_DOWNLOAD for downloading a file into a network Drive.In the foreground I am executing using ITS.When I click on 'SUBMIT' button it goes to "Interpreter failed ...Internal error code: 0x2101".Till the point of GUI_DOWNLOAD its working fine.When I am executing from SAP system,its working fine.Once I execute from browser only problem comes.Have anybody faced a similiar situation and if so please help me.
    Thanks in Advance,
       Anjaly

    Hi Anjaly,
    this means that the template could not be found. I assume you are using the ITS 620, in the integrated ITS this error would result in an ABAP runtime error.
    Ok, how to solve? Please examine the ITS trace files especially that one for the Bussiness HTML interpreter. Its is Agate<N>_sapjulep.trc.
    best regards
    Tobias

  • Using Gui_download for excel output

    Hi,
    I am using gui_download to output in excel format, my requirement is i want to start records from 3rd row in excel.
    On first row first column title shoud come? Second row blank,  i used fieldname for header in export paramenter from 3rd row.
    Plz help me to sove this issue.
    Thanks in advance.
    Vishnu.

    Hi vishnu,
    Here is the sample code below.
    *& Report  ZVK_TEST1
    REPORT  zvk_test1.
    TYPES:BEGIN OF ty_ekko,
            ebeln TYPE ekko-ebeln,
            bukrs TYPE ekko-bukrs,
    END OF ty_ekko.
    TYPES:BEGIN OF ty_fields,
            field TYPE dd03l-fieldname,
          END OF ty_fields.
    DATA:lt_ekko TYPE STANDARD TABLE OF ty_ekko,
         lt_dummy TYPE STANDARD TABLE OF ty_ekko.
    DATA:lw_ekko TYPE ty_ekko.
    APPEND INITIAL LINE TO lt_dummy.
    APPEND INITIAL LINE TO lt_dummy.
    SELECT ebeln bukrs INTO TABLE lt_ekko
      FROM ekko UP TO 10 ROWS.
    DATA:lt_fields TYPE TABLE OF ty_fields,
         lw_field TYPE ty_fields.
    lw_field-field = 'PO NUMBER'.
    APPEND lw_field TO lt_fields.
    lw_field-field = 'COMPANY CODE'.
    APPEND lw_field TO lt_fields.
    CALL METHOD cl_gui_frontend_services=>gui_download
      EXPORTING
       bin_filesize              =
        filename                  = 'C:\Documents and Settings\krishnavatte\Desktop\kris.xls'
        filetype                  = 'ASC'
      CHANGING
        data_tab                  = lt_dummy
      EXCEPTIONS
        file_write_error          = 1
        no_batch                  = 2
        gui_refuse_filetransfer   = 3
        invalid_type              = 4
        no_authority              = 5
        unknown_error             = 6
        header_not_allowed        = 7
        separator_not_allowed     = 8
        filesize_not_allowed      = 9
        header_too_long           = 10
        dp_error_create           = 11
        dp_error_send             = 12
        dp_error_write            = 13
        unknown_dp_error          = 14
        access_denied             = 15
        dp_out_of_memory          = 16
        disk_full                 = 17
        dp_timeout                = 18
        file_not_found            = 19
        dataprovider_exception    = 20
        control_flush_error       = 21
        not_supported_by_gui      = 22
        error_no_gui              = 23
        OTHERS                    = 24
    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 METHOD cl_gui_frontend_services=>gui_download
      EXPORTING
       bin_filesize              =
        filename                  = 'C:\Documents and Settings\krishnavatte\Desktop\kris.xls'
        filetype                  = 'ASC'
        append                    = 'X'
        write_field_separator     = 'X'
        fieldnames                = lt_fields
      CHANGING
        data_tab                  = lt_ekko
      EXCEPTIONS
        file_write_error          = 1
        no_batch                  = 2
        gui_refuse_filetransfer   = 3
        invalid_type              = 4
        no_authority              = 5
        unknown_error             = 6
        header_not_allowed        = 7
        separator_not_allowed     = 8
        filesize_not_allowed      = 9
        header_too_long           = 10
        dp_error_create           = 11
        dp_error_send             = 12
        dp_error_write            = 13
        unknown_dp_error          = 14
        access_denied             = 15
        dp_out_of_memory          = 16
        disk_full                 = 17
        dp_timeout                = 18
        file_not_found            = 19
        dataprovider_exception    = 20
        control_flush_error       = 21
        not_supported_by_gui      = 22
        error_no_gui              = 23
        OTHERS                    = 24
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
               WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.

  • Data missing while downloading the data using GUI_DOWNLOAD

    Hi experts,
    I'm uploading the Production Order data through excel and in the transaction level it's happening fine.
    After running the BDC I'm fetching the Production Order Number(AUFNR) and it's Status from the respective tables and downloading the data along with the Production Order Number(AUFNR) and it's Status using GUI_DOWNLOAD.  (Version is 4.6 C)
    After downloading some of the Production Order Numbers(AUFNR) and it's Status are missing in the Excel Log sheet . But it's very much there in the  SAP tables and also in the transaction screen level.
      CALL FUNCTION 'GUI_DOWNLOAD'
           EXPORTING
                bin_filesize            = v_bin_filesize
                filename                = v_name
                filetype                = 'ASC'
                write_field_separator   = 'X'
           TABLES
                data_tab                = it_final
           EXCEPTIONS
                file_write_error        = 1
                no_batch                = 2
                OTHERS                  = 22.
      IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    Kindly give me your suggestions regarding this.
    Thanks in advance.
    Jessi

    Hi,
    I am not sure why it is not coming .
    But try by uncomment the bin_filesize.
    Because generally the size(bin_filesize) specification is for binary files .
    CALL FUNCTION 'GUI_DOWNLOAD'
    EXPORTING
    *bin_filesize = v_bin_filesize "Comment This
    filename = v_name
    filetype = 'ASC'
    write_field_separator = 'X'
    TABLES
    data_tab = it_final.
    Regards,
    Raghava Channooru

  • Creation of tables using JDBC or SQLJ in webdynpro application

    Hi,
    I am trying to create tables in javadictionary(MaxDB)using my WebDynpro application.I tried creating tables using SQLJ and JDBC.But I was not able to do it.I can select and insert data into already created tables.
    Whwn I tried creating a table using JDBC I encountered the following exception.
    com.sap.sql.log.OpenSQLException: The SQL statement "CREATE TABLE TMP_DEPID (DEPID varchar(10) NOT NULL,DEPNAME VARCHAR(25))" contains the syntax error[s]: Open SQL syntax error: CREATE ... TABLE is not supported
    SQL syntax error: "VARCHAR" is a reserved keyword and cannot be used as an unquoted identifier
    Does this mean that creating tables is not supported?
    Can anyone help me in this matter?
    Thanks in advance,
    regards
    ~Pradeep Shetty

    Hi Pradeep,
    Yes, OpenSQL does not support creation of tables. But why would you need to create tables at runtime?! The natural way is to create the model at design time of your application, i.e. with the Java DataDictionary.
    However, if for any reason you really need to create database tables at runtime, you can achieve this by using a non-OpenSQL datasource, e.g. you could create a VendorSQL one and use it to obtain JDBC connections in your app. See also http://help.sap.com/saphelp_nw04/helpdata/en/c0/3ad4d5cdc66447a188b582aad537d3/frameset.htm.
    Hope that helps!
    Vladimir

  • How to use GUI_DOWNLOAD inside BSP Application event

    Hi All,
    I am facing one issue while using GUI_DOWNLOAD inside BSP Application. When the processing goes at GUI_DOWNLOAD it gives me unknown error where as the same code is working when used in report program. My requirement is to save password into excel file at my local machine. I am using FM MS_EXCEL_OLE_STANDARD_DAT to save password in excel file but this function module fail when it reach at GUI_DOWNLOAD . Can you please help me out.
    Thanks and Regards
    Pradeep Kr. Rai

    Dear Pradeep,
    Find the below link which explains a simple data download to excel from a table view.
    www.sapt echnical.com/Tutorials/BSP/Excel/Index.htm
    Try to avoid the way your using in the BSP application and it is abdicable to use the standard methods / class available like "cl_bsp_utility"
    Hope this will be helpful.
    Regards,
    Gokul.N
    Edited by: Gokul on Oct 8, 2009 9:57 AM

  • Why can't we use GUI_Download in background mode...........

    Hi experts as per the requirement my program should run at specific time in background mode, it need to upload the Personal numbers from the input file and for those personal numbers extract the data from multiple tables. but this report shd run in background.
    and download the output in the form of flat file.
    as i'm running in background mode can't use the F.M GUI_Download and GUI_Upload.
    can any one guide me how to solve this issue and why can't we use these F.M. if we can't use then what is the alternative to run in background mode.

    A program that runs in background mode doesn't have any connection to a frontend. After all, you can schedule it to run at a time where your frontend computer is not running.
    In this case you have to load your files on the application server (or a mount point) and use the FMs C13Z_FILE_DOWN(UP)LOAD_ASCII(BINARY)
    Regards
    Frank

  • Need help: GUI_DOWNLOAD and tab-separated in between fields.

    hello everyone,
    this is the layout of the interface that i created:
             sy-title
    total records processed: XX
    total records failed: XX
    summary of the error
    pernr<tab>name<tab>error message<tab>otherfieldshere
    i wanted the error log to be saved locally thus, i have to use GUI_DOWNLOAD.
    ok, here's the current parameters i supplied with my gui_download:
    CALL FUNCTION 'GUI_DOWNLOAD'
           EXPORTING
                filename                    = v_file_string
                filetype                      = 'ASC'
                write_field_separator   = 'X'
           TABLES
                data_tab                    = i_error_log
    (exceptions not displayed)
    the problem that i have is that, there is a difference between the error logs displayed after the execution and the error logs saved in my local directory.
    i did find a way to resolve this BUT, i still need to refine it. also, the spaces between the fields seems not tab delimited, but separated by space.
    to explain further here's the current error log that i have downloaded:
    10000001<tab>10/23/2006<tab>01<tab>P<tab>11<tab>01
    the header:
             sy-title
    total records processed: XX
    total records failed: XX
    summary of the error
    is not included in the downloaded errorlog file.
    i added some modification of my report to include it because, i want to to look exactly the same as of the errorlog generated/displyed after the execution.
    the result looks as it is what i've expected BUT,
    when i checked the spaces in between fields...
    it is all separated by spaces... not tab.
    here is the actual error log that i have obtained:
             sy-title
    total records processed: XX
    total records failed: XX
    summary of the error
    pernr<space><space><space>name<space><space><space><space><space><space>error message<space><space>otherfieldshere
    What i wanted to resolve is that, i want the error log to be tab delimited and not separated by space.
    is this possible? if it is, any suggestion will truly be appreciated.

    Hi,
    Please check your flat file i think it they have used the Three spaces instead of using a SINGLE TAB. between the fields.
    Thanks & Regards,
    Chandralekha.

Maybe you are looking for

  • How do you use AVERAGE based on values from an IF formula?

    This is probably a very simple thing to do, but I haven't managed to find a solution yet. Someone please help! I have a spreadsheet to calculate grades for my students. I enter their raw scores, which is then calculated into a percentage (which I the

  • HT4236 How do I get rid of the photo stream on my iphone 5?!!!

    How do I get rid of the photo stream on my iphone 5? Loads of weird icons I don't want/need.  Tx

  • How do you add one song to a playlist already on iPod?

    When I attempt to _add one song_ to a playlist already on iPod, the one song ends up as a separate playlist. *Things I have done so far.* My playlist is titled +"Slow Jams."+ I changed the one song "Get Info" to the exact same settings of the songs o

  • Export unedited JPEG of a RAW image in LR4?

    Other than the obvious to export images before I edit them, or duplicating and removing all alterations after selecting and editing I don't see an easy way to do this in LightRoom.  In Aperture I would select Export Original Photo, and then choose JP

  • Can't change password for SMTP outgoing server.

    I changed my password on the server via a different method, now I need to change the password Thunderbird uses to send messages to that new password. No matter what I do, I can't seem to get Thunderbird to ask for the password again, it just keeps us