File download from DMS into Webdynpro for ABAP application

I need to download the file from DMS content server on the PC and with my application on clicking of file name, file needs to be displayed.
To achieve the downloading part I tried BAPI_DOCUMENT_CHECKOUTVIEW2, but it is not working.
If I pass the parameters
PF_HTTP_DEST              = 'SAPHTTPA'
PF_FTP_DEST               = 'SAPFTPA', then it returns error message saying file can not be saved.
If I don't pass above parameters then it gives me 'RFC_START_PROGRAM' error.
How to download the file from DMS in WebDynpro and read/display the content?
Please help.
Thanks, in advance.

Hi,
I had the same problem, but found a solution. All I changed was the hostname to 'DEFAULT'
Use the code below:
DATA: lt_drao TYPE TABLE OF drao,
         wa_drao TYPE drao,
         wa_bin TYPE x LENGTH 2550,
         lt_bin LIKE TABLE OF wa_bin,
         file_data TYPE xstring,
         v_line TYPE i,
         size TYPE i.
   CALL FUNCTION 'CVAPI_DOC_CHECKOUTVIEW_DIALOG'
     EXPORTING
       pf_dokar                 = ls_input-dokar
       pf_doknr                 = ls_input-doknr
       pf_dokvr                 = ls_input-dokvr
       pf_doktl                 = ls_input-doktl
*     PF_FTP_DEST              = 'SAPFTPA'
*     PF_HTTP_DEST             = ' '
      pf_hostname              = 'DEFAULT'
      pf_content_provide       = 'TBL'
*     PS_API_CONTROL           =
*   IMPORTING
*     PSX_MESSAGE              =
*     PSX_FILE                 =
*     PSX_DRAW                 =
    TABLES
      ptx_content              = lt_drao.
   LOOP AT lt_drao INTO wa_drao.
     wa_bin = wa_drao-orblk.
     APPEND wa_bin TO lt_bin.
   ENDLOOP.
   DESCRIBE TABLE lt_drao LINES v_line.
   size = 2550 * v_line.
   CALL FUNCTION 'SCMS_BINARY_TO_XSTRING'
     EXPORTING
       input_length       = size
*     FIRST_LINE         = 0
*     LAST_LINE          = 0
    IMPORTING
      buffer             = file_data
     TABLES
       binary_tab         = lt_bin
*   EXCEPTIONS
*     FAILED             = 1
*     OTHERS             = 2
   IF sy-subrc <> 0.
* Implement suitable error handling here
   ENDIF.
CALL METHOD cl_wd_runtime_services=>attach_file_to_response
     EXPORTING
       i_filename      = 'abc.pdf'
       i_content       = file_data
       i_mime_type     = 'application/pdf'
*     i_in_new_window = ABAP_FALSE
*     i_inplace       =  ABAP_FALSE

Similar Messages

  • Is DD/MM/YYYY supported in webdynpro for abap application

    Hi All,
    We are using 2 different time statements one developed in webdynpro for java and other in webdynpro for abap.date format in java is DD/MM/YYYY but in webdynpro for abap is DD.MM.YYYY.
    is DD/MM/YYYY supported in webdynpro for ABAP application or even if user enters DD.MM.YYYY can we convert that to DD/MM/YYYY so that we will maintain uniformity in both the applications
    Thanks
    Bala Duvvuri

    Hi Bala,
    We can convert the date before saving ,even if the user enters the date as dd.mm.yyyy  as mentioned below.
    DATA: lv_indicator type XUDATFM .
    CALL FUNCTION 'ISH_GET_USER_DATE'
      EXPORTING
        USER_NAME         = SY-UNAME
      IMPORTING
        DATE_FORMAT       = lv_indicator .
    CASE lv_indicator.
        WHEN '1'.                                        " DD.MM.YYYY
          CONCATENATE p_date6(2) '.' p_date4(2) '.'
                      p_date(4)
             INTO p_result.
        WHEN '2'.                                        " MM/DD/YYYY.
          CONCATENATE p_date4(2) '/' p_date6(2) '/'
                      p_date(4)
             INTO p_result.
        WHEN '3'.                                        " MM-DD-YYYY.
          CONCATENATE p_date4(2) '-' p_date6(2) '-'
                      p_date(4)
             INTO p_result.
        WHEN '4'.                                        " YYYY.MM.DD
          CONCATENATE p_date(4) '.'  p_date+4(2) '.'
                      p_date+6(2)
             INTO p_result.
        WHEN '5'.                                        "YYYY/MM/DD
          CONCATENATE p_date(4) '/'   p_date+4(2) '/'
                      p_date+6(2)
             INTO p_result.
        WHEN '6'.                                        "YYYY-MM-DD
          CONCATENATE p_date(4) '-'  p_date+4(2) '-'
                      p_date+6(2)
             INTO p_result.
      ENDCASE.
    Regards,
    Lakshmi.

  • How to integrate WebDynpro for ABAP application with SAPEnterprisePortal7.0

    Hi WebDynpro for ABAP Experts,
    We developed an WebDynpro for ABAP application on R/3, and now we are planning to show this as an iview on SAP Portal EP7.0 (SAP j2EE Engine--Java stack). is it possible to integrate this application with portal?
    If so can you proviode me the way how can we achieve this?
    ADV Thanks
    Regards
    Phani

    Hi Alex,
    Thanks for your response.
    I already created the system object R/3 Backend.
    Actually some WebDynpro java applications/iViews are currently running on Portal. and the developers developed these in NWDS and deployed the .sca files on the Portal server and we created Webdynpro for java iViews.
    but now the requirement is creation of webDynpro for ABAP views.
    The developers developed  WebDynpro for ABAP on the R/3 system. So what are the parameter values we need to give at teh time of creation of  WebDynpro for ABAP iview like the Namespace, Application name etc which are mandatory values and how the Portal server detects the application, this means no need to deploy the application on the Portal server?
    Shall we need to maintain any JCo Destinations or not?
    Pl share your ideas.
    ADV Thanks
    Regards
    Phani

  • Portal integration of Webdynpro for ABAP application

    Hi all,
    Can anyone provide me with the steps for <b>integrating a Webdynpro for ABAP application with portal?</b>
    Regards,
    Bino

    Hi Bino
    Check out the following link
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/webdynpro/portal integration of web dynpro applications.pdf
    Regards
    Rajeev.
    Do award points for helpful answers in SDN.

  • Monitor usage of Webdynpro for Abap Application

    Dear all,
    How does one monitor how many times a Webdynpro for Abap application is called by users? We have an i-view in the portal that calls a WD4A program in  the back-end system. Is there anything in the portal or back-end that will give us the usage information?
    Thanks, Neeta

    Hi Thomas,
    We are not necessarily looking for performance data but how many times a bsp and/or function module is called. The idea is to try and determine how many calls are made to SWN_WIEXECUTE BSP via a URL (http://<hostname>:xxxx/bc/bsp/sap/SWN_WIEXECUTE/MAIN.DO to track a usage of a new workflow approval/rejection process.
    We also want track how many calls are made to SAP_WAPI_WORKITEM_COMPLETE function module to track approval/rejection of a workflow process via Portal UWL.
    Best Regards, Neeta

  • Can we determine the CAPSLOCK is ON in a webdynpro for ABAP application?

    I have a pwd field in a Webdynpro for ABAP application.  If the CAPSLOCK is on  then I need to prompt user either via popup or a static text on the page that "CAPSLOCK is ON".  Is there way a to determine the caps lock is on when the user enables CAPSLOCK?  Thanks for help in advance
    Regards,
    Madan.

    Thank you for your response.  I am already prompting the user if the pwd is incorrect.  But user is expecting to receive a prompt if the CAPSLOCK is ON to avoid typing incorrect pwd.  If it is not possible to identify whenever the CAPSLOCK is turned ON, atleast is there a way to identify the CAPSLOCK is ON whenever user is navigated to this page/webdynpro application.
    Regards,
    Madan.

  • WebDynpro for ABAP applications for Touch Screen Clients?

    Hi folks!
    Has anybody in the WD4A community experiences in developing WebDynpro for ABAP applications for touch screen clients?
    Any hint will be welcome.
    Thanx in advance!
    Regards,
    Volker

    Hi,
    sorry, but Web Dynpro ABAP does not support touch screen clients. This would mean new Unified Rendering features which are, however, not scheduled.
    Regards, Heidi

  • Uploading PDF into webdynpro for ABAP

    Hello,
    I have a small Webdynpro for ABAP with an Interactive Form. I can fill my fields in this form. Now I downloaded the PDF to my local drive, changed the fields and tried to upload it again. Thats where my problem is:
    I cant upload my changes. I used a File_upload UI Element which is binded to a attribute FORM.FILE type xstring. This attribut I binded to the Interactive_Form element field pdfsources. I implemented a button with an action for my server roundtrip.
    I thought thats it but unfortunetly not. Can anybody tell me what I am missing.
    Thanks in advance.
    regards
    stefan

    Hi Stefan
    Web Dynpro ABAP development recommends that you create a <a href="http://service.sap.com/message">customer message</a> on component BC-WD-ABA.
    Best regards,
    Markus Meisl

  • WebDynpro for ABAP Application in SAP-4.7 Version

    Hi,
    I am new to WebDynpro for ABAP. Can anyone tell me that Could I create any application of WebDynpro Application in SAP-4.7 version.
    Regards
    Dinesh.

    Hi Dinesh,
    Web Dynpro Tool is not available in SAP-4.7 version.
    u can create web application using BSP(business server pages which  is available in 4.7 version.) from SE80
    Web Dynpro tool is available in ECC6.0.
    To Create a web dynpro application or component Go To SE80,and select Web Dynpro component/interface from the drop down list.
    U need to Have SAP Net Weaver Installed in ur version.
    Regards,
    Lakshman
    Edited by: Lakshman N on Nov 17, 2008 1:16 PM

  • Perform some changes on standard SAP webdynpro for ABAP application

    Hi,
    We do need to perform some changes (new buttons, new tabs, adding new code etc) on a standard SAP product developed on Webdynpro for ABAP.
    Which is the best approach to do so? I have reading about enhancement framework and it seems to be right solution to do so. Am I correct?
    Any best practice to acomplish our target is very welcome.
    Looking forward to hearing from you.
    Kind regards,
      Imanol

    You are on right track thinking about enhancement framework.
    My approach is would be in the following order.
    Personalization/customization
    Enhancement
    Modification

  • XRPM: replace 'item dashboard' by customer webdynpro for abap application

    Hi guys,
    I want to replace my item dashboard application to be replaced by a customer WD4A. Within this application I will select from a tree structure a project.
    Now the questions: How to controll the standard context menu in the portal during this proces ? Do a need to call an API to get back my context menu ?
    Does anyone know ?
    Cheers, John

    Are you sure you want to entirely replaced the dashboard? If you're on 4.5 you can enhance allot of the RPM dashboard in the WD component /RPM/UI_DASHBOARD.
    You still have to fill the RPM cache object if you want to use the detail iViews for example Element Details.
    What exactly do you want to achieve?

  • What are the basic settings required to run webdynpro for abap application?

    Hi,
              i want some information regarding settings(HOST,Port) to run our application through Browser.What are the settings can i give to run my Application.and also i got some problem that when i create a VIEW it didnt shows the Standard Toolbar of Consisting of all UI Elememts.Is this problem is related Installation?
    Thanks & Regards
    Ravi

    Hi Ravi,
    This will be helpful please check.
    http://help.sap.com/saphelp_nw04s/helpdata/en/43/e86de5008b4d9ae10000000a155369/content.htm.
    Reward points if useful.
    Regards,
    Muneesh Gitta.

  • How can i read local excel file into internal table in webdynpro for abap a

    Could someone tell me how How can i read local excel file into an internal table in webdynpro for abap application.
    thank u for your reply

    Deep,
    File manuplations...............................
    1. At the presentation level:
    ->GUI_UPLOAD
    ->GUI_DOWNLOAD
    ->CL_GUI_FRONTEND
    2. At the application server level:
    ->OPEN DATASET : open a file in the application server for reading or writing.
    ->READ DATASET : used to read from a file on the application server that has been opened for reading
    -> TRANSFER DATASET : writing data to a file.
    -> CLOSE DATASET : closes the file
    -> DELETE DATASET : delete file
    If file is on the local PC,use the function module GUI_UPLOAD to upload it into an internal table by passing the given parameters......
    call function 'GUI_UPLOAD'
    exporting
    filename = p_file
    filetype = 'ASC'
    has_field_separator = '#'
    tables
    data_tab = t_data
    p_file : excel file path.
    t_data : internal table
    <b>reward points if useful.</b>
    regards,
    Vinod Samuel.

  • SAP Webdynpro for ABAP - IXOS Integration for storing documents

    Hi
    We have a requirement to attach documents to a web based SAP custom application and store as attachments simialr to GOS fucntionality in SAPGUI. SAP web based application is developed using web dynpro for ABAP. Atatched documents are to be stored externally in IXOS system. I am looking for fucntion modules or BAPI's that integrate SAP webdynpro for ABAP and IXOS. Requirement is below
    1)     From SAP Webdynpro for ABAP application read a file form desktop and store on external IXOS system.
    2)     Retrieve a file from IXOS system and display in SAP Web Dynpro for ABAP  application
    3)     Delete a file on IXOS system from Web Dynpro for ABAP application
    Thank You

    You are on right track thinking about enhancement framework.
    My approach is would be in the following order.
    Personalization/customization
    Enhancement
    Modification

  • Dynamic form in Webdynpro for ABAP - Context Cardinality question

    Hello -
    I have an adobe form in a webdynpro for ABAP application which I want to be able to be dynamic. Basically I want to be able to use a Webdynpro context node with a cardinality of 1-N and the form will take each node of the context and create a page for each one. I am able to do a static form with a context node that has a 1-1 cardinality, but once I change my cardinality to 1-N on the node the static form no longer works (there is no data). Is what I want to do possible? I've looked through all the documentation I could find and could not get a definite answer. Any help would be appreciated.
    Widget (1-N)
         -Widget_info (1-1)
              *Name
              *Sku
              *Description
         -Widget_plant (1-M)
              *Plant_Code
              *Plant_State
              *Plant_City
         -Widget_pic (1-1)
              *Picture
    ... So I want to have a form which can print a page for each widget in the context (the number of which can vary). That form would have the Name, sku, description, plant_code, plant_state, plant city and the picture on it. (This is just a generic example of what I need to do)
    Regards,
    - Jason

    Ok, I think I found a bug... It seems for adobe forms in WD4A, the root context node must be 1-1 and you must nest the 1-n node within that... Not sure why, but it worked. So in my case my context would look like this:
    FOO_NODE (1-1)
         Widget (1-N)
              -Widget_info (1-1)
                   *Name
                   *Sku
                   *Description
              -Widget_plant (1-M)
                   *Plant_Code
                   *Plant_State
                   *Plant_City
              -Widget_pic (1-1)
                   *Picture

Maybe you are looking for

  • Master-detail form (my detail is in a new canevas-- new window)

    Hello, I have a Master-detail form, in my detail when i select a row i want to show an other canevas that becomes a detail for this selected row. i constructed the relationship between my first detail block and my new canevas that contains the detail

  • Creative Zen MicroPhoto Error (8

    Hi, I'm from the UK but purchase a Zen MicroPhoto from the USA brand new. I've had it around 3 weeks and its been great but the other day when i went to turn it on the screen froze and it wouldn't boot up the the menu like usual. It is the Creative l

  • When restoring iPod...error occurs

    I'm trying to reformat my iPod from Mac to PC, but something keeps popping up that says: iTunes could not contact the iPod software update server because you are not connected to the internet But I am connected...I'm typing on this forum aren't I?

  • Create a ready to use image for SharePoint 2013 development environment.

    Hi  I have a requirement in which we are required to have an Image of the whole SharePoint 2013 environment, (ideally single server installation/standalone as I believe multi-tier would not be possible, or if possible suggest on that also), with all

  • RFC callback

    Hi, I have a RFC question: I have the next R/3 situation: R/3 (source system)  ---> RFC function for price obtain --> R/3 (destination system) --> Callback RFC function --> R/3 (source system) In an on-line execution a report ask for the sales price