SAP系统中入库后还能修改订单价格吗
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了SAP系统中入库后还能修改订单价格吗相关的知识,希望对你有一定的参考价值。
现在的情况是订单已入库,但是发现价格有误,能在不退库的情况下直接改变订单价格吗?
无论是销售订单还是采购订单,发货或收货后都不能更改价格,只有冲销后再进行更改。 参考技术A 如果已经入库, 发现价格有误, 原订单是不可以更改价格的, 但可以在开立发票的时候, 按新价格开立. 参考技术B 逐渐熟悉SAP系统前台的操作,然后在工作的时候尽快进入项目,熟悉更加全面的入库时,物料的价格应该是相应订单的价格。这个未来价格对入库会有影响?是不如何根据用户权限屏蔽或显示SAP的订单中的成本显示
程序目的说明:1、 SAP标准程序不能在销售订单(va01 va02 va03)中根据权限显示或不显示有些订单定价过程的敏感数据。
2、 由于公司需要对销售订单定价过程的敏感数据(如成本数据)进行控制,因此需要增强系统功能,使系统能根据用户权限和定价敏感数据的设置来决定显示或不显示定价过程中的订单定价过程的敏感数据。
3、 修改了LV69AFZZ的userexit_field_modific_leer
userexit_field_modific_kzwi
userexit_field_modific_kopf
userexit_field_modification
四个用户出口。
程序代码:
源程序:红色为新增代码
*----------------------------------------------------------------------*
***INCLUDE LV69AFZZ .
*----------------------------------------------------------------------*
* INSERT DEVK901084 1
data: OLD_KOMV like komv.
data: OLD_KOMk like komk.
data: z_auth_subrc like sy-subrc.
DATA : i_zauthprice TYPE STANDARD TABLE OF zauthprice
WITH HEADER LINE.
data: Z_S(60) type c,
z_s1(10) type c.
* INSERT
*&---------------------------------------------------------------------*
*& Form USEREXIT_FIELD_MODIFIC_LEER
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* --> p1 text
* <-- p2 text
*----------------------------------------------------------------------*
form userexit_field_modific_leer.
* INSERT DEVK901084 1
z_auth_subrc = 4.
IF screen-name = \'FCODE\'.
CLEAR old_komk.
ENDIF.
AUTHORITY-CHECK OBJECT \'K_ZKALSM\'
ID \'KALSM\' FIELD komk-kalsm
ID \'ACTVT\' DUMMY.
z_auth_subrc = sy-subrc.
if sy-TCODE =\'VA03\'.
z_auth_subrc = 4.
endif.
old_komk = komk.
old_komv = komv.
REFRESH i_zauthprice.
CLEAR i_zauthprice.
SELECT * FROM zauthprice
INTO CORRESPONDING FIELDS OF TABLE i_zauthprice
WHERE zauthprice~kalsm = komk-kalsm.
IF z_auth_subrc NE 0.
READ TABLE i_zauthprice WITH KEY stunr = komv-stunr BINARY SEARCH.
IF sy-subrc = 0.
IF ( screen-name = \'RV61A-SELKZ\'
OR screen-name = \'KOMV-KAWRT\'
OR screen-name = \'RV61A-AWEIN\'
OR screen-name = \'KOMV-KBETR\'
OR screen-name = \'RV61A-KOEIN\'
OR screen-name = \'KOMV-KPEIN\'
OR screen-name = \'KOMV-KMEIN\'
OR screen-name = \'KOMV-KWERT\' ).
screen-active = 0.
ENDIF.
ENDIF.
ENDIF.
move z_auth_subrc to Z_S1.
CONCATENATE \'userexit_field_modific_leer Control:\' z_s1 into Z_S.
MESSAGE Z_S TYPE \'W\'.
MODIFY SCREEN.
* INSERT
endform. " USEREXIT_FIELD_MODIFIC_LEER
*&---------------------------------------------------------------------*
*& Form USEREXIT_FIELD_MODIFIC_KZWI
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* --> p1 text
* <-- p2 text
*----------------------------------------------------------------------*
form userexit_field_modific_kzwi.
* INSERT DEVK901084 1
z_auth_subrc = 4.
IF screen-name = \'FCODE\'.
CLEAR old_komk.
ENDIF.
AUTHORITY-CHECK OBJECT \'K_ZKALSM\'
ID \'KALSM\' FIELD komk-kalsm
ID \'ACTVT\' DUMMY.
z_auth_subrc = sy-subrc.
if sy-TCODE =\'VA03\'.
z_auth_subrc = 4.
endif.
old_komk = komk.
old_komv = komv.
REFRESH i_zauthprice.
CLEAR i_zauthprice.
SELECT * FROM zauthprice
INTO CORRESPONDING FIELDS OF TABLE i_zauthprice
WHERE zauthprice~kalsm = komk-kalsm.
IF z_auth_subrc NE 0.
READ TABLE i_zauthprice WITH KEY stunr = komv-stunr BINARY SEARCH.
IF sy-subrc = 0.
IF ( screen-name = \'RV61A-SELKZ\'
OR screen-name = \'KOMV-KAWRT\'
OR screen-name = \'RV61A-AWEIN\'
OR screen-name = \'KOMV-KBETR\'
OR screen-name = \'RV61A-KOEIN\'
OR screen-name = \'KOMV-KPEIN\'
OR screen-name = \'KOMV-KMEIN\'
OR screen-name = \'KOMV-KWERT\' ).
screen-active = 0.
ENDIF.
ENDIF.
ENDIF.
move z_auth_subrc to Z_S1.
CONCATENATE \'userexit_field_modific_kzwi Control:\' z_s1 into Z_S.
MESSAGE Z_S TYPE \'W\'.
MODIFY SCREEN.
* INSERT
endform. " USEREXIT_FIELD_MODIFIC_KZWI
*&---------------------------------------------------------------------*
*& Form USEREXIT_FIELD_MODIFIC_KOPF
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* --> p1 text
* <-- p2 text
*----------------------------------------------------------------------*
form userexit_field_modific_kopf.
* INSERT DEVK901084 1
z_auth_subrc = 4.
IF screen-name = \'FCODE\'.
CLEAR old_komk.
ENDIF.
AUTHORITY-CHECK OBJECT \'K_ZKALSM\'
ID \'KALSM\' FIELD komk-kalsm
ID \'ACTVT\' DUMMY.
z_auth_subrc = sy-subrc.
if sy-TCODE =\'VA03\'.
z_auth_subrc = 4.
endif.
old_komk = komk.
old_komv = komv.
REFRESH i_zauthprice.
CLEAR i_zauthprice.
SELECT * FROM zauthprice
INTO CORRESPONDING FIELDS OF TABLE i_zauthprice
WHERE zauthprice~kalsm = komk-kalsm.
IF z_auth_subrc NE 0.
READ TABLE i_zauthprice WITH KEY stunr = komv-stunr BINARY SEARCH.
IF sy-subrc = 0.
IF ( screen-name = \'RV61A-SELKZ\'
OR screen-name = \'KOMV-KAWRT\'
OR screen-name = \'RV61A-AWEIN\'
OR screen-name = \'KOMV-KBETR\'
OR screen-name = \'RV61A-KOEIN\'
OR screen-name = \'KOMV-KPEIN\'
OR screen-name = \'KOMV-KMEIN\'
OR screen-name = \'KOMV-KWERT\' ).
screen-active = 0.
ENDIF.
ENDIF.
ENDIF.
move z_auth_subrc to Z_S1.
CONCATENATE \'userexit_field_modific_kopf Control:\' z_s1 into Z_S.
MESSAGE Z_S TYPE \'W\'.
MODIFY SCREEN.
* INSERT
endform. " USEREXIT_FIELD_MODIFIC_KOPF
*&---------------------------------------------------------------------*
*& Form USEREXIT_FIELD_MODIFICATION
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* --> p1 text
* <-- p2 text
*----------------------------------------------------------------------*
form userexit_field_modification.
* INSERT DEVK901084 1
z_auth_subrc = 4.
IF screen-name = \'FCODE\'.
CLEAR old_komk.
ENDIF.
AUTHORITY-CHECK OBJECT \'K_ZKALSM\'
ID \'KALSM\' FIELD komk-kalsm
ID \'ACTVT\' DUMMY.
z_auth_subrc = sy-subrc.
if sy-TCODE =\'VA03\'.
z_auth_subrc = 4.
endif.
old_komk = komk.
old_komv = komv.
REFRESH i_zauthprice.
CLEAR i_zauthprice.
SELECT * FROM zauthprice
INTO CORRESPONDING FIELDS OF TABLE i_zauthprice
WHERE zauthprice~kalsm = komk-kalsm.
IF z_auth_subrc NE 0.
READ TABLE i_zauthprice WITH KEY stunr = komv-stunr BINARY SEARCH.
IF sy-subrc = 0.
IF ( screen-name = \'RV61A-SELKZ\'
OR screen-name = \'KOMV-KAWRT\'
OR screen-name = \'RV61A-AWEIN\'
OR screen-name = \'KOMV-KBETR\'
OR screen-name = \'RV61A-KOEIN\'
OR screen-name = \'KOMV-KPEIN\'
OR screen-name = \'KOMV-KMEIN\'
OR screen-name = \'KOMV-KWERT\' ).
screen-active = 0.
ENDIF.
ENDIF.
ENDIF.
move z_auth_subrc to Z_S1.
CONCATENATE \'userexit_field_modification Control:\' z_s1 into Z_S.
MESSAGE Z_S TYPE \'W\'.
MODIFY SCREEN.
* INSERT
endform. " USEREXIT_FIELD_MODIFICATION
*&---------------------------------------------------------------------*
*& Form USEREXIT_PRICING_CHECK
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* --> p1 text
* <-- p2 text
*----------------------------------------------------------------------*
form userexit_pricing_check.
* INSERT DEVK901084 1
include zsde0002.
* INSERT
endform. " USEREXIT_PRICING_CHECK
*&---------------------------------------------------------------------*
*& Form USEREXIT_CHANGE_PRICING_RULE
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* -->P_RV61A_KSTEU text
*----------------------------------------------------------------------*
form userexit_change_pricing_rule using p_rv61a_ksteu.
endform. " USEREXIT_CHANGE_PRICING_RULE 参考技术A http://blog.csdn.net/sap_jack/article/details/1066287
以上是关于SAP系统中入库后还能修改订单价格吗的主要内容,如果未能解决你的问题,请参考以下文章