How to save table to file in Mobile 7.1

Hello,
We are using Mobile 7.1. We are trying to save the table context in the mobile client to the local file.
We use a FileDownload element in the screen. The FileDownload is bound to a Resource attribute which contains the table data (as well as name and type of the file).
When the user clicks on the FileDownload link, he gets an error message "Cannot open HTTP connection" with an http link that points to the file.
Do you know how can we save the table context to the client (i.e. export to excel)?
If it's impossible with FileDownload, is there a way to open a Save As dialog and write the file locally? (We don't know how to open the Save As dialog from web dynpro).
Thanks in advance,
Sergey
Edited by: Sergey Kozyrev on Dec 23, 2008 11:05 AM

Hello Narayani,
Thank you for your help. The class you gave had better results, but it's still not the solution.
What we get now is that the file opens but in an internal viewer, even though the FileDownload is set to "Allow Save".
Furthermore, the file we generate is an XML file that opens in excel, but in the internal viewer it seems like gibrish (maybe it tries to interpret it as a binary file).
How can we make it open in excel (or open the Save As dialog)?
Another question is that we used the other API for on-demand file download (instead of creating the file every time the user enters the screen we wanted it to be created only when the user clicks the link). This is possible in normal web dynpro:
[http://help.sap.com/saphelp_nw2004s/helpdata/en/42/f6ec5a09321bc7e10000000a11466f/content.htm]
Is it impossible in mobile web dynpro?
Sergey.

Similar Messages

  • How to save the report file in network drive

    Hi experts,
    Can any one of you pls tell me how can  save the report file in network drive.
    My requirement:
    by running a report i wll get daily data into a list.SO, i want to keep this in a common drive (network drive:Z) where every one can acces the txt file.
    I want the code in SAP to design this.
    Awaiting for an early reply.

    Is the Z drive in the application or presentation server ?
    make sure the server has write access to the required folder
    for presentation server
    CALL FUNCTION 'GUI_DOWNLOAD'
      EXPORTING
        filename              = 'c:\test_xls.xls'
        filetype              = 'ASC'
        write_field_separator = 'X'
      TABLES
        data_tab              = itab.
    for the application server, use
    data: outfile(120).
      OPEN DATASET outfile FOR APPENDING IN TEXT MODE ENCODING DEFAULT.

  • Please can someone tell me how to save a MP3 file from my email on my iPad so I can put in on Facebook? Thankyou

    Please can someone tell me how to save a MP3 file from my email on my iPad so I can put it on Faceboo? I use hotmail and please tell me step by step as I am not a tech guru lol. Thankyou

    Hi jscher200,
    Thank you for your reply, sorry for the VERY late late response, but I have just figured out how to control this separate 'panel'. I find it really useful for monitoring Google Analytics in as it can just sit there running. It does have its limitations, as it's a limited size (you can't expand it to full screen view), so you can only ever see a vertical section of a website and need to scroll to look to the right or left, but I have the live view of people accessing my website running on there and if the numbers start racking up at any time, I can scroll to look and see what pages they are accessing, where they've been referred from, etc.
    To get it to work, you save a website address in the Bookmarks Toolbar and when you can see it sitting on the toolbar at the top of the screen with its little icon, right click on it then click 'properties', then tick the box 'Load this bookmark in the sidebar'. The next time you click on this bookmark to open the website, it will load in this sidebar, which looks like a separate 'window' but is immovable. You can only have one sidebar application running at a time, but can change it by right clicking on the bookmark you want to load in there and it will then change to that one next time you click on that bookmark.
    I hope this might be useful to others, as I asked for help with this on loads of forums and not one person knew that this existed - even really skilled techies!

  • How to save table data in MII MDO

    How to save table data in MII MDO - please do samples.....

    Hi Amr,
    Please find some videos here.
    https://www.mediafire.com/?k323krz19xvcs0n
    Regards,
    Sriram

  • How to save a numbers file to a pdf file of multiple pages instead of one giant long page?

    How to save a numbers file to a pdf file of multiple pages instead of one giant long page?

    Hi DW,
    Numbers 3.2.2
    Instead of Menu > File > Export To,  use Menu > File > Print...
    That takes you to Print Preview.
    In the Print Setup panel, Click on the Print... button lower right (it won't print yet).
    That opens the Print Dialogue.
    Click on the PDF Pop-Up Menu lower left.
    Choose Open PDF in Preview or Save as PDF.
    That will have page breaks and will be full sized.
    Print from Preview.
    Regards,
    Ian.

  • How to save the pdf file or word doc into sap table

    Hi Expertu2019s
       I have a pfd file in my presentation server .Now I want to save the pdf file into sap table using module pool program. Whenever i need, I want to open that file from the table and show it in the Screen. Please any one tell me how I can save the file. What is the table name, guide me.
    Regards,
    S.Nehru.

    Hi,
    Try the following code
    FORM gui_upload.
      DATA: lv_filetype(10) TYPE c,
            lv_gui_sep TYPE c,
            lv_file_name TYPE string.
      lv_filetype = 'PDF'.
      lv_file_name = <name of ur file>.
    DATA: tb_file_data TYPE TABLE OF text4096.
    * FM call to upload file
      CALL FUNCTION 'GUI_UPLOAD'
        EXPORTING
          filename                = lv_file_name
          filetype                = lv_filetype
          has_field_separator     = lv_gui_sep
        TABLES
          data_tab                = tb_file_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.
    ENDFORM.                    "gui_upload
    I dont think you can save the data into sap tables in PDF format.
    With the above code you can save data into an internal table.
    Regards,
    Manish

  • Re:How to save an uploaded file in specified folder

    Hi all,
    I am using Jdev 11.1.1.7.0
    i created one form in the page.i created attachments by using inputfile option in component palette.when i run the page it is working.the file is successfully uploaded.but my intension is i want to save the uploaded file in specified location for the particular person.so how can i save this file.can anyone help me out please.
    Thanks,
    G.Shilpa.

    Hi Timo,
    Thanks for the reply.my scenario is i have created one table and one form.i entered some data in it.i used inputfile and save button for attachments.it is working.bt it wont be saved.when i click the person and then upload a file then the file will be stored some particular location for the particular person.means when i reload this page again i click the person it want to show the person how many pages uploaded.i created one bean class in save button and inputfile.my code is
    public class FileUpload {
        private List<UploadedFile> uploadedFile;
        public FileUpload() {
            super();
        public void setUploadedFile(List<UploadedFile> uploadedFile) {
            this.uploadedFile = uploadedFile;
        public List<UploadedFile> getUploadedFile() {
            return uploadedFile;
        public void saveUploadedFiles(ActionEvent actionEvent) {
            // Add event code here...
            List<UploadedFile> files = this.getUploadedFile();
            if (files != null) {
                for (int i = 0; i < files.size(); i++) {
                    System.out.println(files.get(i).getFilename());
    if anything goes wrong can u please provide the code.
    Thanks,
    G.Shilpa.

  • HOW TO SAVE A TEXT FILE ON AL11

    HOW CAN WE SAVE A TEXT FILE ON THE APPLICATION SERVER AL11 WHICH IS ON THE DESKTOP OR ANY DRIVES.
    CAN SOME ONE GIVE ME THE STEP BY STEP PRCEDURE
    REWARDS IF USEFUL

    Hi,
    Use Tcode CG3Z to upload files to application server and use tocde CG3Y to download file to your desktop.
    Reward points if helpful.
    Regards,
    CS.

  • How to save an excel file as CSV with semi-colon as data separator?

    We are creating a flat data file to load the flat file data to our BW system with Excel.  When we save the file, there are three kinds of CSV types for selecting from the "Save as type" list box:
    CSV (Comma delimited)
    CSV (Macintosh)
    CSV (MS-DOS)
    There is no CSV (semi colon delimited) type.  If we pick CSV (Comma delimted) as the type, then when clicking the "Preview ..." picture icon under the "DataSource/Trans. Structure" tab of the InfoSource for this flat file (with the CSV radio button checked the Data separator default is ";"), the File Upload Preview window shows the data is messed up that some columns of the excel flat file are combined into one column.
    Since the save type we picked is "CSV (Comma delimited)", then we try to change the default Data separator from ";" to "," in the preview selection screen, but still not helpful!
    How to resolve the above problem?
    Thanks

    Hi Kevin,
    This "," is defined in your windows setting. If you want to have ";" as separator then go to control Panel, select Regional Options, go to Numbers Tab and define the List separator as ";". After that when you will save your excel file as CSV(MS-DOS) it will have ";" as separator. This will make sure that the amounts are not broken in to two different fields while loading.
    Else if you keep "," as separator then you can also go into the Excel and define all number fields as Number without thousand separator.
    Let me know if you have any doubts in this.
    Regards,
    Rohit

  • How to save a video file which uses the setCodecChain method on its video t

    hi! i really need your help please. i got the Code for RotationEffect and i would like to know how to save it to a file instead of playing it simultaneously in a player:
    Here is the code: Plz Help me!!! am doing my final year project
    import java.awt.*;
    import java.awt.event.*;
    import javax.media.*;
    import javax.media.control.TrackControl;
    import javax.media.Format;
    import javax.media.format.*;
    * Sample program to test the RotationEffect.
    public class TestEffect extends Frame implements ControllerListener {
    Processor p;
    Object waitSync = new Object();
    boolean stateTransitionOK = true;
    public TestEffect() {
         super("Test RotationEffect");
    * Given a media locator, create a processor and use that processor
    * as a player to playback the media.
    * During the processor's Configured state, the RotationEffect is
    * inserted into the video track.
    * Much of the code is just standard code to present media in JMF.
    public boolean open(MediaLocator ml) {
         try {
         p = Manager.createProcessor(ml);
         } catch (Exception e) {
         System.err.println("Failed to create a processor from the given url: " + e);
         return false;
         p.addControllerListener(this);
         // Put the Processor into configured state.
         p.configure();
         if (!waitForState(p.Configured)) {
         System.err.println("Failed to configure the processor.");
         return false;
         // So I can use it as a player.
         p.setContentDescriptor(null);
         // Obtain the track controls.
         TrackControl tc[] = p.getTrackControls();
         if (tc == null) {
         System.err.println("Failed to obtain track controls from the processor.");
         return false;
         // Search for the track control for the video track.
         TrackControl videoTrack = null;
         for (int i = 0; i < tc.length; i++) {
         if (tc.getFormat() instanceof VideoFormat) {
              videoTrack = tc[i];
              break;
         if (videoTrack == null) {
         System.err.println("The input media does not contain a video track.");
         return false;
         System.err.println("Video format: " + videoTrack.getFormat());
         // Instantiate and set the frame access codec to the data flow path.
         try {
         Codec codec[] = { new RotationEffect() };
         videoTrack.setCodecChain(codec);
         } catch (UnsupportedPlugInException e) {
         System.err.println("The processor does not support effects.");
         // Realize the processor.
         p.prefetch();
         if (!waitForState(p.Prefetched)) {
         System.err.println("Failed to realize the processor.");
         return false;
         // Display the visual & control component if there's one.
         setLayout(new BorderLayout());
         Component cc;
         Component vc;
         if ((vc = p.getVisualComponent()) != null) {
         add("Center", vc);
         if ((cc = p.getControlPanelComponent()) != null) {
         add("South", cc);
         // Start the processor.
         p.start();
         setVisible(true);
         addWindowListener(new WindowAdapter() {
         public void windowClosing(WindowEvent we) {
              p.close();
              System.exit(0);
         return true;
    public void addNotify() {
         super.addNotify();
         pack();
    * Block until the processor has transitioned to the given state.
    * Return false if the transition failed.
    boolean waitForState(int state) {
         synchronized (waitSync) {
         try {
              while (p.getState() != state && stateTransitionOK)
              waitSync.wait();
         } catch (Exception e) {}
         return stateTransitionOK;
    * Controller Listener.
    public void controllerUpdate(ControllerEvent evt) {
         if (evt instanceof ConfigureCompleteEvent ||
         evt instanceof RealizeCompleteEvent ||
         evt instanceof PrefetchCompleteEvent) {
         synchronized (waitSync) {
              stateTransitionOK = true;
              waitSync.notifyAll();
         } else if (evt instanceof ResourceUnavailableEvent) {
         synchronized (waitSync) {
              stateTransitionOK = false;
              waitSync.notifyAll();
         } else if (evt instanceof EndOfMediaEvent) {
         p.close();
         System.exit(0);
    * Main program
    public static void main(String [] args) {
         if (args.length == 0) {
         prUsage();
         System.exit(0);
         String url = args[0];
         if (url.indexOf(":") < 0) {
         prUsage();
         System.exit(0);
         MediaLocator ml;
         if ((ml = new MediaLocator(url)) == null) {
         System.err.println("Cannot build media locator from: " + url);
         System.exit(0);
         TestEffect fa = new TestEffect();
         if (!fa.open(ml))
         System.exit(0);
    static void prUsage() {
         System.err.println("Usage: java TestEffect <url>");

    Can you please send me Your codec class and guide me the way you use it .. i am trying to apply some filters on the movie before presenting. Any help would be appreciated.

  • HOW TO SAVE A SCANNED FILE IN PDF FORMAT

    I HAVE A HP LASER JET M1005MFP PRINTER...
    HOW CAN I SAVE A SCANNED FILE IN PDF FORMAT..???
    PLEASE HELP AS SOON AS POSSIBLE AS IT IS URGENT.

    To get your issue more exposure I would suggest posting it in the commercial forums since the LaserJet M1005 is a commercial product. You can do this at Commercial Forums.
    I hope this helps!
    R a i n b o w 7000I work on behalf of HP
    Click the “Kudos Thumbs Up" at the bottom of this post to say
    “Thanks” for helping!
    Click “Accept as Solution” if you feel my post solved your issue, it will help others find the solution!

  • How to save a .csv file to database server

    Hi every body,
    I need to upload a .csv file from the client machine and save it to a directory in a database sever.
    I could do the uploading part. Can anyone tell me how to save the file?
    Another option is save the file as a CLOB in a database column. But I'm not aware of doing that too.
    Please guide me.
    Thanks in advance.
    Surangi.

    See Steve Muench's Not Yet Documented Example #85 at http://radio.weblogs.com/0118231/stories/2004/09/23/notYetDocumentedAdfSampleApplications.html#85. While this is for 10.1.3, this is still relevant for 11g. Steve's example is for uploading to a BLOB - same thing for a CLOB. Once your data is in the database, you can use the DBMS_LOB package to write the file to a directory on the database server, if you like.
    Also the Developers Guide is your friend - Chapter 9.9 in the Fusion Web User Interface Developers Guide for Oracle ADF 11g, or 19.6 in the ADF Developers Guide for Forms/4GL Developers for JDeveloper 10.1.3.

  • How to save an encoded file

    i want to generate a file in run mode and that file contain username and password and i dont want to save as text file
    is there away i can save it in encoded file that cant be opend easily?
    another quistion : how can I make curren value in a string control defualt in run mode?
    many thanx

    mana111;
    Users will always be able to open the file, some way or the other. What you don't want is the ability to understand it - you want to preserve the confidentiality. First, you need to determine what needs to be protected. Usually the username is known and therefore no protection is provided. The password always need protection. Also, you need to determine your recovery procedures. Users WILL forget their passwords. That has an impact on how to protect the password. If you want the ability to tell the user their password, then you may want to encrypt the password so the administrator can decrypt it. If instead you want to give them a new password, then you can hash the password. With that technique you won't be able to recover the lost password. If you encrypt the password, you need to have a key management scheme because you need to manage the key that encrypt the passwords - that is equivalent to a master key.
    I've seen systems where the password does more than just authenticate the user. It is also used as a key to encrypt additional information. If that's your case, you need to encrypt the password. There are other considerations for your systems. The ideal way to understand the best solution is via a security assessment.
    Check Crypto-G: www.visecurity.com. It is a very good library with algorithms for encryption, hashing (message digest) and other cryptographic functions.
    Regards;
    Enrique
    www.vartortech.com

  • How To save a music file from an email

    PLEASE HELP ME I CANT FIGURE OUT HOW TO SAVE SONG FROM MY ITUNES LIBRARY THAT U SENT TO MY EMAIL
    Post relates to: Pixi Plus p8wu0 (AT&T)

    Open email attachments
    You can receive any kind of file sent to you in email, but you can open an
    attachment only if your phone has an application that can open the file type.
    To open a single attachment: Tap the attachment name to download the
    attachment. If the attachment is a supported file type (MP3, PDF, DOC,
    XLS, PPT, GIF, or JPG), it opens automatically.
    To open multiple attachments: Tap the list of attachment names to view
    the attachments, and tap an attachment name to open the file.
    Save attachments;
    When you open attachments of certain file types, you can save them to your
    phone so you can view them later in one of your phone’s applications.
    1. Open the attachment (see Open email attachments).
    2. Do one of the following:
    • For pictures in JPG, GIF, BMP or PNG format, tap Copy To Photos.
    • For other file types, open the application menu and tap Save As. If
    the Save As menu item is not available, you cannot save the
    attachment.
    To open a saved attachment on your phone, open the application that can
    display the attachment. The attachment appears in the list of available files.
    Tap the file to open it.
    You can find this info. on page 74 of the user guide.
    For reference purposes, click on the following link for the support page for your device on the kb.palm.com webpage.
    http://kb.palm.com/wps/portal/kb/na/pixi/pixi/att/home/page_en.html
    There are links on the page to the user guide, troubleshooting, how to's, downloads, etc.

  • HOW TO SAVE THE FLAT FILE.

    Hi Exports,
         Flat file comes to our Internal table.then i build our logic.After that i wann to save this flat file is some location(may be in presentation/ application server).that to file name along with date,time and location.agin i run the pgm and save same location and file name is also same.
    here iam giving file format.
    emp no               file name        location.
    1                          XXX               h:\kkk.txt
    2
    3
    4
    5
    again i am running same pgm
    emp no               file name        location.
    6                           XXX               h:\kkk.txt
    7
    8
    9
    10
    file name and location same but diff emp no.
    Regards,
    Krishna.

    Hi Krishna Kumar,
    if u wnat to download in to presentation server..
    then use GUI_DOWNLOAD.
    if u want to save in application server (in AL11) then u need to use
    open data set...
      DATA : dl_string(250).           " String
    *--Open data set
        OPEN DATASET dg_filename FOR INPUT IN TEXT MODE ENCODING DEFAULT.
        IF sy-subrc <> 0.
          dg_subrc = sy-subrc.
        ELSE.
    *--Transfer data
          DO.
            READ DATASET dg_filename INTO dl_string.
            IF sy-subrc = 0.
              APPEND dl_string TO dt_data.
              CLEAR  dl_string.
            ELSE.
              EXIT.
            ENDIF.
          ENDDO.
    *--Close data set
          CLOSE DATASET dg_filename.
        ENDIF.

Maybe you are looking for

  • Number of ipods to one computer

    Hello, everyone. I currently have an ipod classic and I was thinking of getting an ipod touch or ipod nano so that I could use the Nike + ipod feature. I was wondering how many ipods I can have connected to my itunes account at one time. Will I be ab

  • Simple Photo Slider

    Hi All, Can anyone help me with a code for a simple automatic photo slider? It is really urgent. I give some photos which it should be sliding automatically. Waiting for your reply. Thanking you in advance.

  • Podcasts not copying to iPod

    Sometimes, when I try to copy some podcasts to my iPod classic, these won't move. I can+t see the message of copying, nothing. I suspect I may have copied them already previously, but since they are not on the iPod, I try again, but the iPod seems to

  • Every time I try to make a pre-set in export the top export to drop down button changes from Hard Drive to email. What anm I missing.

    As above title sorry.

  • Jpeg Corruption

    Hi, I have a problem receiving JPEG attached files. They appear grey or can't be openned through Viewer when downloaded. It's stange cause I have another computer (a powerbook) on the same WIFI net and the problem is the same. Can anyone help, I'm ki