MD04 增加自定義列

dicksonjyl560101發表於2015-04-24

MD04 增加自定義列

一列   =   '生產工單/採購訂單'.

一列   =   '銷售訂單'.

 

CMOD增強

 

61X0002 User Exit PP-MRP 物料需求計劃估價

 

EXIT_SAPLM61R_001   ZXM61U03

EXIT_SAPMM61R_001   zxm61u04

 

zxm61u04 "定義列的名字

*&---------------------------------------------------------------------*

*&  包括                ZXM61U04

*&---------------------------------------------------------------------*

    button1_ez = '生產工單/採購訂單'.

     button2_ez = '銷售訂單'.

 

 

 

 

zxm61u03 "溯源生產工單/採購訂單和銷售訂單。

 

*&---------------------------------------------------------------------*

*&  INCLUDE           ZXM61U03

*&---------------------------------------------------------------------*

 

tables:kdst.

data: zpopr(17) type n.

data:vbeln like vbap-vbeln , posnr like vbap-posnr.

 

if not ibutt1 is initial or not ibutt2 is initial.

  vbeln = ''.

  posnr = ''.

 

 

  if imdezexit-delkz = 'AR'.

    write ie3mdpslx-del12 to emdezx_usex1 no-zero .

    condense emdezx_usex1.

 

 

    select single kdauf kdpos

      into  (vbeln , posnr)

      from  afpo

      where aufnr = ie3mdpslx-del12 .

 

 

 

    if vbeln is not initial.

 

      concatenate vbeln '/' posnr into emdezx_usex2  .

      else.

      emdezx_usex2 = ''.

    endif.

    condense emdezx_usex2.

 

  endif.

 

  if imdezexit-delkz = 'BB'.

    concatenate  ie3mdpslx-aufvr '-'   ie3mdpslx-posvr+3(3) into zpopr.

    write  zpopr to emdezx_usex1 no-zero .

 

 

    select single vbeln vbelp

   into  (vbeln , posnr)

   from  ekkn

   where ebeln = ie3mdpslx-aufvr and ebelp = ie3mdpslx-posvr.

 

    if vbeln is not initial.

      concatenate vbeln '/' posnr into emdezx_usex2  .

    else.

      emdezx_usex2 = ''.

    endif.

    condense emdezx_usex2.

  endif.

endif.

 

 

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/29829936/viewspace-1595653/,如需轉載,請註明出處,否則將追究法律責任。

相關文章