采购订单me22n 或者me21n增强 (点击保存和回车)

IF_EX_ME_PROCESS_PO_CUST

 

 

DATA:l_header   TYPE mepoheader,
       l_item     TYPE mepoitem.

  DATA:lt_items TYPE purchase_order_items,
       lt_item_obj TYPE  purchase_order_item.

  DATA:l_werks  TYPE zmm_all-werks,
       l_gjahr  TYPE ekko-zzgjahr,
       l_monat  TYPE ekko-zzmonat,
       l_zwerks TYPE zmm_all-zwerks,
       l_ktokk  TYPE lfa1-ktokk,
       l_cfdat  TYPE zmm_all-cfdat,
       l_ebeln  TYPE ebeln.
  DATA:wa_all   TYPE zmm_all,
       wa_code  TYPE zmmt003,
       wa_ekko  TYPE ekko,
       wa_eket  TYPE eket.
  DATA:ls_meposchedule TYPE meposchedule.
  DATA:l_msg TYPE string.
  TYPES: BEGIN OF tyn_mtart,
          mtart TYPE mtart,
         END OF tyn_mtart.
  DATA: lt_mtart TYPE TABLE OF tyn_mtart.
  DATA: l_uname  LIKE sy-uname.

*---->>>> CR5817 add by lipeng 2012-03-06
  DATA: l_untto TYPE untto, "交货不足限度
        l_uebto TYPE uebto. "过量交货限度
*----<<<< end add

**PURCHASING HISTORY
  DATA: lt_ekbe TYPE me_ekbe.
  DATA: ls_ekbe LIKE LINE OF lt_ekbe.
**qinyun+ start 2011.10.25
*获取EKKO表中旬的数据
  DATA: BEGIN OF wa_ekko2,
          ebeln TYPE ekko-ebeln,
          zzgjahr TYPE ekko-zzgjahr,
          zzmonat TYPE ekko-zzmonat,
          zzxun   TYPE ekko-zzxun,
          zzhxdc  TYPE ekko-zzhxdc,
          zzcode  TYPE ekko-zzcode,
        END OF wa_ekko2 .
**qinyun+ end 2011.10.25

**取得抬头数据和行项目数据
  l_header = im_header->get_data( ).  “得到采购订单头信息
  lt_items = im_header->get_items( ) . ”和下面的loop方法一起才能得到物料等信息
*  LOOP AT items INTO item_obj .
*    l_item = item_obj-item->get_data(  ).
*  ENDLOOP.

******Begin of Beginof ADD CRQ000000011106 00186159 2014/2/26********************************
  LOOP AT lt_items INTO lt_item_obj.
    l_item = lt_item_obj-item->get_data(  ).
  ENDLOOP.

 

 

posted @ 2014-02-26 19:13  学习笔记NO.1  阅读(4225)  评论(0编辑  收藏  举报