Web dynpro - Download desktop file

Hi guys,
How to download desktop file data into application server in the Web dynpro application?
Thanks.

Hi,
FORM error_file .
  DATA:  l_msg(80) TYPE c,
         l_name1(100) TYPE c,
         l_ext1(5)    TYPE c,
         l_file1(300) TYPE c.
  CLEAR : l_msg,
          l_name1,
          l_ext1,
          l_file1.
  MOVE p_file TO w_file.
*--- text-305 for '\in\'
  IF w_file CS text-305.
*&---Create log file to keep old & new characteristic values
    CLEAR w_error_file.
    CLEAR wa_error.
    SPLIT w_file AT c_dot INTO l_name1 l_ext1.
    CONCATENATE l_name1 sy-datum sy-uzeit c_dot l_ext1 INTO l_file1.
    MOVE l_file1 TO w_error_file.
*---text-305 for '\in\' & text-319 for '\error\'
    REPLACE text-305 IN w_error_file WITH text-319 IGNORING CASE.
    CONDENSE w_error_file NO-GAPS.
*---to set txt format
*---text-320   for 'csv'   & text-321   for 'txt'
    REPLACE text-320 IN w_error_file WITH text-321 IGNORING CASE .
  ENDIF.
  CLEAR w_count.
  DESCRIBE TABLE it_error LINES w_count.
  IF NOT w_count IS INITIAL.
    OPEN DATASET w_error_file
                 FOR OUTPUT IN TEXT MODE
                 ENCODING DEFAULT.    IF sy-subrc  0.
      WRITE:/ 'Error in opening file'.
    ELSE.
      wa_error-vbeln   = 'Order'.
      wa_error-posnr   = 'Item'.
      wa_error-matnr   = 'Material'.
      wa_error-error   = 'Error Description'.
      TRANSFER wa_error TO w_error_file.
      MOVE: sy-uline(200)
          TO wa_error.
      TRANSFER wa_error TO w_error_file.
      MOVE: '   '
            TO wa_error.
      TRANSFER wa_error TO w_error_file.
      LOOP AT it_error.
        CLEAR wa_error.
        wa_error-vbeln   = it_error-vbeln.
        wa_error-posnr   = it_error-posnr.
        wa_error-matnr   = it_error-matnr.
        wa_error-error   = it_error-error.
        TRANSFER wa_error TO w_error_file.
      ENDLOOP.*---text-317 for 'Error file saved successfully to :'
      CONCATENATE text-317 w_error_file INTO l_msg SEPARATED BY space.
     MESSAGE l_msg TYPE c_s. "Comment KC 10 Dec 08
*>>BC KC 10 Dec 08
*---pop up error message
      PERFORM popup_inform USING l_msg.
*<<EC 10 Dec 08
    ENDIF.
  ENDIF.
  IF w_error_file IS NOT INITIAL.
    CLOSE DATASET w_error_file..
Delete dataset w_error_file.   u201Cto delete file from AS  
  ENDIF.
ENDFORM.                    " ERROR_FILE
Regards
Md.MahaboobKhan

Similar Messages

  • KM functionality in web dynpro. Missing file: TutWD_KMBrowser_Init.zip

    Hi,
       in pdf documentation "Using Knowledge Management Functionality in Web Dynpro Applications" is mentionated TutWD_KMBrowser_Init.zip file for downloading, but I can't find it following the path suggested.
    Could you help me?
    Thanks,
    Luca Grilli

    Hi,
    There is no resource in the said location
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/tutorial on using knowledge management functions in web dynpro.htm  ...
    Kindly help in finding some document which gives a overview of using KM UI APIs .
    Regards,
    Vani Rao

  • Saving Offline PDF form from Web-Dynpro with Dynamic File Name

    Hello All,
    We have a offline PDF form.... When we save the form, a default file name appears. We need to change this default name to some value that is already available in the form fields.
    I have gone through some posts in the forum. However not able to figure out the solution.
    Following are the details:
    1. Web-Dynpro used : ABAP Web-Dynpro
    2. Form Type: Native
    3. Offline Editable form
    Regards,
    Kunjal Patel

    Hi Rajesh,
    I have not yet found a solution....
    Also as you have seen no one is replying.....
    All,
    Should we consider that this issue does not have a specific solution?
    Regards,
    Kunjal

  • Web Dynpro component - Flat file upload

    Hi,
    We have a requirement to upload a flat file to Planning cube (real time cube) through Web Dynpro component.
    Web Dynpro component which we have developed is able to read the records from the flat file.
    Now, the issue is u201CHow can we save the records read from the flat file to planning cubeu201D?
    If anyone has worked on the similar requirement, pls reply. Thanks in advance.
    Note : We have a planning sequence which will be executed on the click of UPLOAD button.
                  This planning sequence has a filter on Infoprovider (cube which we are using for planning) and a planning function of type u201CFile uploadu201D in which we have defined the flat file format.
                  Aggregation level is made on Multiprovider which has 2 underlying cubes (One is realtime and other one is standard).
    Is there any function module in which we can pass the name of the flat file so that it will be uploaded in planing cube?
    Regards,
    Ankur

    You can deploy solution provided by Marc Bernard within following SDN's contribution:
    [u201CLoad a File into SAP NetWeaver BI Integrated Planningu201D |http://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/90cef248-29e0-2910-11bb-df8dece7e22c]
    This uses webdynpro functionality.

  • Excel unable to read WEBI schedule download excel file

    Hi experts,
    We use BO central management's instance manager to schedule download a report as excel format in our ftp share folder.
    And the download did run successfully and an icon of the file been shown as excel  format in ftp folder.
    while we use excel 2007 to open the file, excel pop out the message of unable to read the file.
    it is saying the excel found unreadbale content in report. Do you want to recover the contens of this workbook? if you trust the source of this workbook, click yes. after applied the yes, excel stil pop out the message of unable to read the file.
    the general tab in excel been uncheck the "ignore other applications that use Dynamic Data Exchange (DDE), but result still shown unable to read.
    The whole set of report can be run in WEBI and using save report to my computer as excel without any issues.
    WEBI been setup as refresh on open.
    Any clues?

    Hi,
    Did you create a PivotTable report in the file? As your description, the HTML format could be used correctly in Excel 2007. Did you get the other error message?
    Such as,Unable to read file.
    When you click OK,   you receive the following error message:
    Errors were   detected in '<var>filename</var>.xls', but Microsoft Excel was   able to open the file by making the repairs listed below. Save the file to make   these repairs permanent.
    PivotTable report   '<var>report_name</var>' on   '[<var>filename</var>.xls]worksheet_name' was discarded due to   integrity problems.
    Please try to use the workaround:
    Turn off AutoRecovery when you work with any workbooks.Click Excel button>Excel options>Save>Uncheck AutoRecovery
    Following this, if the issue exists, I recommend you fix the issue the following KB:
    http://support.microsoft.com/kb/943088
    http://support.microsoft.com/kb/929766
    Regards,
    George Zhao
    TechNet Community Support

  • Need Web Dynpro ABAP Tutor files

    Hi
    Can anyone help me to locate Tutor files in this site / any sap web site.
    Regards

    hi,
    U can check out the following links for web dybpro in abap....
    https://www.sdn.sap.com/irj/sdn/developerareas/webdynpro?rid=/webcontent/uuid/fed073e5-0901-0010-4eb4-c9882aac7b11 [original link is broken]
    this link contains 6 basic webdympro for abap tutorial.....
    also chk out
    https://www.sdn.sap.com/irj/sdn/developerareas/webdynpro?rid=/webcontent/uuid/512040e1-0901-0010-769c-c238c6ca35d9 [original link is broken]

  • URL error while excuting web dynpro application for file upload  in IP

    The following error text was processed in the system DB1 : WebDynpro Exception: ICF service node for application /sap/public/bc does not exist
    The termination type was: RABAX_STATE
    The ABAP call stack was:
    Method: RAISE of program CX_WD_GENERAL=================CP
    Method: HANDLE_REQUEST of program CL_WDR_UCF====================CP
    Method: IF_HTTP_EXTENSION~HANDLE_REQUEST of program CL_WDR_MAIN_TASK==============CP
    Method: EXECUTE_REQUEST of program CL_HTTP_SERVER================CP
    Function: HTTP_DISPATCH_REQUEST of program SAPLHTTP_RUNTIME
    Module: %_HTTP_START of program SAPMHTTP

    Hello,
    have you typed the web manually? try using transaction SICF and "test" the service so the URL is generated by the system. You should find the webdynpro application under /SAP/public/bc/
    If the error continues re-import the transports.
    Cheers,
    C

  • Trigger File Generation to a Server from Web Dynpro Application

    Hi Everybody! Hope you had a good new years eve
    Is it possible to generate a File on a Server outgoing from Web Dynpro?
    I tried to use GUI_DOWNLOAD. But as I couldn't use the GUI_DOWNLOAD from the Web Dynpro, I wrote a Report "ZCMI_EXPORT_FILE" that generates a Text-File. When I start the Report by myself, the file gets generated. All fine.
    To be able to generate the File from Web Dynpro, I created a Batch Input Function Module, that I call in the Web Dynpro. The File is not created and it does not show any errors.
    Do you have any idea how i can get this working? I'd also be happy with a different approach.
    Best Regards and Thanks,
    Steffen
    REPORT that is called with Batch Input from Web Dynpro:
    call function 'ZFM_GENERATE_EXPORT'
      exporting
        it_detail_record     = lt_records
        is_export            = gs_export
      importing
        ev_string            = gs_export-document
        et_dataset           = data_tab
      exceptions
        parameter_is_initial = 1
        others               = 2.
    if sy-subrc <> 0.
    endif.
    concatenate '\\SERVER\EXPORT\' gs_export-filename into lv_filename.
    call function 'GUI_DOWNLOAD'
      exporting
        filename                = lv_filename
      tables
        data_tab                = data_tab
      exceptions
        file_write_error        = 1
        no_batch                = 2
        gui_refuse_filetransfer = 3
        invalid_type            = 4
        others                  = 5.
    if sy-subrc <> 0.
      exit.
    endif.

    HI,
    GUI_DOWNLOAD does not get's executed in the Backgroud.
    there is no way to do it as a background job.. create the folder.. transfer the file to the application server in the backgorund using OPEN DATASET... use the tcode CG3Y to download the file from the app server to your folder..

  • File Upload in Web Dynpro ABAP not using File Upload UI element

    Hi all ,
    I have searching for a way to upload a file using the file open dialog ( or even by manually specifying the path/file name) without using the file upload UI Element in ABAP web Dynpro . The  File Upload UI element works for smaller files however with large file sizes 64 MB , the system seems to be running of memory (SYSTEM_NO_ROLL) . This is due to a known fact that the UI element makes a duplicate copy of the whole copy while it does the upload.
    I have been looking at the ACFUPDOWNLOAD as a way to solve this problem but cannot seem to figure out how it works , even the sample program  provided  by SAP does not work. I am working with a regular abap server and not kpro( knowledge mananagement provider)  or portal .
    Any help would be greatly appreciated.
    thanks,
    Ali.

    If you are on NetWeaver 7.01, you can try both the ACFUpDownload UI element or try creating your own FileUpload in Adobe Flex with Flash Islands.  ACFUpDownload requires the KPRO by default (which is why the same application isn't working for you), but you can write your own handler class to act as the KPRO receiver.  Here is an eLearning on the topic:
    https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/109b9b52-bc00-2c10-8786-e4c5e96d7e04
    and source code:
    https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/70645070-bb00-2c10-f086-f126721acdb4
    If you want an eLearning on the FlashIslands approach, you can find it here as well:
    https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/50d42644-91ef-2b10-228c-9e0ae75b274e
    and Source Code:
    https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/f044b62c-90ef-2b10-64a6-9ec25294d133
    However in both of these approaches you still have to be careful with how you handle large files.  The problem is that they are processed often a single binary string.  This makes the processing easy, but requires total amount of session memory at least as large as the file being uploaded.  In NetWeaver 7.02 ABAP adds the concept of Streams and Locators to help with the partial processing of large files.  This feature doesn't come until later this year, but if you are interested you can learn about it here:
    https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/80f983df-213e-2c10-ba89-b5a12ef178e8

  • Where can I get project template for Web Dynpro example&

    Hello,
    There is an example in SAP NetWeaver Developer Studio Documentation for creating a Web Dynpro Application accessing ABAP functions. It references the initial Web Dynpro project template file: TutWD_FlightList_Init.zip. How can I get it?
    It is not available in the SAP Developer Network (Web Application Server area | Samples and Tutorials).
         Thanks

    The URL I gave you also contains a link to the _Init project.
    "Project Template: The initial project (starting point for this tutorial) is also available to [download from SDN]." (https://www.sdn.sap.com/sdn/downloaditem.sdn?res=/irj/servlet/prt/portal/prtroot/com.sapportals.km.docs/business_packages/a1-8-4/4tutwd_flightlist_init.zip)

  • Can an iPod download all files?

    I'm considering buying an iPod touch. I need it to have a full functioning browser that can surf the web and download all file types and temporarily store them on the iPod's storage and then by virtue of connecting it to a computer off-load said files to that computer. PDA functions are more important than music and video though active streaming is cool.
    Oh, and obviouly it must be fully WiFi capable.
    Does the iPod do this?
    Or maybe the iPhone does this (WiFi or via phone service)?

    Tech specs for iPod Touch. http://store.apple.com/us/browse/home/shopipod/family/ipodtouch?mco=MTIxMTE Yes, Wi-Fi.
    and iPhone 3G. http://store.apple.com/us/browse/home/shop_iphone/family/iphone?mco=MTE2NTQ
    Tech specs on iPhone 3G indicate Wi-Fi (802.11b/g).
    Using iPod as a Storage Device
    Carolyn

  • Build Web Dynpro project EAR without Developer Studio

    Is it possible to build Web Dynpro project EAR file without Developer Studio? All possible solutions are welcome (console, scripts, java etc.) I want to integrate the project into CI Server and try to find way for automatic build.
    Thanks.

    Yes. Sure. But as i can see, during generation of EAR there are some files like (Project)App.xml, (Project)Component.xml that regenerated each time i create EAR from Developer Studio. I don't know the logic of creation of these files. Is there standard ant build script from SAP which i can use?
    Edited by: Artem Pasko on Dec 26, 2007 2:02 PM

  • Unable to download file from FileDownload UI Element - Java Web Dynpro

    Hello Experts,
    I am facing a strange issue.Scenario is:
    I created an java web Dynpro application (Please note that it is just a standalone WD app, not integrated in portal) with just one FileUpload UI Element ,one FileDownload UI element and one button (for triggering an action).
    I browse a file (e.g. text,pdf,doc etc.) and click on button. It uploads the file and when I click on download, there are two cases:
         1) Simply click on download does not downloads the file and shows error: "Unable to download <file name> from <server name>.  Unable to open this Internet site. The requested site is either unavailable or cannot be found. Please try again later." Though it is opening the file,showing the content.
         2) I opened that portal URL in a new tab in same session and logged in with a portal user. Now if I click on download link of same WD app opened in different tab of same session, it downloads the file without any error.
    I am using portal 7.0
    Can somebody point what's going wrong with case 1?
    Helpful pointers will be appreciated.
    Thanks,
    Kirtiman

    Hi Sid,
    I did not gave any authentication of WD app as it is anonymous app. There is no parameter set in application properties.
    As I run the app, it is showing the initial screen with UI elemtns and till upload works fine,.It has to be an anonymous app, so cannot ask for credential from user.
    Thanks
    Kirtiman

  • File DownLoad from R/3 to Local Disk through Web Dynpro

    Hi,
    I have a zebra print spool, to be saved in the local disk. For this, I have an RFC which will store the document in Portal Server KM folder and will give the file name for web dynpro app. The web dynpro app will search the KM Directory, and will enable the user to save the file on the local disk.
    Is it right approach? Is there any other approaches which would be efficient. BTW, I have files from 4k to 12k size. Can I directly attach it to the context variable and store it directly onto the local disk.
    I am running Netweaver2004 SP16. I cant use Input stream, does this affect the performance?.
    Thanks, I appreciate your time.

    Hi Raj,
    you have the name and the full path of the file you can access the file through FILE IO as the file is on portal server only and then you can use the File Download UI in web dynpro to download the file
    Ninad

  • How to create a Web Dynpro Project from Downloaded zip file?

    Hi,
    I have been working in Java Web Dynpro for last 1 month but not able
    to create any Web Dynpro from Downloaded zip file?
    Can anybody tell me how to create a Java Web Dynpro Project from
    Donloaded zip code?
    Regards
    Kaushik Banerjee

    Hi Kaushik,
    You can add the existing zip file into your workspace by the following way -
    First open the NWDS and create a new project by clicking file -> new -> Project -> Simple -> Project
    and then File -> Import -> zipfile and then browse the zip file into the newly created project.
    or else you can also unzip the zip file into a folder and then Use the option of Import an exisitng project into workspace. You can find this in the File-> import -> Existing project into workspace. and then use the Browse option to browse to the existing folder.
    After importing the project you need to rebuild the project
    Regards,
    Raju Bonagiri.

Maybe you are looking for