问个问题,
大家做RFC 接口,异步返回用什么方式?
我用过的:
(1)RFC里快速返回个 是否调用成功状态,
(2) 返回到http:
"设定传输请求内容格式以及编码格式
LO_HTTP_CLIENT->REQUEST->SET_CONTENT_TYPE( CONTENT_TYPE = 'application/json; charset=utf-8' ).
"设定调用服务
LO_HTTP_CLIENT->REQUEST->SET_METHOD( IF_HTTP_REQUEST=>CO_REQUEST_METHOD_POST ).
"设置待传输内容
LV_LEN = STRLEN( LV_JSON_STR ).
CALL METHOD LO_HTTP_CLIENT->REQUEST->SET_CDATA
EXPORTING
DATA = LV_JSON_STR
OFFSET = 0
LENGTH = LV_LEN.
"发送请求
LO_HTTP_CLIENT->SEND( EXCEPTIONS HTTP_COMMUNICATION_FAILURE = 1
HTTP_INVALID_STATE = 2 ).
(3) 返回到ftp 文件夹
Open dataset lv_file.
Transfre l_str to lv_file.
if sy-subrc eq 0.
endif.