zoukankan      html  css  js  c++  java
  • 创建采购订单批到程序用的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'.
  • 相关阅读:
    Cousera课程Learning How to Learn学习报告
    C语言中当无符号数遇到符号数
    STC15 串口(工作方式1)使用小结
    取C语言头文件的文件名
    linux 的 shell 逻辑
    Win7 局域网内简单共享的设置
    写了一个批处理,可以实现文件备份,自动对比删除冗余文件。
    C语言 函数指针的应用
    自动控制原理 典型环节频率特性对比
    51单片机汇编的溢出标志位OV和进位标志位CY
  • 原文地址:https://www.cnblogs.com/caizjian/p/4285281.html
Copyright © 2011-2022 走看看