<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Function module HTTP_POST in Background in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-http-post-in-background/m-p/3249569#M775800</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;I am using function module HTTP_POST to get xml from web. My object is working perfectly fine when I execute it in foreground (online) but the same when executed as a background job is not returning me anything.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Questions:&lt;/P&gt;&lt;P&gt;1. Is it possible to use this function module in a background job?&lt;/P&gt;&lt;P&gt;2. What can be errors in this case?&lt;/P&gt;&lt;P&gt;3. Solution please....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Points guranteed for the solution or helpful replies.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My code for reference:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'HTTP_POST'&lt;/P&gt;&lt;P&gt;  EXPORTING&lt;/P&gt;&lt;P&gt;    ABSOLUTE_URI                      = urlstring&lt;/P&gt;&lt;P&gt;   REQUEST_ENTITY_BODY_LENGTH        = reqlen&lt;/P&gt;&lt;P&gt;   RFC_DESTINATION                   = 'SAPHTTP'&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  PROXY                             =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  PROXY_USER                        =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  PROXY_PASSWORD                    =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  USER                              =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  PASSWORD                          =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  BLANKSTOCRLF                      =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;IMPORTING&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  STATUS_CODE                       =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  STATUS_TEXT                       =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  RESPONSE_ENTITY_BODY_LENGTH       =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  TABLES&lt;/P&gt;&lt;P&gt;   REQUEST_ENTITY_BODY               = xmldoc[]&lt;/P&gt;&lt;P&gt;   RESPONSE_ENTITY_BODY              = response_body[]&lt;/P&gt;&lt;P&gt;   RESPONSE_HEADERS                  = response_header[]&lt;/P&gt;&lt;P&gt;   REQUEST_HEADERS                   = request_header[]&lt;/P&gt;&lt;P&gt; EXCEPTIONS&lt;/P&gt;&lt;P&gt;   CONNECT_FAILED                    = 1&lt;/P&gt;&lt;P&gt;   TIMEOUT                           = 2&lt;/P&gt;&lt;P&gt;   INTERNAL_ERROR                    = 3&lt;/P&gt;&lt;P&gt;   TCPIP_ERROR                       = 4&lt;/P&gt;&lt;P&gt;   SYSTEM_FAILURE                    = 5&lt;/P&gt;&lt;P&gt;   COMMUNICATION_FAILURE             = 6&lt;/P&gt;&lt;P&gt;   OTHERS                            = 7.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks- Ags.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 18 Jan 2008 23:06:47 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-01-18T23:06:47Z</dc:date>
    <item>
      <title>Function module HTTP_POST in Background</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-http-post-in-background/m-p/3249569#M775800</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;I am using function module HTTP_POST to get xml from web. My object is working perfectly fine when I execute it in foreground (online) but the same when executed as a background job is not returning me anything.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Questions:&lt;/P&gt;&lt;P&gt;1. Is it possible to use this function module in a background job?&lt;/P&gt;&lt;P&gt;2. What can be errors in this case?&lt;/P&gt;&lt;P&gt;3. Solution please....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Points guranteed for the solution or helpful replies.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My code for reference:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'HTTP_POST'&lt;/P&gt;&lt;P&gt;  EXPORTING&lt;/P&gt;&lt;P&gt;    ABSOLUTE_URI                      = urlstring&lt;/P&gt;&lt;P&gt;   REQUEST_ENTITY_BODY_LENGTH        = reqlen&lt;/P&gt;&lt;P&gt;   RFC_DESTINATION                   = 'SAPHTTP'&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  PROXY                             =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  PROXY_USER                        =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  PROXY_PASSWORD                    =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  USER                              =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  PASSWORD                          =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  BLANKSTOCRLF                      =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;IMPORTING&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  STATUS_CODE                       =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  STATUS_TEXT                       =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  RESPONSE_ENTITY_BODY_LENGTH       =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  TABLES&lt;/P&gt;&lt;P&gt;   REQUEST_ENTITY_BODY               = xmldoc[]&lt;/P&gt;&lt;P&gt;   RESPONSE_ENTITY_BODY              = response_body[]&lt;/P&gt;&lt;P&gt;   RESPONSE_HEADERS                  = response_header[]&lt;/P&gt;&lt;P&gt;   REQUEST_HEADERS                   = request_header[]&lt;/P&gt;&lt;P&gt; EXCEPTIONS&lt;/P&gt;&lt;P&gt;   CONNECT_FAILED                    = 1&lt;/P&gt;&lt;P&gt;   TIMEOUT                           = 2&lt;/P&gt;&lt;P&gt;   INTERNAL_ERROR                    = 3&lt;/P&gt;&lt;P&gt;   TCPIP_ERROR                       = 4&lt;/P&gt;&lt;P&gt;   SYSTEM_FAILURE                    = 5&lt;/P&gt;&lt;P&gt;   COMMUNICATION_FAILURE             = 6&lt;/P&gt;&lt;P&gt;   OTHERS                            = 7.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks- Ags.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Jan 2008 23:06:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-http-post-in-background/m-p/3249569#M775800</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-18T23:06:47Z</dc:date>
    </item>
    <item>
      <title>Re: Function module HTTP_POST in Background</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-http-post-in-background/m-p/3249570#M775801</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Agasti,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use class CL_HTTP_CLIENT. there is a method SET_HEADER_FIELD , u can use POST in that.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It will be something like below:&lt;/P&gt;&lt;P&gt;data: client type ref to if_http_client.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ur code to call the webservice API (method CREATE or CREATE_BY_URL &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL METHOD client-&amp;gt;request-&amp;gt;set_header_field&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;name = '~request_method'&lt;/P&gt;&lt;P&gt;value = 'POST'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It will work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cheers,&lt;/P&gt;&lt;P&gt;Hema.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 19 Jan 2008 04:56:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-http-post-in-background/m-p/3249570#M775801</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-19T04:56:50Z</dc:date>
    </item>
  </channel>
</rss>

