Download file in mobile application

Hi:
It's understood that setting up a download link from a custom table is accomplished via the following -
[from http://docs.oracle.com/cd/E14373_01/appdev.32/e13363/up_dn_files.htm#CIHBFCDH ]
Create Download Page for Embedded PL/SQL Gateway
The Oracle XML DB HTTP Server with the embedded PL/SQL Gateway is typically used for Application Express in Oracle Database 11g. Calling a PL/SQL procedure directly from a URL that is not known in a list of allowed procedures, as shown in Change the Download Link to Use the New Procedure, results in an error message.
To avoid this situation, there are a couple of available options. The first option is to modify the PL/SQL function WWV_FLOW_EPG_INCLUDE_MOD_LOCAL to include the PL/SQL download_my_file procedure and then recompile. The second, described below, is to create a page in the application that has a before header branch to the PL/SQL download_my_file procedure. You then create a hidden item on that page for the document ID of the document to be downloaded.
I have been using the great new tools in 4.2 to create mobile applications with much success on a 4.2.0.00.27 platform. However, when I set up a download page as prescribed, the result on my Samsung Galaxy S3 is not user-friendly on either Firefox or the Google browser. When the user clicks on a download link, the result is a blank page with the word "undefined". If the user reloads the page, then a message appears briefly "Starting download..." If the user then opens the "pull down menu" the download appears in the Notifications section. So it works, but it's not intuitive or even easy to figure out what happened.
Does anyone have any knowledge of this? Is there some way to control the message on the "undefined" page? Is there a way to cause the smartphone to automatically open the file?
Thanks all!
Bill

Hi Bill,
This could potentially be an issue with jQuery Moble's AJAX navigation. By default, jQuery Mobile loads pages via AJAX to allow for smooth page transitions. This means that instead of doing a full page load for the next page, jQuery Mobile loads that page into the DOM of the current page and then replaces the content via JavaSript.
Since APEX 4.2 is using jQuery Mobile for the mobile templates, the same is true of APEX pages that you navigate to from a mobile page, as well as links to other content, such as your file download. One way to circumvent this would be to defined you links as: "javascript:location.href=([your link]);" instead of just a plain link. Depending on your specific implementation, there are also other jQuery Mobile settings that would allow for having link targets not be loaded via AJAX. Take a look at rel="external" and data-ajax="false" in the jQuery Mobile documentation, and see what might apply to your scenario:
http://jquerymobile.com/test/docs/pages/page-links.html
Regards,
Marc

Similar Messages

  • Upload and Download Files in an Application

    hi,
    I'm use Application Express 2.1.0.00.39 and the procedure " How to Upload and Download Files in an Application" :
    http://download-west.oracle.com/docs/html/B16376_01/up_dn_files.htm#sthref177
    I do not find the following tables or view:
    HTMLDB_APPLICATION_FILES or wwv_flow_file_objects$.
    which it is my error?
    thanks.
    Luigi

    The documentation was for version 2.2. I could not find a 2.0 version of this howto:
    http://download-west.oracle.com/docs/cd/B31036_01/doc/appdev.22/b28839/up_dn_files.htm#CIHCFCHF
    However, I did find the correct name of the view for my version, HTMLDB_APPLICATION_FILES
    After following the instructions in the above-mentioned "how to" (uploading and downloading files), I am a getting a html 403 error (You are not authorized to view this page) when I try to download from my custom table using the procedure specified in the howto.
    I've granted execute on the procedure to public only (as specified in the doco).
    err nvm. This has already been answered,
    http://download-west.oracle.com/docs/cd/B25329_01/doc/appdev.102/b25309/adm_wrkspc.htm#BEJCGJFJ.
    Message was edited by:
    user507810

  • Download files to mobile with HTTP or sockets

    I'm new in j2me, but i need download files from web-server to mobile.
    please help me.

    what kind of file you want to download? How large they are?
    If you server as the file, just Open A FileInputStream and read bytes by chunk of lets say 50K and send those bytes through your socket.

  • Firefox 32 - Download file to external application fails to open the application. Only works if app is used within Firefox as in Acrobat reader.

    Some of my users have started using Firefox 32 and discovered that files on the websites (pdf, xls, doc, etc) will not open fully if the application option is set to a windows application such as Acrobat Viewer, Microsoft Excel, Word, etc. The Download manager shows them listed and "hung" up. The file is downloaded to a temp location but the file is never opened and presented to the user. If the pdf option is set to open within Firefox using the built in Acrobat viewer, that will open within the browser.
    This did not happen with version 31 and installing this on a sandbox desktop reproduced the problem.
    We are running Windows 7 operating systems. Need help to solve this. Anybody?

    hello warnerm, this is a bug in the latest 32 beta 9 version which will be addressed in the release candidate 1 build which should be deployed via auto-updates to beta users tomorrow.
    a workaround for the moment would be to enter '''about:config''' into the firefox address bar (confirm the info message in case it shows up), right-click somewhere on the page and create a new string setting with the name '''browser.safebrowsing.appRepURL''' and value '''https://sb-ssl.google<i></i>.com/safebrowsing/clientreport/download?key=%GOOGLE_API_KEY%'''
    for reference see [https://bugzilla.mozilla.org/show_bug.cgi?id=1057764 bug #1057764] (please don't post in bug reports, but vote for the bug if you want to see it fixed)

  • Download File from BSP-Application

    Hello !
    i hope i can get some help for my problem.
    from my BSP-Application i want to download an internal table to p:\eigenedateien\bv.txt (always the same filename)
    the internal table ist type table of string.
    i read that gui_download doesn't work in my BSP
    so i went through this weblog 756
    but it is really hard.
    i put some code from the weblog in my application:
    concatenate 'attachment; filename='
    w_para-pwert = p:\eigenedatieen\bv.txt
                w_para-pwert into dl_pathfile.
    Download der Datei
    Create the cached response object that we will insert our content into
    dl_xstring = 'Test'. "nur zum testen
                CREATE OBJECT CACHED_RESPONSE TYPE CL_HTTP_RESPONSE
                       EXPORTING ADD_C_MSG = 1.
    set the data and the headers
                CACHED_RESPONSE->SET_DATA( DL_XSTRING ).
                CACHED_RESPONSE->SET_HEADER_FIELD( NAME  =
                                        IF_HTTP_HEADER_FIELDS=>CONTENT_TYPE
                                                   VALUE = 'text/html' ).
    Set the filename into the response header
           CACHED_RESPONSE->SET_HEADER_FIELD( NAME  = 'Content-Disposition'
                                       VALUE = DL_PATHFILE ).
    Set the Response Status
                CACHED_RESPONSE->SET_STATUS( CODE = 200 REASON = 'OK' ).
    Set the Cache Timeout - 60 seconds - we only need this in the cache
               CACHED_RESPONSE->SERVER_CACHE_EXPIRE_REL( EXPIRES_REL = 60 ).
    Create a unique URL for the object
                CALL FUNCTION 'GUID_CREATE'
                  IMPORTING
                    EV_GUID_32 = GUID.
                CONCATENATE RUNTIME->APPLICATION_URL '/' GUID INTO URL.
    Cache the URL
                CL_HTTP_SERVER=>SERVER_CACHE_UPLOAD( URL      = URL
                                               RESPONSE = CACHED_RESPONSE ).
    Ende Download
    now it should be cached.
    but hot can i start the download to p:\eigenedateien... now?
    thanks very much for your help
    Helmut

    Hi,
    Could you try adding at the end:
    navigation->response_complete( ).
    and/or
    data: guid type guid_32,
          display_url TYPE string.
    call function 'GUID_CREATE'
    importing
    ev_guid_32 = guid.
    concatenate runtime->application_url '/' guid into display_url.
    cl_http_server=>server_cache_upload( url = display_url response = cached_response ).
    Best regards,
    Guillaume
    Message was edited by: Guillaume Garcia

  • Japanese character problem while downloading file to application server

    Hello All,
    We are facing a strange problem while downloading a file to application server when file contains japanese text.
    We are downloading vendor and customer information in a flat file format on application server. When the login language is EN program show ouput in a properly formatted manner.
    When the login language is JA (japanese) program does download file with customer vendor data. I can see the description is japanese language but the formatting is gone for a toss.
    We are facing similar issue with other programs downloading files on the application server.
    I am using OPEN DATASET........ENCODING DEFAULT. and working on unicode enabaled ECC 6.0 system
    Quick help appriciated.
    Thanks!

    Hi
    Sometimes this also happens because of your desktop setting.Make sure that your OS also supports the JAPANESSE language.
    Ask your technical support team to enable them in your desktop.
    Thanks & Regards
    Jyo

  • How to see the file at the application server

    HI TO ALL SDNERS ,
                                 THIS IS MY CODE WHERE TO CHECK THE DOWNLOADED FILE AT THE APPLICATION SERVER.IN TCODE AL11 I HAVE SEEN THERE IS NO FILE GETTING CREATED.WHEN TRANSFERRING THE SY-SUBRC VALUE IS ZERO.
    Program Name        : ZME11_BDC.
    Title               : PURCHASE INFORMATION RECORD LOAD PROGRAM
    Program Objective   : THIS PROGRAM READS IN THE PURCHASE
                          INFORMATION FILE. IT CREATES A BDC SESSION TO
                          USE TO LOAD THE PURCHASE INFORMATION RECORDS
                          INTO SAP using the ME11 Transaction.
    REPORT  ZME11_BDC no standard page heading MESSAGE-ID ZHNC line-size 55.
                constants declaration
    constants: c_x value 'X',
               c_sess type apqi-groupid value 'zcustomer',
               c_xd01 type tstc-tcode value 'ME11'.
                  DECLARING VARIABLES
    DATA: V_MSG(255),
          V_ERREC TYPE I,"NO OF FAILED RECORDS
          V_LINES."NO OF RECORDS
           FLAG DECLARATIONS
    DATA: FG_DATA_EXIST VALUE 'X',"CHECK FOR DATA
          FG_SESSION_OPEN VALUE ''.
          STRUCTURES AND INTERNAL TABLE DECLARATIONS
    TYPES :BEGIN OF TY_PIR,
             LIFNR TYPE EINA-LIFNR,
             MATNR TYPE EINA-MATNR,
             EKORG TYPE EINE-EKORG,
             WERKS TYPE EINE-WERKS,
             VERKF TYPE EINA-VERKF,"sales person
             TELF1 TYPE EINA-TELF1,"telephone
             URZLA TYPE EINA-URZLA,"country
             REGIO TYPE EINA-REGIO,"region
             APLFZ(5),"plan deleivery time
             EKGRP TYPE EINE-EKGRP,"purchase group
             NORBM(13),
             NETPR(13),
         END OF TY_PIR.
    DATA : IT_PIR TYPE TABLE OF TY_PIR,
           WA_PIR LIKE LINE OF IT_PIR.
    DATA: BEGIN OF IT_BDCDATA.
    INCLUDE STRUCTURE BDCDATA.
    DATA END OF IT_BDCDATA.
    DATA : BEGIN OF IT_BDCMSG.
    INCLUDE STRUCTURE BDCMSGCOLL.
    DATA END OF IT_BDCMSG.
                      SELECTION SCREEN
    SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
    PARAMETER : FNAME TYPE RLGRAP-FILENAME.
    SELECTION-SCREEN END OF BLOCK B1.
                           AT SELECTION ON VALUE REQUEST
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR FNAME.
    CALL FUNCTION 'F4_FILENAME'
    EXPORTING
       PROGRAM_NAME        = SYST-CPROG
       DYNPRO_NUMBER       = SYST-DYNNR
       FIELD_NAME          = ' '
    IMPORTING
       FILE_NAME           = FNAME.
                             START OF SELECTION
    START-OF-SELECTION.
    PERFORM F_GET_DATA USING FNAME
                       CHANGING IT_PIR.
    PERFORM F_GENERATE_DATASET USING FNAME
                               CHANGING IT_PIR WA_PIR.
    *&      Form  F_GET_DATA
          text
         -->P_V_FNAME  text
         <--P_IT_PIR  text
    FORM F_GET_DATA  USING    P_FNAME LIKE FNAME
                     CHANGING P_IT_PIR LIKE IT_PIR.
    DATA: LV_FILE TYPE STRING.
    LV_FILE  = FNAME.
    CALL FUNCTION 'GUI_UPLOAD'
      EXPORTING
        FILENAME                      = LV_FILE
       FILETYPE                      = 'DAT'
      HAS_FIELD_SEPARATOR           = 'X'
      HEADER_LENGTH                 = 0
      READ_BY_LINE                  = 'X'
      DAT_MODE                      = ' '
      CODEPAGE                      = ' '
      IGNORE_CERR                   = ABAP_TRUE
      REPLACEMENT                   = '#'
      CHECK_BOM                     = ' '
    IMPORTING
      FILELENGTH                    =
      HEADER                        =
      TABLES
        DATA_TAB                      = P_IT_PIR
    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 P_IT_PIR IS INITIAL.
    FG_DATA_EXIST = ''.
    ENDIF.
    ENDFORM.                    " F_GET_DATA
    *&      Form  F_GENERATE_DATASET
          text
         -->P_V_FNAME  text
         <--P_IT_PIR  text
    FORM F_GENERATE_DATASET  USING    P_V_FNAME LIKE FNAME
                             CHANGING P_IT_PIR LIKE IT_PIR
                                      P_WA_PIR LIKE WA_PIR.
    MESSAGE I001(ZHNC).
    *OPENING FILE AT THE APPLICATION SERVER FOR WRITING
    OPEN DATASET FNAME FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.
    IF SY-SUBRC  EQ 0.
    MESSAGE I002(ZHNC).
    LOOP AT P_IT_PIR INTO P_WA_PIR.
    SPLIT P_WA_PIR AT '*' INTO P_WA_PIR-LIFNR
                               P_WA_PIR-MATNR
                               P_WA_PIR-EKORG
                               P_WA_PIR-WERKS
                               P_WA_PIR-VERKF
                               P_WA_PIR-TELF1
                               P_WA_PIR-URZLA
                               P_WA_PIR-REGIO
                               P_WA_PIR-APLFZ
                               P_WA_PIR-EKGRP
                               P_WA_PIR-NORBM.
    *TRANSFER THE FILE FROM INTERNAL TABLE TO APPLICATION SERVER
    MESSAGE I003(ZHNC).
    TRANSFER P_WA_PIR TO FNAME.
    ENDLOOP.
    *CLOSING THE FILE AT THE APPLICATION SERVER
    CLOSE DATASET FNAME.
    ENDIF.

    Hello,
    I made a similar program. You can have a look at it.
    *&      Form  write_to_app_server
          text
    -->  p1        text
    <--  p2        text
    FORM write_to_app_server.
    To get filename
      PERFORM get_filename.
    To write into the application server
      OPEN DATASET g_filename_with_path FOR OUTPUT IN TEXT MODE.
      IF sy-subrc = 0.
        LOOP AT <l_table> INTO <l_line>.
          TRANSFER <l_line> TO g_filename_with_path.
        ENDLOOP.
        CLOSE DATASET g_filename_with_path.
      ELSE.
        CLOSE DATASET g_filename_with_path.
      ENDIF.
    To send mail
      PERFORM send_mail.
    ENDFORM.                    " write_to_app_server
    *&      Form  get_filename
          text
    -->  p1        text
    <--  p2        text
    FORM get_filename.
      DATA : l_log_path TYPE  filepath-pathintern
                          VALUE 'Y28M_DOWNLOADS_BACKGROUND' .
      CALL FUNCTION 'FILE_GET_NAME_USING_PATH'
           EXPORTING
                client                     = sy-mandt
                logical_path               = l_log_path
                operating_system           = sy-opsys
                file_name                  = p_fname
           IMPORTING
                file_name_with_path        = g_filename_with_path
           EXCEPTIONS
                path_not_found             = 1
                missing_parameter          = 2
                operating_system_not_found = 3
                file_system_not_found      = 4
                OTHERS                     = 5.
      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.                    " get_filename
    You may find it useful.
    Regards,
    Karuna.

  • "Download Files"procedure not working in duplicate app/shows page not found

    Hello,
    I have created an application using the "Download files" procedure described in "How to Upload and Download Files in an Application" chapter of the APEX "Advanced Tutorials." It works just fine on the one server, however, when I exported the application and data from the working copy and imported it in APEX running from my laptop, I could upload files and generate a report with a link to click and download the files again but when I clicked on those links, I would get a "Page Not Found" error. It looks like it might not be going to the procedure and instead goes to a page like the following: "http://127.0.0.1:8080/apex/DBAPORTAL.download_image?p_id=1868612316946460." On the working copy on the other server, when the download link is clicked, you will get a dialog box asking if you would like to open or save the file.
    Could anybody tell me why the procedure is not being called and goes to a non existent url while the origonal application works just fine on the other server?
    I have granted APEX_PUBLIC_USER execute permissions to the procedure. I am wondering if there are any other permissions that I should be granting. Should I grant PUBLIC or ANONOMUSE permissions to use the "download_image" procedure?
    I have forgotten to mention that on my laptop I am using database 11.1 and on the server I believe the database is 10g.
    Hope to get an answer to this issue. I've asked a couple people already and they are stumped.
    Thank you in advance.
    Linda

    Scott,
    I have tried to follow the instructions commented out "RETURN FALSE;" and added procedure 'DOWNLOAD_IMAGE' to wwv_flow_epg_include_local.sql. But I'm confused. Should I be changing file "wwv_flow_epg_include_local.sql' or 'wwv_flow_epg_include_mod_local" package?
    When I run "ALTER SESSION SET DBAPORTAL FLOWS_030100;" in sqlplus, how do I know what FLOWS_XXX I have? Is it FLOWS_030100 or FLOWS_030000? I have database 11.1 installed. What version of APEX do I have with this database? How do I find out?
    Do I need to be in a perticular directory before I run the alter script? If so what folder?
    How do I "Compile the function wwv_flow_epg_include_local.sql.?"
    Needless to say, when I added the procedure to the file, and when I tried to alter it, I got the following error:
    SQL> ALTER SESSION SET DBAPORTAL FLOWS_030100;
    ALTER SESSION SET DBAPORTAL FLOWS_030100
    ERROR at line 1:
    ORA-02248: invalid option for ALTER SESSION
    Please tell me what I am doing wrong.
    Thanks
    Linda

  • Mobile Application Builder 1.0

    Hi All,
    Where can I download Sun one mobile Application Builder software?
    Thanks in advance
    Regards,
    RajeshJV

    Mobile Application Builder 1.0 is no longer a supported product from Sun.
    I'm curious as to where you read about it. If we have a reference to it in current documentation, that needs to be corrected.
    Thanks.
    Tom

  • Uninstalled itunes and tried to reinstall and the program gets to the services part and then tells me there is a problem with mobile application

    uninstalled itunes and when trying to re-install i get an error messages during the starting services part

    When I installed the Apple programs, mobile device application did not uninstall by itself. I had to go to c://program files/common files/apple/mobile device application (or something like that) and manually delete the contents and the folders. I have a 64 bit version so I also had to visit c://program files (x86)/common files/apple/mobile application device (or similar) and also manually delete the files and folders. I had to delete the files before I could delete the folders. This manual part is probably tripping everyone up, because it's not as easy as simply hitting uninstall in the control panel. But the instructions are there. I hope this helps you.

  • Mobile applications downloading to different folder

    Just moved my itunes library across to my new machine, organised and consolidated and all working well with one exception.
    I have the new iTunes Media structure that has created under an iTunes folder, all of the folders are there, Music, Podcasts, Mobile Apps, etc.
    An iTunes Media folder has also been created with just a Mobile Applications folder under it.
    When I download an iphone app they save to the folder under iTunes Media folder, if I then run Consolidation - it copies the app to the one under iTunes.
    Can't figure out why these aren't saving to this folder in the first place!! I have the organise settings, etc ticked.

    Hi all,
    I'm having this exact problem. I did a proper move of my iTunes media over to an external drive where it set up an iTunes folder and within are Mobile Applications, Music, Movies, Podcasts, all that sort of thing. However, all new applications have been downloaded to a folder on my actual iMac drive:
    ~/iTunes/iTunes Media/Mobile Applications
    I don't want to go messing around with aliases or symbolic links, I just want my Apps to download to the correct folder, same as every single other iTunes media file is perfectly able to do. Newly purchased music doesn't do this, nor does podcasts. So why do Apps? Weird.
    Any solution other than regular Consolidation? (and how do you do that, anyway?)
    Cheers!

  • Download of Mobile Application Modeler 1.0 fails every time

    Hello,
    When trying to download the Trial Version of the Mobile Application Modeler (1.0), a 15mb sized ZIP-file, the connection is always reset after downloading 99%. The zipfile is not valid and I can't open it. When trying to download the file with a download manager (such as flashget or IDM) the connection times out after about 50% or 60%. Because this file can't be resumed, there is no way to continue further.
    I've tried this on different connections (work & home) and on different PC's, also tried if antivirus or firewall prohibit in any way. This is the first file which gives me this problem when downloading from SDN. In the past I never had any problems.
    Do you know how to get the complete file somewhere else or how to download a consistent/complete file?
    Best regards,
    Edwin Oldenburg

    I have the same problem.

  • Unable to download file to application server

    Hi,
    I am trying to download a file to the application server. I've also attached my code below.After the execution of this program, it is just returning blank values to the application server file. Let me know why it is not populating the values to the files.
    Raj.
    tables: kna1,
            knb1.
    DATA: BEGIN OF itab_ls OCCURS 0,
           kunnr LIKE kna1-kunnr,
           altkn LIKE knb1-altkn,
         END OF itab_ls.
    TYPES : BEGIN OF t_file,
              date(5) TYPE c,   " Date
              time(5) TYPE c,   " Time
            end of t_file.
    DATA : gt_file TYPE TABLE OF t_file, " File Path
           g_spath TYPE fileextern,   " Path
           g_fieldname   TYPE dynfnam. " Field Name
    SELECTION-SCREEN BEGIN OF BLOCK b_01 WITH FRAME TITLE text-b01.
    SELECT-OPTIONS s_erdat FOR kna1-erdat obligatory.
    SELECTION-SCREEN END   OF BLOCK b_01.
    SELECTION-SCREEN BEGIN OF BLOCK b_02 WITH FRAME TITLE text-b02.
    SELECTION-SCREEN BEGIN OF LINE.
    Radio button for Presentation server file
    PARAMETERS    : p_pres RADIOBUTTON GROUP file DEFAULT 'X'
                    USER-COMMAND file.
    SELECTION-SCREEN COMMENT 3(20)  text-s01 FOR FIELD p_pres.
    SELECTION-SCREEN END   OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 23(22) text-s02 FOR FIELD p_flnam1
                                                   MODIF ID com.
    Presentation server file Name
    PARAMETERS    : p_flnam1 TYPE localfile MODIF ID com ."MEMORY ID zp1.
    SELECTION-SCREEN END   OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    Radio button for Application server file
    PARAMETERS    : p_app RADIOBUTTON GROUP file  .
    SELECTION-SCREEN COMMENT 3(20)  text-s03 FOR FIELD p_app.
    SELECTION-SCREEN END   OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 23(22) text-s04 FOR FIELD p_flnam2
                                                   MODIF ID com.
    Application server file Name
    PARAMETERS    : p_flnam2 TYPE localfile MODIF ID com ."MEMORY ID zp2 .
    SELECTION-SCREEN END   OF LINE.
    SELECTION-SCREEN END   OF BLOCK b_02.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_flnam1.
      g_fieldname = 'P_PCFILE'.
      PERFORM call_pres_help USING    g_fieldname
                             CHANGING p_flnam1.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_flnam2.
      PERFORM call_app_help CHANGING p_flnam2.
    AT SELECTION-SCREEN OUTPUT.
    Start-of-selection.
    SELECT kna1kunnr knb1altkn kna1ktokd kna1erdat
    INTO CORRESPONDING FIELDS OF TABLE itab_ls
    FROM kna1 INNER JOIN knb1 ON kna1kunnr = knb1kunnr WHERE kna1~erdat in
    s_erdat AND KNA1KTOKD = 'Z002' order by kna1kunnr.
    OPEN DATASET p_flnam2 for output IN TEXT MODE ENCODING DEFAULT.
    IF sy-subrc EQ 0.
      LOOP AT itab_ls.
        TRANSFER itab_ls TO p_flnam2.
      ENDLOOP.
      CLOSE DATASET p_flnam2.
    endif.
    WRITE:/'SAP Ship-toCustID', 18 'LegacyCustID'.
    ULINE.
    Loop at itab_ls.
      write: /3 itab_ls-KUNNR, 18 itab_ls-ALTKN.
    endloop.
    PERFORM download_file.
    *&      Form  call_pres_help
          text
         -->P_FIELDNAME  text
         -->P_PARAMETER  text
    FORM call_pres_help  USING    p_fieldname    TYPE dynfnam
                        CHANGING p_parameter    TYPE localfile.
      CALL FUNCTION 'F4_FILENAME'
        EXPORTING
          program_name  = sy-repid
          dynpro_number = sy-dynnr
          field_name    = p_fieldname
        IMPORTING
          file_name     = p_parameter.
    ENDFORM.                    "call_pres_help
    *&      Form  call_app_help
          text
         -->P_PARAMETER  text
    FORM call_app_help  CHANGING p_parameter    TYPE localfile.
      CALL FUNCTION '/SAPDMC/LSM_F4_SERVER_FILE'
        EXPORTING
          directory        = g_spath
        IMPORTING
          serverfile       = p_parameter
        EXCEPTIONS
          canceled_by_user = 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.
    ENDFORM.                    "call_app_help

    Hi,
    If the SY-SUBRC is equal to 8, then error is nothing but "The file could not be opened". So pls check the file name again.
    And for write statement,
    If SY-SUBRC = 4 then the Contents of name are invalid, statement could not be executed, and contents of destination remain unchanged. So pls do check this also.
    regs,
    Venkat Ramanan
    Message was edited by: Venkat Ramanan Natarajan

  • I am using an expense tracker and when I export the file for use it says it is in location /var/mobile/applications/666E-4BC6-8FF1-50CAD35FA541/documents/MyExpenses.csv where do I find this? Assistance greatly appreciated

    I am using an expense tracker and when I export the file for use it says it is in location /var/mobile/applications/666E-4BC6-8FF1-50CAD35FA541/documents/MyExpenses.csv where do I find this? Assistance greatly appreciated

    Attached is Dennis Linam’s Audition – “Log File” and “Log – Last File”
    Contact information Dennis [email protected]
    Previous contact information with your organization (DURIM):
    Dennis - i just finished my audition trial and bought the subscription the 2014 version.
    created by durin in Audition CS5.5, CS6 & CC - View the full discussion 
    DURIM - Okay.  I would expect the "Cache Warning" message because your default directories would not be the same as the ones in the settings file I generated.
    If you go back to the "7.0" directory and open the "Logs" folder, can you copy the "Audition Log.txt" file and send it as an attachment to [email protected]?  We'll take a look in that logfile and see if it gives us more information about why this is failing now.
    Also, do you have any other Adobe applications installed on this machine, such as Premiere Pro?  If so, do they launch as expected or fail as well?
    I do have the trial Pro version of Adobe reader, but I have not activated it, because I fear the same thing will happen did it. I cannot afford to activate the subscription for that product and take the chance of it not working either. I depend on those two programs religiously. Here is the files that you requested. I appreciate any help you can give me to get this audition program started
    Audition Log- file
    Ticks = 16       C:\Program Files (x86)\Common Files\Adobe\dynamiclink\7.0\dynamiclinkmanager.exe
    Sent from Windows Mail

  • How to download files from Application Server of Unix o.s to local director

    Hi All,
    I am trying to download files from Apllication server of Unix operating Systems to local file in excel sheet format using a z-program.but whenever I am trying to use OPEN dataset ........
    it is showing sy-subrc = 8.
    Can I have any clew please.
    Thanks in advance,
    Regards,
    AMEER.

    Hi Sreekanth,
    Thanks a lot for quick reply.I have to download that files from z-program only. I am giving you my code below.
    *& Report  ZTRAK_DOWNLOAD                                         *
    REPORT  ZTRAK_DOWNLOAD  MESSAGE-ID ZCT                   .
    SELECTION-SCREEN BEGIN OF BLOCK DOWNLOAD WITH FRAME TITLE TEXT1.
      PARAMETERS :
           SERDIR LIKE RLGRAP-FILENAME DEFAULT '/usr/trak',
           LOCDIR LIKE RLGRAP-FILENAME DEFAULT 'C:\Trak'.
    SELECTION-SCREEN END OF BLOCK DOWNLOAD .
    SELECTION-SCREEN BEGIN OF BLOCK INFO2 WITH FRAME.
           SELECTION-SCREEN COMMENT 1(79) TEXT2.
           SELECTION-SCREEN SKIP.
           SELECTION-SCREEN COMMENT 1(79) TEXT3.
    SELECTION-SCREEN END OF BLOCK INFO2 .
    SELECTION-SCREEN BEGIN OF BLOCK INFO3 WITH FRAME.
           SELECTION-SCREEN COMMENT 1(79) TEXT4.
           SELECTION-SCREEN SKIP.
           SELECTION-SCREEN COMMENT 1(79) TEXT5.
            SELECTION-SCREEN SKIP.
           SELECTION-SCREEN COMMENT 1(79) TEXT6.
           SELECTION-SCREEN SKIP 1.
           SELECTION-SCREEN COMMENT 1(79) TEXT7.
           SELECTION-SCREEN SKIP 2.
           SELECTION-SCREEN COMMENT 1(79) TEXT8.
    SELECTION-SCREEN SKIP 1.
           SELECTION-SCREEN COMMENT 1(79) TEXT9.
    SELECTION-SCREEN END OF BLOCK INFO3.
    *- Internal Table to output data in Excel
    DATA: BEGIN OF tab_excel OCCURS 0,
            col1(50),
            col2(132),
            col3(255),
            col4(100),
            col5(100),
            col6(50),
            COL7(60),
            col8(30),
            col9(30),
            col10(30),
            col11(20),
            col12(15),
            col13(15),
          END OF tab_excel.
    DATA: FILE LIKE RLGRAP-FILENAME .
    DATA: W_DATASET(80).
    INITIALIZATION.
      TEXT1  = 'Download Reports'.
      TEXT2 = 'The Program downloads the reports generated by Trak'.
      TEXT3 = 'Utility from Server to Local PC.'.
      TEXT4 = 'Check the following before executing the Program.'.
      TEXT5 = '     1. A valid Server path is provided.'.
      TEXT6 = '     2. A valid Local PC path is provided.'.
      TEXT7 = '     3. Local PC has 10 MB free space.'.
      TEXT8 = 'The report can be executed in the forground.'.
    TEXT9 =
    'The report should be executed after execution of Transaction TRAK'.
    AT SELECTION-SCREEN.
    IF SERDIR EQ ''.
    MESSAGE E001(ZCT).
    ENDIF.
    IF LOCDIR EQ ''.
    MESSAGE E002(ZCT).
    ENDIF.
    START-OF-SELECTION.
    Download ABAP Development Summary Report
    FILE =  '\ABAP_Report_Developments.XLS'.
    CONCATENATE LOCDIR FILE INTO FILE.
    W_DATASET = '/ABAP_Report_Developments.dat'.
    CONCATENATE SERDIR W_DATASET INTO W_DATASET.
    PERFORM INIT.
    Download BDC Development Report
    FILE =  '\BDC_Developments_Report.XLS'.
    CONCATENATE LOCDIR FILE INTO FILE.
    W_DATASET = '/BDC_Developments_Report.dat'.
    CONCATENATE SERDIR W_DATASET INTO W_DATASET.
    PERFORM INIT.
    Download Development Summary Report
    FILE = '\Developments_Summary_Report.XLS' .
    CONCATENATE LOCDIR FILE INTO FILE.
    W_DATASET = '/Developments_Summary_Report.dat'.
    CONCATENATE SERDIR W_DATASET INTO W_DATASET.
    PERFORM INIT.
    Download Enhancement Development Report
    FILE =  '\Enhancement_Developments_Report.XLS'.
    CONCATENATE LOCDIR FILE INTO FILE.
    W_DATASET = '/Enhancement_Developments_Report.dat'.
    CONCATENATE SERDIR W_DATASET INTO W_DATASET.
    PERFORM INIT.
    Download field exit Development Report
    FILE =  '\Field_Exit_Developments_Report.XLS'.
    CONCATENATE LOCDIR FILE INTO FILE.
    W_DATASET = '/Field_Exit_Developments_Report.dat'.
    CONCATENATE SERDIR W_DATASET INTO W_DATASET.
    PERFORM INIT.
    Download Frequency & Purpose Report
    FILE =  '\Frequency_And_Purpose_Report.XLS'.
    CONCATENATE LOCDIR FILE INTO FILE.
    W_DATASET = '/Frequency_And_Purpose_Report.dat'.
    CONCATENATE SERDIR W_DATASET INTO W_DATASET.
    PERFORM INIT.
    Download Function Group Developments Report
    FILE =  '\FunctionGroup_Developments_Report.XLS'.
    CONCATENATE LOCDIR FILE INTO FILE.
    W_DATASET = '/FunctionGroup_Developments_Report.dat'.
    CONCATENATE SERDIR W_DATASET INTO W_DATASET.
    PERFORM INIT.
    Download Function Module Developments Report
    FILE = '\FunctionModule_Developments_Report.XLS' .
    CONCATENATE LOCDIR FILE INTO FILE.
    W_DATASET = '/FunctionModule_Developments_Report.dat'.
    CONCATENATE SERDIR W_DATASET INTO W_DATASET.
    PERFORM INIT.
    Download Include Developments Report
    FILE =  '\Include_Developments_Report.XLS'.
    CONCATENATE LOCDIR FILE INTO FILE.
    W_DATASET = '/Include_Developments_Report.dat'.
    CONCATENATE SERDIR W_DATASET INTO W_DATASET.
    PERFORM INIT.
    Download UserGroup Developments Report
    FILE =  '\UserGroup_Developments_Report.XLS'.
    CONCATENATE LOCDIR FILE INTO FILE.
    W_DATASET = '/UserGroup_Developments_Report.dat'.
    CONCATENATE SERDIR W_DATASET INTO W_DATASET.
    PERFORM INIT.
    Download Modified_Standard_SAP_Objects_Report
    FILE = '\Modified_Standard_SAP_Objects_Report.XLS' .
    CONCATENATE LOCDIR FILE INTO FILE.
    W_DATASET = '/Modified_Standard_SAP_Objects_Report.dat'.
    CONCATENATE SERDIR W_DATASET INTO W_DATASET.
    PERFORM INIT.
    Download Include Developments Report
    *FILE =  '\Include_Developments_Report.XLS'.
    *CONCATENATE LOCDIR FILE INTO FILE.
    *W_DATASET = '/Include_Developments_Report.dat'.
    *CONCATENATE SERDIR W_DATASET INTO W_DATASET.
    *PERFORM INIT.
    Download SAP Script Developments Report
    FILE =  '\SAP_Scipt_Developments_Report.XLS'.
    CONCATENATE LOCDIR FILE INTO FILE.
    W_DATASET = '/SAP_Scipt_Developments_Report.dat'.
    CONCATENATE SERDIR W_DATASET INTO W_DATASET.
    PERFORM INIT.
    Download Transaction Developments Report
    FILE =  '\Transaction_Developments_Report.XLS'.
    CONCATENATE LOCDIR FILE INTO FILE.
    W_DATASET = '/Transaction_Developments_Report.dat'.
    CONCATENATE SERDIR W_DATASET INTO W_DATASET.
    PERFORM INIT.
    Download User Exits Developments Report
    FILE =  '\UserExits_Reports.XLS'.
    CONCATENATE LOCDIR FILE INTO FILE.
    W_DATASET = '/UserExits_Reports.dat'.
    CONCATENATE SERDIR W_DATASET INTO W_DATASET.
    PERFORM INIT.
    Download ABAP Query Developments Report
    FILE =  '\ABAPQuery_Developments_Reports.XLS'.
    CONCATENATE LOCDIR FILE INTO FILE.
    W_DATASET = '/ABAPQuery_Developments_Reports.dat'.
    CONCATENATE SERDIR W_DATASET INTO W_DATASET.
    PERFORM INIT.
    Download Functional Area Developments Report
    FILE =  '\FunctionalArea_Developments_Report.XLS'.
    CONCATENATE LOCDIR FILE INTO FILE.
    W_DATASET = '/FunctionalArea_Developments_Report.dat'.
    CONCATENATE SERDIR W_DATASET INTO W_DATASET.
    PERFORM INIT.
    MESSAGE S003(ZCT) WITH LOCDIR.
    END-OF-SELECTION.
    This routine checks whether file exists if yes downloads it to
    the Local PC
    FORM INIT.
    OPEN DATASET W_DATASET FOR INPUT IN TEXT MODE ENCODING DEFAULT.
    DO.
       IF SY-SUBRC <> 0.
          EXIT.
       ENDIF.
       READ DATASET W_DATASET INTO  tab_excel.
       APPEND tab_excel.
       CLEAR tab_excel.
    ENDDO.
         PERFORM DOWNLOAD_FILE.
    ENDFORM.
    This routine downloads the data in an XL format on local PC
    FORM Download_File .
      CALL FUNCTION 'WS_DOWNLOAD'
                EXPORTING
                     FILENAME                = FILE
                     FILETYPE                = 'DAT'
                TABLES
                     DATA_TAB                = tab_excel
                EXCEPTIONS
                     FILE_OPEN_ERROR         = 1
                     FILE_WRITE_ERROR        = 2
                     INVALID_FILESIZE        = 3
                     INVALID_TYPE            = 4
                     NO_BATCH                = 5
                     UNKNOWN_ERROR           = 6
                     INVALID_TABLE_WIDTH     = 7
                     GUI_REFUSE_FILETRANSFER = 8
                     CUSTOMER_ERROR          = 9
                     OTHERS                  = 10.
        IF sy-subrc <> 0.
         message ''.       " Error in file transfer
        ELSE.
          CLEAR TAB_EXCEL.
          REFRESH TAB_EXCEL.
          FILE = ''.
          W_DATASET = ''.
        ENDIF.
    ENDFORM.
    I have created those files in Application Server running in another z-program in background mode.Then I am trying to download those files using above the program.I am creating those trak/Trak files manually and I can able to see those files in A.S level.But when downloading the same files I am facing the problem.
    regards,
    Ameer

Maybe you are looking for