Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

HTTP request

Former Member
0 Likes
545

Hello!

I need to send a file XML for an address HTTP using programs ABAP. How can I make that using request HTTP?

Thank you.

3 REPLIES 3
Read only

Former Member
Read only

athavanraja
Active Contributor
0 Likes
457

you can use cl_http_client class to do the same.

check out the following demo program.

RSHTTP01

Read only

Former Member
0 Likes
457

Hi Andre,

I would firstly recommend that you check how to create an HTTP request :

<a href="http://help.sap.com/saphelp_nw70/helpdata/en/1f/93163f9959a808e10000000a114084/content.htm">http client example</a>

Then you could try to use the POST method in order to send information.

This information could be your XML data. If you generate this from an internal table, you could simply generate the XML data using a <a href="http://help.sap.com/saphelp_nw70/helpdata/en/e3/7d4719ca581441b6841f1054ff1326/frameset.htm">Transformation</a>

A simple transformation is enough in most cases, otherwise you would have to write an XSLT. If you do not require to validate your XML against a DTD, you could use the following one :


<xsl:transform version="1.0"
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
>

<xsl:strip-space elements="*"/>

<xsl:template match="/">
  <xsl:copy-of select="."/>
</xsl:template>

</xsl:transform>

Good luck ;)