How to display response of http request as a web page in ABAP?

Hi all,
In ABAP, we can use class <b>cl_http_client</b> to send a http requst and then got the response data as a XSTRING variable. Usually, the response data is the html source of a web page. How to display this web page within dynpro?
I found we can use class <b>cl_gui_html_viewer</b> to display the web page of a URL or data in SAP web respository. Is there any way of using it to load response data in cl_http_client and display that web page?
Thanks a lot.

Welcome to SDN.
1. use http_client->response->get_cdata( ).
to get the response data in string format instead of xstring format.
2. use FM CONVERT_STRING_TO_TABLE to covert the string to table of type W3HTML
3. use method
data: l_doc_url(255) type c.
      call method html_control->load_data
                  exporting
                     type         = 'text'
                     subtype      = 'html'
                  importing
                     assigned_url = l_doc_url
                  changing
                     data_table   = html_table.
call method html_control->show_data
                  exporting
                     url       = l_doc_url.
to load the html content and show it in cl_gui_html_viewer
Regards
Raja

Similar Messages

  • How to display content in HttpSerlvetResponse in a new web page?

    I am a newbie in servlet&html and hope to get some information here for my question.
    Suppose I have a web page having a list. after the user has chosen one of them, he will click on submit to send the request to the servlet.
    In my servlet, I use the query string to get the related information and put it into a httpServletResponse. My question is, what should I do such that the content of Response will be shown in a new web page, instead of replacing the original one? Thanks!

    You can't do this from the server side. The client side should initiate the new window. There are several ways, under each:
    <a href="servlet" target="_blank">Open in new window</a>
    <form action="servlet" target="_blank">Submit to new window</form>
    <someElement onclick="window.open('servlet');">Popup a new window</someElement>

  • How to display all the surveys using content query web part

    Can you please tell me how to display all the surveys using content query web part in more details? I also created a subsite and multiple surveys in that site. Then, I inserted a Content Query Web Part and select the List Type to be "Survey",
    however, it returned nothing. Did I miss anything?

    Hi,
    OOTB Survey List does not contain any
    Content Types and it has the following structure:
    Response entry is represented by
    List Item
    Response entry consist of questions and answers, where Question correspond to
    Field and Answer to Item value respectively.
    For querying Survey List via CQWP  the following properties could be used
    BaseType 
    <Lists BaseType="4">
    ServerTemplate
    <Lists ServerTemplate="102">
    Example
    To retrieve all the responses from Survey lists, specify List Type property as shown on picture
    Reference:
    http://stackoverflow.com/questions/17280778/display-all-surveys-using-content-query-web-part
    Best Regards,
    Eric
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • How to display a fixed number of rows in a page when using CL_GUI_ALV_GRID

    Hy experts
    How to display a fixed number of rows in a page when using CL_GUI_ALV_GRID?? lets say 500 ?? because my display table it may contain in some cases 10.000 and evidently I can t see all of them..
    I have a button in my toolbar witch triggers this event
    (display 500 records ) but I don t have the logic to do this only with methods of CL_GUI_ALV_GRID.
    can you tell me a standard method of CL_GUI_ALV_GRID witch can help me do this?? any hint will be good..
    Till now I was used to add a column to my structure witch represents a flag that is a number corresponding to every 500 records (a batch containing 500 records )
    first       500 - flag -> 1
    second  500 - flag -> 2
    etc..but I m convinced that exists a way of doing this more easy..without damaging my structure..
    thanx in advance..don t be shy..reply if you have any hints..

    Hi,
    if method SET_FILTER_CRITERIA doesn´t help, I think that you must work with 2 internal tables, a counter and a loop for filtering the records to be displayed:
    case counter.
      when 1.
         loop at int_table1 from 1 to 500.      "<-- your table with all records
           move int_table1 to int_table2
        endloop.
      when 2.
         loop at int_table1 from 501 to 1000.     
           move int_table1 to int_table2
        endloop.
    etc, etc.
    Call grid-->SET_TABLE_FOR_FIRST_DISPLAY
       exporting
         IT_OUTTAB = int_table2                "<-- instead of your currently table int_table1

  • How to display link content on the the same sharepoint page on click event

    "How to display link content on the the same sharepoint page on click event"
    Detail:
    we are using a document library where all html files are stored/uploaded.  we would like to display/open the html file on the same sharepoint page where all the files are listed.
    Thanks.

    Use jQuery and set the target to self to the anchor tag
    Regards,
    Sairam Avacorp Technologies

  • How to show modal window without popup in a web page using javascript

    Hi,
    How to show modal window without popup in a web page using javascript, means when the modalwindow is opened it should not ask for popup blocker alert......
    pls help me.....

    Thanx for ur reply,
    Actually the senario is when i click on a button, another jsp page should be displayed in a modal window without popup, but the functions alert() and confirm() will not accept the url path of the another jsp page...

  • How to customize and fix permanently the size of web pages (zoom%) in Firefox as in Internet Explorer either: View - Zoom - Custom (percentage).

    How to customize and fix permanently the size of web pages (zoom%) in Firefox as in Internet Explorer either:
    View - Zoom - Custom (percentage).
    Thank you

    This may help you.
    https://support.mozilla.com/en-US/questions/894000

  • How can I change a minus figure on a web page to show in red? Firefox3.6.8 winXP

    How can I change a minus figure on a web page to show in red?

    I would assume that the website sends negative number with a special CSS class code or uses JavaScript to to change the style afterward.
    Did it ever work in Firefox?
    Do you see a error in the Tools > Error Console regarding this problem?
    "Clear the Cache": Tools > Options > Advanced > Network > Offline Storage (Cache): "Clear Now"
    "Remove the Cookies" from sites that cause problems: Tools > Options > Privacy > Cookies: "Show Cookies"
    Start Firefox in [[Safe Mode]] to check if one of your add-ons is causing your problem (switch to the DEFAULT theme: Tools > Add-ons > Themes).
    See [[Troubleshooting extensions and themes]] and [[Troubleshooting plugins]]

  • My Safari displays text in certains spots on a web page as mixed characters

    My Safari displays text in certains spots on a web page as mixed characters. Is there a fix for this or does anyone have an idea what may be going on? I have looked at my fonts and everything seems to be working just fine. I can't quite figure out why this only happens to certain text and not others. But I can't read half of the pages on the web because of this. I can copy the mixed up text out of Safari and past it in another application and the copy is in perfect english then.
    an example of what I am talking about is below:
    (Kvg"Urgekhkeu"/Crmg"/"Crmg"Fgumvqru
    Here is what it says when I copy the same characters out of Safari and paste them below:
    (Item Specifics - Apple Desktops)
    Any help or advice will be greatly appreciated

    I work as a graphic designer so I keep a very clsoe eye on my font library. In fact I don't use font Book, I use Suitcase Fusion. But i went to font book and double checked and I don't have any duplicae fonts in there. Would you have any other ideas?
    thanks for your help!

  • Get Response after HTTP Request

    Is it possible to display the response after a http request in forms? the response comes from a kind of reader which sends the reading-result as parameters after a request.

    Hello Henry,
    We are firing the CREATE/POST operation in the BATCH mode exactly with the same type of PAYLOAD what you have shared here and we are correctly getting response.
    1st operation was successful and we have got content with 201 Created Status Code.
    2nd operation failed and got 400 bad request with some error.
    3rd operation was successful and we have got the content with 201 Created Status Code.
    I am unable to replicate your problem in my case. Everything is working fine for me.
    Your problem is strange.
    Regards,
    Ashwin

  • Page display:400 Bad HTTP request after implement WebDispatcher fo portal

    Dear all
       Our portal implement the WebDispatcher(7.0) to load balance for our
    portal system(include one CI and one Dialog instance,we use HTTP to
    load our portal request.).After that,some of the portal page display
    the information like this:
    400 Bad HTTP request
    Bad HTTP request
    Error: -21
    Version: 7000
    Component: HTTP_FILTER
    Date/Time: Thu Sep 27 10:26:51 2007
    Module: http_auth.c
    Line: 469
    Server: portal_WDP_02
    Error Tag:
    Detail: illegal request
    &copy; 2001-2005, SAP AG
    We logon the CI and the page all are right.So,some wrong with our
    WebDispatcher?Can you give us some advice?

    Hi,
    The answer from SAP:
    The maximum size of request URI is hard coded in kernel, and it cannot be configured by a parameter. The maximum size of PATH is 4096, and the maximum size of query string is 4096 as well.
    If the request is a post request, you have to ask the calling side to move some name value pairs from query string to the POST body.
    If it is a GET request, you have to ask the calling side to change it to POST and move value pairs to the POST body.
    Kind Regards

  • Its urgent...How to implement functions in http request handler ?

    Hello experts,
    I have created http request handler class and  also created service in SICF.
    service and handler class are connected. please guide me how to implement “info”, “get”, “create”, “delete” functions in request handler.

    Hi,
    It seems you go on your way of http basic programming where you need handle the request of info, get, etc. But here you have WDA framework, so you don't need do as the basic ways of http programming. SICF can handle the activated WDA applications, maybe you can call them SERVICES.
    I suggest you go through WDA architecture, tutorials, ... and at last you can find a full demo 'LORD_MAINTAIN_COMP' by SE80.

  • How does Flash send outgoing HTTP request to server?

    Hello everyone,
    I would like to know how Flash sends outgoing HTTP requests.
    I would like to know when from the inside of a Flash SWF file
    request for another SWF or FLV file is made; how the Flash sends
    this request to server.
    Thank you very much and have a great day,
    Khoramdin

    Hello everyone,
    I would like to know how Flash sends outgoing HTTP requests.
    I would like to know when from the inside of a Flash SWF file
    request for another SWF or FLV file is made; how the Flash sends
    this request to server.
    Thank you very much and have a great day,
    Khoramdin

  • Fresh install of Firefox not displaying any fonts in the menues or web pages how do I fix this?

    completely uninstalled priviouse version of Firefox and just intalled Firefox 13.0.1. it doesn't display any fonts not on web pages and not within the Firefox menu structure.

    Try to disable hardware acceleration in Firefox.
    *Tools > Options > Advanced > General > Browsing: "Use hardware acceleration when available"
    *https://hacks.mozilla.org/2010/09/hardware-acceleration/
    *https://support.mozilla.org/kb/how-do-i-upgrade-my-graphics-drivers

  • How to display multiple records in smart forms in new page for each record

    Hi,
              How to display the data from a internal table in a smart form.
    I want each record to be displayed in seperate page.
    please tell me with example.
    thank u,
    Sarath

    Do this ,
       in the main window - open a loop on your internal table ,
    within the loop open the text and give the output fields,
    after this text  use the Command node and in this set the next page as page1,
    so when the loop gets executed its first record will be on the first page and the second record will be on the next page and so on ..
    Reward to usefull answers.

Maybe you are looking for

  • Confirmation of receipt for PM notification layout change ?

    Hello Can somebody tell me how I can change the printing layout of the confirmation of receipt document in the action box for PM notifications? I couldn't find any way to do this in customizing.

  • How to get the lost data of a data base table such as MARA

    i have added an include structure to mara table,while activation errors have occured  i went to SE14 and selected 'adjust database' push button . IN this after being activated the testing data of MATA has  been lost. What would be the reason?

  • What's the difference between Generators and Image Units?

    Hi What's the difference (in layman terms) between the Generators and Image Units in the Library?

  • Airplay Audio

    I have a Music Tech Mac Lab with an AppleTV connected to a laser projector. I don't want Airplay to switch my audio to the AppleTV & projector. I have better audio hooked to my computer. Can I stop Airplay from switching to the lower quality laser pr

  • Idoc number  as file name

    Hi I am working on idoc - file scenario. I need to get the idoc number as file name in the receiver side? How could it be done ?