cancel
Showing results for 
Search instead for 
Did you mean: 

WebGUI@WebAS-ITS: Sending own HTML or XML

Former Member
0 Kudos

Hello All,

I would like to realize the following scenario:

A transaction is called via WebGUI for HTML using the following URL: <b>http://<server>:<port>/sap/bc/gui/sap/its/webgui?~transaction=<transaction></b>. It is working fine; in backend the transaction is performed; after performing, at the end of the transaction an <b>HTML</b> or <b>XML</b> page should be sent.

The idea of the scenario is that the URL is called from a third party portal, which receives the results of the transaction via HTML or URL.

I’m using <b>WebAS 640 with interated ITS</b>.

I’ve tried some ideas such as sending own HTML using function module <b>ALEWEB_DOWNLOAD</b> for sending HTML; but it is not working correctly.

Is there a general possibility to send HTML or XML while or after performing the called transaction using WebGUI?

Thanks & Regards,

Kurt.

Message was edited by: Kurt Weiskopf

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hello Raja,

Thanks for your information.

I've checked the class <b>CL_HTTP_CLIENT</b>; I don't know, whether this class could solve my requirement.

I'm looking for the possibility to generate HTML-code after performing a transaction via <b>WebGui</b>.

Could you please explain me, how to use and include this class in <b>WebGui</b>?

Thanks & best regards,

Kurt.

athavanraja
Active Contributor
0 Kudos

<i>I'm looking for the possibility to generate HTML-code after performing a transaction via WebGui.</i>

Let me understand

you have a transaction say "ABC" and this is called using WEBGUI. after clicking a button in the transaction , you want to generate html code and

<b>show it in the browser or?</b>

<b>send it to some other address?</b>

<b>show it in the browser or?</b>

you can do this using BSP

<b>send it to some other address?</b>

generate html code and send it using CL_HTTP_CLIENT . the code would look something like below.

 call method cl_http_client=>create
      exporting
        host    = 'www.xxxxx.com'
        service = '80'
        scheme  = '1'
      importing
        client  = http_client.

call method http_client->request->set_header_field
    exporting
      name  = '~request_method'
      value = 'POST'.

  call method http_client->request->set_header_field
    exporting
      name  = '~server_protocol'
      value = 'HTTP/1.1'.
...
...
...
call method http_client->request->set_cdata
    exporting
      data   = <b>wf_string</b> " this would hold the generated html data
      offset = 0
      length = rlength.

  call method http_client->send
    exceptions
      http_communication_failure = 1
      http_invalid_state         = 2.

Hope this is clear.

Regards

Raja

If your question is answered, reward the helpful answers and close the thread.

Answers (2)

Answers (2)

Former Member
0 Kudos

Hello Raja,

thank you for your helpfull answer.

Best regards,

Kurt.

athavanraja
Active Contributor
0 Kudos

<b><i>at the end of the transaction an HTML or XML page should be sent.</i></b>

Do you mean to say that, at the end of the transaction (may be for example hitting a save button or something like that) should send a http response in HTML/XML format to a specific address.

Since you are working with WAS6.40, using CL_HTTP_CLIENT class, you can achieve this.

if you need help on using the class do let us know.

Regards

Raja