• 批量修改销售订单抬头文本


    *&---------------------------------------------------------------------*
    *& Report ZSO_TEXT
    *&
    *&---------------------------------------------------------------------*
    *&
    *&
    *&---------------------------------------------------------------------*

    REPORT ZSO_TEXT.


    INCLUDE ZFILE_XLS.

    DATA: SVBELN TYPE VBELN.
    LOOP AT ITXLS.

    MOVE ITXLS-COL1 TO SVBELN.
    PERFORM F_ADD_ZERO USING SVBELN.
    PERFORM SUB_CREATE_SO_HEADER_TEXT USING SVBELN.


    ENDLOOP.


    **&---------------------------------------------------------------------*
    **& Form SUB_CREATE_SO_HEADER_TEXT
    **&---------------------------------------------------------------------*
    ** 修改销售订单抬头文本:create_text,每次都是创建
    **----------------------------------------------------------------------*
    FORM SUB_CREATE_SO_HEADER_TEXT USING P_VBELN.
    DATA:
    GT_TEXT TYPE TABLE OF TLINE WITH HEADER LINE,
    G_FNAME TYPE THEAD-TDNAME,
    G_STATUS TYPE C.

    G_FNAME = P_VBELN.
    REFRESH GT_TEXT.
    GT_TEXT-TDLINE = '1001000101_OP016596-雷明志_1229.5_201407-000028'.
    APPEND GT_TEXT.
    CALL FUNCTION 'CREATE_TEXT'
    EXPORTING
    FID = '0001'
    FLANGUAGE = SY-LANGU
    FNAME = G_FNAME
    FOBJECT = 'VBBK'
    TABLES
    FLINES = GT_TEXT
    EXCEPTIONS
    NO_INIT = 1
    NO_SAVE = 2
    OTHERS = 3.

    DATA: WA_MSGMESSAGE(100).

    CASE SY-SUBRC.
    WHEN 0.
    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
    EXPORTING
    WAIT = 'X'.
    WHEN 1.
    CONCATENATE 'no_init' '请核查!' INTO WA_MSGMESSAGE.
    WHEN 2.
    CONCATENATE 'no_save' '请核查!' INTO WA_MSGMESSAGE.
    WHEN 4.
    CONCATENATE 'others_error' '请核查!' INTO WA_MSGMESSAGE.
    ENDCASE.

    WRITE /:WA_MSGMESSAGE.

    ENDFORM. " SUB_CREATE_SO_HEADER_TEXT

    INCLUDE ZRPT_FUN.

  • 相关阅读:
    C# 获取数组最小下标或最大下标
    使用EPplus 打开Excel报错
    EPplus的读写
    SQL Server 无法生成 FRunCM 线程
    WinForm无法加载'SQLite.Interop.dll'的问题
    雪花算法-唯一ID生成器
    .NET使用AutoResetEvent实现多线程打印奇偶数
    docker安装Elasticsearch+Kibana+密码配置+Kibana中文设置
    语义化版本 2.0.0
    Chrome 上所有受限端口的列表
  • 原文地址:https://www.cnblogs.com/twttafku/p/4029078.html
Copyright © 2020-2023  润新知