在SAP Cloud Platform ABAP编程环境里调用第三方API的ABAP示例代码

METHOD if_oo_adt_classrun~main.
TRY.
DATA(1o_destination) = cl_http_destination_provider=>create_by_cloud_destination(
4
i_name
='z_STREETMAP_XXX"
5
i_service_instance_name = "OutboundComm_for_RFCDemo_xoXoX
6
i_authn_mode = if_a4c_cp_service=>service_specific ).
8
DATA(lo_http_client) = cl_web_http_client_manager=>create_by_http_destination( i_destination = lo_destin
g
DATA(lo_request) = lo_http_client->get_http_request( ).
10
111213
DATA(1o_response) = lo_http_client->execute( i_method = if_web_http_client=>get ).
14
out->write( lo_response->get_text() ).
15
16
CATCH cx _root INTO DATA(lx_exception).
17
out->write( lx_exception->get_text( ) ).
18
ENDTRY.
19
ENDMETHOD.
20
21`要获取更多Jerry的原创文章,请关注公众号"汪王子熙"":
1img src="https:/user-images.githubusercontent.com/5669954/61616089-2a87e189-ac9a-11e9-861d-c29c2cf897af.ng")
上一篇:Slice如何从网络消费数据中获得商机


下一篇:【自然框架】之鼠标点功能现(一):单表的增删改查(即上次5月23日活动的一个主题)【Demo、源码下载】