zoukankan      html  css  js  c++  java
  • DATASET 文件的打开、读取、写入、关闭 TAB键分开

    DATSET 打开、写入文件数据,代码如下:

    DATA:

        CNS_TAB TYPE  CHAR1 VALUE CL_ABAP_CHAR_UTILITIES => HORIZONTAL_TAB.

    OPEN DATASET W_FILPATH FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.

    IF SY-SUBRC <> 0.

        MESSAGE E043(ZTHL1) WITH W_FILPATH.

    ENDIF.

    LOOP AT TD_ERRFILE INTO ST_ERRFILE.

        CONCATENATE ST_ERRFILE-MBLNR

                                     ST_ERRFILE-ZEILE

                          INTO  LW_OUTDATA

                          SEPARATED BY CNS_TAB.

        TRANSFER LW_OUTDATA TO W_FILPATH.

    ENDLOOP.

    CLOSE DATASET  W_FILPATH.

    读取.TXT文件内容到内表,TAB键分开。

    OPEN DATASET P_SVINFL FOR INPUT IN LEGACY TEXT MODE.

    READ DATASET P_SVINFL INTO LW_LINE.

    IF SY-SUBRC = 0.

        SPLIT LW_LINE AT CNS_TAB

          INTO TH_INPUT_MATL

                    TH_INPUT_PLANT.

          APPEND TH_INPUT TO TD_INPUT.

    ENDIF.

  • 相关阅读:
    Mac安装zookeeper
    征途
    vue-配置文件
    数组去重
    判断身份证
    判断邮箱
    判断手机号是否正确
    JS 时间格式转换
    打印 print-js
    自"愚"自乐的云服务器
  • 原文地址:https://www.cnblogs.com/mmm-iwtb/p/8969022.html
Copyright © 2011-2022 走看看