首页 > 代码库 > ABAP WEBRFC
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
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。