How to display an XML in Web Dynpro

Hi,
I am pretty new to Web Dynpro and have a specific requirement.
I have a web dynpro page on which we display a table. One of the columns in the table is a XML message. Now on lead selection of each row I want to display the contents of the XML in an embedded control below the table. I have already implemented the functionality to download the XML message to file system but I want a capability to show the XML contents within my page in a formatted way.
If I use a text view, the XML does not look very nice.
I do not want to implement a new tree control based control now where I parse my xml file and then try to recursively generate a tree. This will take time for me as i am not very well versed with WD programming.
Can anyone tell me if there exists any control in WD which can display the XML in formatted way?
If you guys have used the new ABAP debugger and seen the XML viewer in it then you can get an idea of what I need. I am not sure about the control that the ABAP debugger uses. It will be good if someone can help me find something like that.
After all WD is all about reusability.
Regards,
Vikas

Hi Vikas,
   see this little example which creates a xml file to download and open in the browser. Put it in an action handler method.
DATA lr_conv   TYPE REF TO cl_abap_conv_out_ce.
  DATA lv_data   TYPE        string.
  DATA lv_xfile  TYPE        xstring.
  lv_data = '<?xml version=1.0" encoding="utf-8"?> put your xml here'.
  cl_abap_conv_out_ce=>create( RECEIVING conv = lr_conv ).
  lr_conv->convert( EXPORTING data   = lv_data
        IMPORTING buffer = lv_xfile ).
  cl_wd_runtime_services=>attach_file_to_response(
                 EXPORTING
                     i_filename  = 'test.xml'
                     i_content   = lv_xfile
                     i_mime_type = 'application/xml' ).
Hope this helps you. Revert if need some more help.
Regards,
Pavan.

Similar Messages

  • Display XML in Web Dynpro

    Hello,
    i have a string variable filled with xml. And now i want to display this code in Web Dynpro with an ui element.
    I tried a text_edit but it only shows the text but i want it to be displayed like in an IE.
    Anybody an idea?
    Regards Robert

    Ok, so an Iframe ist not the best solution right now.
    So i did what you said and uploaded the xml content to the ICM cache and generate an URL.
    Now i tried to open the URL with an external Window, but inside the new opened IE i can't see anything.
    Maybe my coding is not complete?
    Regards,
    Robert
    DATA:
            lv_xml_content        TYPE string,
            lo_http_response  TYPE REF TO if_http_response,
            lv_url            TYPE string,
            lv_xfile          TYPE xstring,
            lr_conv           TYPE REF TO cl_abap_conv_out_ce,
            lo_window_manager TYPE REF TO if_wd_window_manager,
            lo_api_component  TYPE REF TO if_wd_component,
            lo_window         TYPE REF TO if_wd_window.
      cl_abap_conv_out_ce=>create( RECEIVING conv = lr_conv ).
      lr_conv->convert( EXPORTING data   = lv_xml_content
                        IMPORTING buffer = lv_xfile ).
      CREATE OBJECT lo_http_response TYPE cl_http_response.
      lo_http_response->append_data( lv_xfile ).
      lo_http_response->set_content_type( 'text/xml' ).
      lo_http_response->server_cache_expire_rel( expires_rel = 500 ).
      lo_http_response->set_status( code = 200 reason = 'OK' ).
      cl_http_server=>server_cache_upload(
        EXPORTING
          url      = 'Test.xml'
          response = lo_http_response ).
      lo_api_component  = wd_comp_controller->wd_get_api( ).
      lo_window_manager = lo_api_component->get_window_manager( ).
      lo_window         = lo_window_manager->create_external_window(
                        url = 'Test.xml'
                        title = 'XML im Internetexplorer'
      lo_window->open( ).
    Edited by: Thalin on Sep 21, 2010 3:45 PM

  • How to call PDF file in Web Dynpro Appl?

    How to call PDF file in Web Dynpro Appl?

    Hi Gobinath,
    1. Create a value attribute of type byte called pdfSource.
    2. Insert an UI element called Interactive Form in your layout
    3. Set the source property of this Interactive From UI element to the context pdfSource.
    4. Insert a button which would open your pdf file.
    public void onActionsubmit(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
        //@@begin onActionsubmit(ServerEvent)
       IPrivate<viewname>.IContextElement contextElement = wdContext.currentContextElement();
             byte[] bytes = contextElement.getPdfSource();
             try
                   File file = new File("C:
    temp
    example.pdf");
                   FileOutputStream os = new FileOutputStream(file);
                   os.write(bytes);
                   os.close();
                catch (IOException e)
                   // do something
                   e.printStackTrace();
        //@@end
    Warm Regards,
    Murtuza

  • Regarding how to pass the data from web dynpro to workflow

    hi gurus,
    how to pass the data from web dynpro to workflow.
    Regards
    vijay

    Check this [thread|SAP_WAPI_START_WORKFLOW;

  • How to pass the data from web dynpro to workflow.

    hi gurus,
    how to pass the data from web dynpro to workflow.
    Regards
    vijay

    Hi
    you can use function module
    data   ls_input_container  TYPE swr_cont.
    data   lt_input_container  TYPE TABLE OF  swr_cont.
    CALL FUNCTION 'SAP_WAPI_START_WORKFLOW'
        EXPORTING
          task            = ptask
        IMPORTING
          return_code     = lv_return_code
          new_status      = lv_new_status
        TABLES
          input_container = pinput_container
          message_lines   = lt_message_lines
          message_struct  = lt_message_struct.
    where you pass the data in imnternal table "pinput_container" as
      ls_input_container-element = 'KUNNR'.
      ls_input_container-value = ls_skna1-kunnr ."wd_this->lv_kunnr.
      APPEND ls_input_container TO lt_input_container .
      ls_input_container-element = 'CLUSER'.
      ls_input_container-value = lv_cluser.
      APPEND ls_input_container TO lt_input_container .
      ls_input_container-element = 'BUKRS'.
      ls_input_container-value = lv_bukrs. " youe value as per requirement.
      APPEND ls_input_container TO lt_input_container .
      ls_input_container-element = 'VKORG'.
      ls_input_container-value = ls_sknvv-vkorg. " youe value as per requirement
      APPEND ls_input_container TO lt_input_container .
      ls_input_container-element = 'VTWEG'.
      ls_input_container-value = ls_sknvv-vtweg. "youe value as per requirement.
      APPEND ls_input_container TO lt_input_container .
      ls_input_container-element = 'SPART'.
      ls_input_container-value = ls_sknvv-spart. "youe value as per requirement.
      APPEND ls_input_container TO lt_input_container .
    *Also Forgot to mention where ptask is your workflow ID *
    Regards,
    Arvind
    Edited by: Arvind Patel on May 14, 2010 7:38 AM

  • How to send a mail through web dynpro application

    Hi
    How to send a mail through web dynpro application?
    Thanks

    Hi ,
      Please post some more details about your query .
    One way is to can use LinkToUrl UI element and in the reference property of the UI element , give it as mailto:mail addess
    Thanks.
    aditya.

  • How to put water mark in web dynpro abap Adobe forms

    Hi
    Can any body tell me how to put water mark in web dynpro Abap adobe forms ,
    actually I need to print water mark as back ground in gray color.
    Points will be rewarded of Helpful answer..!
    Regards,
    Sidram

    Hi,
    for more information about layout options in forms, go to your form in transaction SFP, layout view and choose Help -> Adobe LifeCycle Designer Help. There you find information on page layout, e.g. " Objects can be placed anywhere on a master page, inside or outside the content area. As a general rule, do not place objects inside the content area unless your intention is to have other objects laid down on top of the master page objects when the form is rendered. If you are setting up a watermark, place it inside the content area. "
    Besides, there's an Adobe forum where you might get more information for such Adobe questions.
    Regards, Heidi

  • HOW WE CAN DISPLY DATE IN WEB-DYNPRO

    Hi friend,
    i want to one example to up load the date format in web-dynpro abap.
    THA

    Hi Vikash,
    >
    vikash wrote:
    > Hi friend,
    >
    > HOW WE CAN DISPLY DATE IN WEB-DYNPRO
    >
    > THA
    if you want to see date calender help in your view, you have to add an input field in the view and bind it with a context attribute of type dats.
    Regards
    Pranav

  • How to make color screen in Web dynpro appl?

    How to make color screen in Web dynpro appl?

    Hi Gobi..
    <u><b>Go thorugh the follwing links</b></u>
    https://www.sdn.sap.com/sdn/collaboration.sdn?contenttype=url&content=https%3A//forums.sdn.sap.com/forum.jspa%3FforumID%3D52
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/business_packages/a1-8-4/nw04stack09themes.zip
    <u><b>Tutorial</b></u>
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/documents/a1-8-4/how%20to%20edit%20web%20dynpro%20themes.pdf
    <u><b>Setting the Theme</b></u>
    http://help.sap.com/saphelp_nw2004s/helpdata/en/1e/535d420447e054e10000000a155106/content.htm
    <u><b>Configuration</b></u>
    http://help.sap.com/saphelp_nw70/helpdata/en/43/8a1a8ece230c8ce10000000a11466f/content.htm
    Regards,
    GS
    Message was edited by:
            Sathishkumar GS
    Message was edited by:
            Sathishkumar GS

  • How to display duplicate key in web report?

    Hi Experts,
    Can anybody tell me how to display duplicate key in web report?
    I know in the Bex analyzer, we can allow the duplicate key to be dispalyed via the 'query property' by right click, and in the 'display option' tab, there is an option which named 'forbid duplicate key', if we don't select this option, the duplicate key will be dispalyed in the report result in BEx analyzer.
    But how can I do this in Web report? Thanks in advance.
    Eileen

    Hi,
    <b>I know in the Bex analyzer, we can allow the duplicate key to be dispalyed via the 'query property' by right click, and in the 'display option' tab, there is an option which named 'forbid duplicate key', if we don't select this option, the duplicate key will be dispalyed in the report result in BEx analyzer.</b>
    Do the same and execute report in web.You can able to see the same.
    Cheers
    Karthik

  • How to decrease performane of a web dynpro abap application

    Hi Folks,
            I am new to web dynpro abap .pls tell me how to decrease performane of a web dynpro abap application but dont say by using icm tracking and wd_trace_tool.that are used to find out errors?

    >You mean to say we can use Runtime analysis and SQL trace in WDABAP?
    Yes, that is exactly what I mean.
    >I Thomas i need e learning tutorials created by you.I am new to WDABAP.if possible try to send URL of your e learning tutorials
    They are all available here on SCN in the Web Dynpro ABAP eLearning library:
    http://www.sdn.sap.com/irj/scn/webdynpro-elearning

  • How do I connect my netweaver web dynpro

    How do I connect my netweaver web dynpro to the portal? how do i arrange the iviews? how do i add the iviews?

    hi,
    You can create webdynpro iviews in portal in two ways. 
    1) from iview template &
    2) from webdynpro java applications.
    If you create from the 1st one, you have to provide two parameters of the  webdynpro application.
    i) namespace
    ii) application name
    you can find these namespace & application name from content admin --> webdynpro --> open your webdynpro project > open the application. you will find two columns.
    left side name is the namespace (eg: local/firstproject) & right side you will find application name.
    If you create iview from 2nd menthod, the following is the link contains creation of webdynpro iview.
    [https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/0c7b2f25-0c01-0010-f2a2-f8a65a9dcad9]
    hope this helps you
    regards,
    vv.

  • How to browse local file using web dynpro

    hi everyone
    How can I browse local file using Web Dynpro?And read file names into Context or array. I have tried the following code but its not working
    String resourcePath = WDURLGenerator.getResourcePath();
    String depObjResourcePath = WDURLGenerator.getResourcePath(“Test”);
    WDDeployableObjectPart appPart = WDDeployableObject.getPart(“Test”, “TestApp”, WDDeployableObjectPart.APPLICATION);
    help required urgently
    Thanks & Regards
    Jaspreet Kaur

    Reply in
    how to browse local file using web dynpro
    Regards,
    Ashwani Kr Sharma

  • How to call standard report in web dynpro abap.

    Hi All,
       I need the output of one standard report e.g RHXSTR00 on web dynpro abap.
       How can I achieve this?
       Please help!!! Points will be rewarded.
       Thanks in advance!
    Cheers,
    Darshna.

    Hi Darshna,
    The report result is ALV and in most of the cases we generally do not have function modules or any other easy way to get the output.
    In such cases the best approach which we follow is, to run this in background mode and generate the spool and display the ouput in PDF.
    But if intertactive form is not present in your requirement then we need to debug the logic of the report (if no FM or class present) and get the results and display it in the View.
    Best regards,
    Suresh

  • How to Hide ADOBE Toolbar in Web Dynpro ABAP

    Hi Team,
    I have an ADOBE form (Display Only) coded in my Web Dynpro ABAP application which displays data from the context of a view. I want to hide and disable the PDF toolbar. How to achieve this. I saw a method SET_HIDE_TOOLBAR, but don't know where to write code for this. The form is NOT interactive (want this only for printing). We are on Support pack 10.
    Any ideas?
    Thanks for your time

    Hi Sanjay,
    Welcome to SAP Interactive Forms by Adobe
    Rgds,
    Anto.

Maybe you are looking for

  • Can we have a group name in oracle database???

    Hello, what i want to know is that can we have a group name, a set of all usernames for a database, the whole purpose is to simplify the grant statement, rather then doing this grant select to <user1>      grant select to <user2>      grant select to

  • Automatic creation of BW data flow documentation

    Dear Gurus, I need to write documentation of the data flow of a huge project which I haven't implemented by myself. The documentation should contain a mapping of the objects in the dataprovider, towards objects in the source system(s). Eventually wit

  • Acrobat Pro XI constantly crashes after Yosemite upgrade

    I recently upgraded my Mac to Yosemite (version 10.10.1 14B25), and now my Acrobat Pro is crashing (version XI 11.0.10). The steps to recreate are pretty simple: 1 launch Acrobat Pro 2 go to Downloads on the Dock and select a recent pdf download 3 Co

  • Is it normal for Iphone 5 to overheat when using 3G?

    Hello, Is it normal for a new IPhone 5 to get overheated when using for 10mins 3G in searching something over Internet, watching a video on you tube or anything else that uses 3g? What could I do? Thanks

  • After iPod  update, my iPod won't disconnect or show up in iTunes

    I downloaded the iPod updater. I then restarted my computer, plugged in my iPod nano, and the updater popped up with a thing to click to update it. The whole time, my iPod never showed up in iTunes, but it said do not disconnect on the screen. The up