thespot4sap.com independent sap information
 

get SAP Access - pay monthly

SAP Tutorials    Online SAP Training    SAP CBT's    SAP Forums    SAP Articles    SAP Jobs    SAP Resumes
  SAP Access    SAP Blogs    SAP Books     Links     SAP Vendor Directory     Submit Content    Search
Previous posts in SAP ABAP
Page 1657 of 5660

How to use ABAP HTTP_POST

Blogger : Apolemia
All posts : All posts by Apolemia
Category : SAP ABAP
Blogged date : 2007 Sep 29

SAP has the function modules HTTP_GET and HTTP_POST to call remote urls. With HTTP_GET one can just had parameters in the URL to send information to the external system. For example, setting the url to


http://myserver.com/mypage?x=1&y=10


sends x=1 and y=10 as parameters to mypage. The problem with HTTP GET is that there is a limit on the ammount of data that can be sent (technically it is unlimited in the new specification, but there are still servers that impose the old limit).

To send large ammounts of data using HTTP one should use the POST method (ABAP function HTTP_POST). To accomplish the same call with HTTP_POST first the length of the data must be calculated


len("x=1&y=10") = 8


then the function must be called with the following parameters


ABSOLUTE_URI http://myserver.com/mypage
REQUEST_ENTITY_BODY_LENGTH 8
REQUEST_ENTITY_BODY x=1&y=10


The function group URL_GENERATION has some data quoting functions to help build valid URLs. Also, the introspector tool is helpful to debug the HTTP calls.

PS. This post was originally in pvl.freezope.org, but that site is down most of the time so I'm moving it here. I also moved the other non-sap content to my new homepage.

Read comments or post a reply to : How to use ABAP HTTP_POST
Page 1657 of 5660

Newest posts
New Page 1

 

 

About Us   Contact Us   Privacy   Disclaimer   Feedback   Email Discussion   Newsletter  

Copyright © - Independent SAP Information
Learn XML, Guesthouses and B&B's