Chinaunix首页 | 论坛 | 博客
  • 博客访问: 7189063
  • 博文数量: 655
  • 博客积分: 10264
  • 博客等级: 上将
  • 技术积分: 8278
  • 用 户 组: 普通用户
  • 注册时间: 2007-06-04 17:47
个人简介

ABAP顾问

文章分类

全部博文(655)

文章存档

2017年(2)

2014年(8)

2013年(3)

2012年(2)

2011年(18)

2010年(102)

2009年(137)

2008年(274)

2007年(134)

分类:

2009-08-20 17:53:34

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





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
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.

阅读(6631) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~