本文主要是介绍ABAP 设置开票后不允许修改采购订单价格,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
ABAP 设置开票后不允许修改采购订单价格
增强:MM06E005
EXIT_SAPMM06E_012
INCLUDE ZXM06U43 .
&---------------------------------------------------------------------
*& 包含 ZXM06U43
&---------------------------------------------------------------------
***设置开票后不允许修改采购订单价格-公司间PO
DATA:BEGIN OF lt_ekbe OCCURS 0,
ebeln LIKE ekbe-ebeln,
ebelp LIKE ekbe-ebelp,
gjahr LIKE ekbe-gjahr,
belnr LIKE ekbe-belnr,
buzei LIKE ekbe-buzei,
bewtp LIKE ekbe-bewtp,
bwart LIKE ekbe-bwart,
shkzg LIKE ekbe-shkzg,
bamng LIKE ekbe-bamng,
END OF lt_ekbe.
IF sy-tcode = 'ME22N'OR sy-tcode = 'ME23N'OR sy-tcode = 'ME29N'OR sy-tcode = 'ME21N' .IF i_ekko-bsart = 'Z005'OR i_ekko-bsart = 'Z009'OR i_ekko-bsart = 'Z010'.LOOP AT tekpo.REFRESH lt_ekbe.SELECTekbe~ebelnekbe~ebelpekbe~gjahrekbe~belnrekbe~buzeiekbe~bwartINTO CORRESPONDING FIELDS OF TABLE lt_ekbeFROM ekbeJOIN rbkp ON ekbe~belnr EQ rbkp~belnrAND ekbe~gjahr EQ rbkp~gjahrWHERE ekbe~ebeln EQ tekpo-ebelnAND ekbe~ebelp EQ tekpo-ebelpAND ekbe~bewtp EQ 'Q'AND rbkp~stblg EQ ''AND rbkp~rbstat <> '2'.IF lt_ekbe[] IS NOT INITIAL.SELECT kposn, "项目kschl, "条件类型kbetr "价格INTO TABLE @DATA(lt_price)FROM prcd_elementsWHERE knumv = @i_ekko-knumvAND kposn = @tekpo-ebelpAND kinak = ''AND kschl = 'P101'.READ TABLE lt_price INTO DATA(lv_price1) WITH KEY kposn = tekpo-ebelpkschl = 'P101'.IF sy-subrc = 0.READ TABLE tkomv INTO DATA(ls_komv1) WITH KEY kschl = 'P101'knumv = i_ekko-knumvkposn = tekpo-ebelp.IF sy-subrc = 0.IF lv_price1-kbetr <> ls_komv1-kbetr.MESSAGE e899(mm) WITH tekpo-ebeln tekpo-ebelp '由于已经开票,不允许修改价格。'.ENDIF.ENDIF.ENDIF.ENDIF.ENDLOOP.ENDIF.
ENDIF.
***设置开票后不允许修改采购订单价格-公司间PO
这篇关于ABAP 设置开票后不允许修改采购订单价格的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!