Chinaunix首页 | 论坛 | 博客
  • 博客访问: 468171
  • 博文数量: 199
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 1902
  • 用 户 组: 普通用户
  • 注册时间: 2020-05-14 13:25
个人简介

代码5S

文章分类

全部博文(199)

文章存档

2021年(5)

2020年(194)

我的朋友

分类: 其他平台

2020-09-21 16:37:45

REPORT zdemo14.

TYPESBEGIN OF text ,
        line(256),
       END OF text .


DATAgt_response TYPE TABLE OF text WITH HEADER LINE .
DATAgt_response_header TYPE TABLE OF text WITH HEADER LINE .
DATAg_status(3)       TYPE ,
       g_statustext(128TYPE ,
       g_length          TYPE .

PARAMETERSp_url(100TYPE LOWER CASE DEFAULT 'http://blog.chinaunix.net/uid-69974615-id-5838870.html'.
PARAMETERSp_dest     LIKE rfcdes-rfcdest DEFAULT 'SAPHTTP'.

CALL FUNCTION 'HTTP_GET'
  EXPORTING
    absolute_uri                p_url
    rfc_destination             p_dest
    blankstocrlf                'Y'
  IMPORTING
    status_code                 g_status
    status_text                 g_statustext
    response_entity_body_length g_length
  TABLES
    response_entity_body        gt_response
    response_headers            gt_response_header
  EXCEPTIONS
    connect_failed              1
    timeout                     2
    internal_error              3
    tcpip_error                 4
    data_error                  5
    system_failure              6
    communication_failure       7
    OTHERS                      8.
IF sy-subrc <> 0.
ENDIF.
阅读(7511) | 评论(0) | 转发(1) |
给主人留下些什么吧!~~