zoukankan      html  css  js  c++  java
  • ECN变更单建立——CCAP_ECN_CREATE

    代码:

    ************************************************************************
    * Program Name      :
    * Descriptions      :
    * T-Code            :
    * Updates Tables    :
    * Input  Parameters :
    * Output Parameters :
    * Return Codes      :
    * Special Logic     :
    * Includes          :
    ************************************************************************
    * Modification Log
    ************************************************************************
    *   Date   Ver. Programmer   Descriptions
    * -------- ---- ------------ -------------------------------------------
    * 2020 3.8   XXX Create
    *
    ************************************************************************
    REPORT ZMMRTEST.
    
    
    DATA: l_changeNo LIKE aenrb-aennr,
          ls_header LIKE aenr_api01,
          ls_object_mat LIKE aenv_api01,
          lt_item TYPE TABLE OF aeoi_api01 WITH HEADER LINE.
    
    "表头
    ls_header-change_no = 'ECN-20200309'.
    ls_header-status = '01'.
    ls_header-valid_from = sy-datum.
    ls_header-descript = 'BOM变更'.
    ls_header-reason_chg = 'BOM变更'.
    
    "物件类型
    ls_object_mat-active = 'X'.
    ls_object_mat-obj_requ = 'X'.
    ls_object_mat-mgtrec_gen = 'X'.
    ls_object_mat-gen_new = 'X'.
    
    "物件
    lt_item-material = 'T80232AG-01-AC'.
    lt_item-chg_objtyp = '4'.
    lt_item-plant = '2000'.
    APPEND lt_item. CLEAR lt_item.
    
    
    CALL FUNCTION 'CCAP_ECN_CREATE'
      EXPORTING
        CHANGE_HEADER        = ls_header
        OBJECT_MAT               = ls_object_mat
      IMPORTING
        CHANGE_NO               = l_changeNo
      TABLES
    *   ALT_DATES                  =
        OBJMGREC                  = lt_item
    *   EFFECTIVITY                  =
    *   TEXTHEADER                =
    *   TEXTLINES                    =
      EXCEPTIONS
        CHANGE_NO_ALREADY_EXISTS       = 1
        ERROR                          = 2
        OTHERS                         = 3.
    
    IF SY-SUBRC <> 0.
      WRITE: / 'ECN变更号建立失败'.
    ELSE.
      WRITE: / 'ECN变更号建立成功'.
    ENDIF.
    View Code

    说明:物件的参数CHG_OBJTYP(工程更改管理物件)的值来源表TCC01

    效果:

    木叶飞舞之处,火亦生生不息
  • 相关阅读:
    线程同步锁的使用方式
    EventBus简单封装
    Dagger2不自动生成daggerXXXcomponent
    android mvp模式
    第八天
    单词统计续
    学习进度第十一周
    第七天
    第六天
    第五天
  • 原文地址:https://www.cnblogs.com/StephenAmell/p/12447274.html
Copyright © 2011-2022 走看看