• 创建采购订单批到程序用的BAPI


      CALL FUNCTION 'BAPI_PO_CREATE1'
        EXPORTING
          poheader                    = poheader
         poheaderx                    = poheaderx
    *      POADDRVENDOR                 =
          testrun                      = 'X'
    *      MEMORY_UNCOMPLETE            =
    *      MEMORY_COMPLETE              =
    *      POEXPIMPHEADER               =
    *      POEXPIMPHEADERX              =
    *      VERSIONS                     =
    *      NO_MESSAGING                 =
    *      NO_MESSAGE_REQ               =
    *      NO_AUTHORITY                 =
           no_price_from_po             = 'X'
       IMPORTING
         exppurchaseorder             = epo
    *      EXPHEADER                    =
    *      EXPPOEXPIMPHEADER            =
       TABLES
         return                       = return
         poitem                       = poitem[]
         poitemx                      = poitemx[]
    *      POADDRDELIVERY               =
         poschedule                   = poschedule[]
         poschedulex                  = poschedulex[]
         poaccount                    = poaccount[]"CRQ000000016532
    *      POACCOUNTPROFITSEGMENT       =
         poaccountx                   = poaccountx[]
    *      POCONDHEADER                 =
    *      POCONDHEADERX                =
          pocond                       = pocond[]
          pocondx                      = pocondx[].
    *      POLIMITS                     =
    *      POCONTRACTLIMITS             =
    *      POSERVICES                   =
    *      POSRVACCESSVALUES            =
    *      POSERVICESTEXT               =
    *      EXTENSIONIN                  =
    *      EXTENSIONOUT                 =
    *      POEXPIMPITEM                 =
    *      POEXPIMPITEMX                =
    *      POTEXTHEADER                 =
    *      POTEXTITEM                   =
    *      ALLVERSIONS                  =
    *      POPARTNER                    =
    *      POCOMPONENTS                 =
    *      POCOMPONENTSX                =
    *      POSHIPPING                   =
    *      POSHIPPINGX                  =
    *      POSHIPPINGEXP                =
    
    
    
      LOOP AT return INTO wa_return WHERE type EQ 'E' OR type EQ 'A'.
        lw_flag = 'X'.
        EXIT.
      ENDLOOP.
    
      IF lw_flag <> 'X'.
        CALL FUNCTION'BAPI_TRANSACTION_COMMIT'.
        gt_so-status = icon_green_light.
        gt_so-type = 'S'.
        gt_so-data_ck = '模拟导入成功'.
    
        MODIFY gt_so[] FROM gt_so TRANSPORTING status type data_ck
          WHERE sel = p_sel.
        gs_succ-poheader = lw_poheader.
        gs_succ-poheaderx = lw_poheaderx.
        gs_succ-poitem[] = gt_poitem[].
        gs_succ-poitemx[] = gt_poitemx[].
        gs_succ-poschedule[] = gt_poschedule[].
        gs_succ-poschedulex[] = gt_poschedulex[].
        gs_succ-pocond[] = gt_pocond[].
        gs_succ-pocondx[] = gt_pocondx[].
        gs_succ-poaccount[] = gt_poaccount[]."CRQ000000016532
        gs_succ-poaccountx[] = gt_poaccountx[].
        gs_succ-sel = p_sel.
        APPEND gs_succ TO gt_succ.
      ELSE.
        CALL FUNCTION'BAPI_TRANSACTION_ROLLBACK'.
  • 相关阅读:
    python 统计gitlab代码量
    whistle 模拟用户网络超时
    Node.js 快速转换 url 链接
    实用的 Git 命令
    前端常用 prettier 配置 + vetur 配置
    vue 项目 eslint + prettier 配置
    lodash 方法 debounce 防连点 防抖按钮点击
    npm 包实现自动登录 CICD 流程
    git push --follow-tags 命令
    小程序 iOS webview 中网页使用 iframe 无法滚动问题
  • 原文地址:https://www.cnblogs.com/caizjian/p/4285281.html
Copyright © 2020-2023  润新知