ABAP保存文件到服务器
Posted ferzalez
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了ABAP保存文件到服务器相关的知识,希望对你有一定的参考价值。
现在AL11 设置路径变量 DIR_Z_IT_XML
1
CLEAR: LV_FILENAME. CALL FUNCTION ‘SD_DOCUMENT_FLOW_GET‘ EXPORTING IV_DOCNUM = LS_BIL_INVOICE-HD_REF-BIL_NUMBER IMPORTING ET_DOCFLOW = LT_DOCFLOW. CLEAR LS_DOCFLOW. LOOP AT LT_DOCFLOW INTO LS_DOCFLOW WHERE VBTYP_N = ‘+‘. EXIT. ENDLOOP. CONCATENATE LS_DOCFLOW-DOCNUM LS_BIL_INVOICE-HD_REF-BIL_NUMBER LS_BIL_INVOICE-HD_GEN-SOLD_TO_PARTY SY-DATUM SY-UZEIT INTO LV_FILENAME SEPARATED BY ‘_‘. DATA:GV_DIRNAME TYPE DIRNAME_AL11. CALL ‘C_SAPGPARAM‘ ID ‘NAME‘ FIELD ‘DIR_Z_IT_XML‘ ID ‘VALUE‘ FIELD GV_DIRNAME. CONCATENATE ‘\SAP-EU-DMS.sapdns.cnIT_TST_XML‘ LV_FILENAME INTO GV_DIRNAME SEPARATED BY ‘‘. CONCATENATE GV_DIRNAME ‘.PDF‘ INTO GV_DIRNAME. OPEN DATASET GV_DIRNAME FOR OUTPUT IN BINARY MODE. IF SY-SUBRC = 0. LOOP AT LT_LINES INTO LS_LINES. TRANSFER LS_LINES-TDFORMAT TO GV_DIRNAME . TRANSFER LS_LINES-TDLINE TO GV_DIRNAME . ENDLOOP. CLOSE DATASET LV_PATH. ENDIF.
以上是关于ABAP保存文件到服务器的主要内容,如果未能解决你的问题,请参考以下文章