ABAP WEBRFC
Posted SAP-小伙儿
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了ABAP WEBRFC相关的知识,希望对你有一定的参考价值。
通过WEBRFC实现在网页下载SMW0上传的文件
FUNCTION zhr_download_test. *"---------------------------------------------------------------------- *"*"本地接口: *" TABLES *" QUERY_STRING STRUCTURE W3QUERY *" html STRUCTURE W3HTML *" MIME STRUCTURE W3MIME *" CHANGING *" VALUE(CONTENT_TYPE) LIKE W3PARAM-CONT_TYPE OPTIONAL *" VALUE(CONTENT_LENGTH) LIKE W3PARAM-CONT_LEN OPTIONAL *" VALUE(RETURN_CODE) LIKE W3PARAM-RET_CODE OPTIONAL *"---------------------------------------------------------------------- DATA: name TYPE string. SORT query_string DESCENDING. READ TABLE query_string WITH KEY name = ‘_Name‘. name = query_string-value. DATA: ls_wwwdata TYPE wwwdatatab. ls_wwwdata-relid = ‘MI‘. ls_wwwdata-objid = name. CALL FUNCTION ‘WWWDATA_IMPORT‘ EXPORTING key = ls_wwwdata TABLES * html = html mime = mime EXCEPTIONS OTHERS = 1. CLEAR content_type. content_type = ‘application/vnd.ms-excel‘. DATA: lt_wwwparams LIKE TABLE OF wwwparams, ls_wwwparams TYPE wwwparams. SELECT * FROM wwwparams INTO TABLE lt_wwwparams WHERE relid = ‘MI‘ AND objid = name. CLEAR ls_wwwparams. READ TABLE lt_wwwparams INTO ls_wwwparams WITH KEY name = ‘filesize‘. content_length = ls_wwwparams-value. ENDFUNCTION.
以上是关于ABAP WEBRFC的主要内容,如果未能解决你的问题,请参考以下文章
abap 销售订单修改增强 LV69AFZZ 怎么进行修改 添加代码的呢?
2020.05.07 ABAP随笔- ABAP-SM30删除前检查