zoukankan      html  css  js  c++  java
  • sd如何控制定价条件根据用户不同而操作不同(有的可以输入有的不可以)

    Often there is a requirement for making a condition type (price, discount etc) non-modifiable for some-users and modifiable for others using the same SAP system or modifiable for certain document types (say OR ie Standard Sales Order) and non-modifiable in another order type (say CR ie Credit Memo Request). In standard SAP this is not possible. Using the controls for the condition-type (V/06 transaction) we can either make a condition type 

    1.       No Limitations

    2.       A : Free

    3.       B : Automatic Entry has Priority

    4.       C : Manual Entry has Priority

    5.       D : Not possible to process manually 

    Selecting any one of this option makes the condition type uniform across all document type and for users. Often the requirements are like for a group of users the condition type should behave like C option, for another group like D or for a specific document type it should be A and for others D. 

    One of the easiest way to achieve this is through the user-exit USEREXIT_PRICING_PREPARE_TKOMP in the include MV45AFZZ. 

    The following code will make the condition type PR00 modifiable for user ABAP1 and non-modifiable for all other users. 


    FORM USEREXIT_PRICING_PREPARE_TKOMP.
     
    DATA : i_T685A TYPE STANDARD TABLE OF T685A WITH HEADER LINE.
     
    IF SY-UNAME = 'ABAP1'.
    LOOP AT XKOMV.
    IF XKOMV-KSCHL = 'PR00'.
    SELECT * FROM T685A INTO TABLE I_T685A WHERE KSCHL = 'PR00'.
    READ TABLE I_T685A WITH KEY KSCHL = XKOMV-KSCHL.
    I_T685A-KMANU = 'C'.
    MODIFY I_T685A INDEX SY-TABIX.
    MODIFY T685A FROM TABLE I_T685A.
    REFRESH I_T685A.
    ENDIF.
     
    ENDLOOP.
     
    ELSE.
    LOOP AT XKOMV.
    IF XKOMV-KSCHL = 'PR00'.
    SELECT * FROM T685A INTO TABLE I_T685A WHERE KSCHL = 'PR00'.
    READ TABLE I_T685A WITH KEY KSCHL = XKOMV-KSCHL.
    I_T685A-KMANU = 'D'.
    MODIFY I_T685A INDEX SY-TABIX.
    MODIFY T685A FROM TABLE I_T685A.
    REFRESH I_T685A.
    ENDIF.
    ENDLOOP.
     
    ENDIF.
     
    ENDFORM.

     url:https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/7879
  • 相关阅读:
    SQL SERVER常用函数
    SQL SERVER系统表
    How do I implement a cancelable event?
    sql之left join、right join、inner join的区别
    inno setup脚本,涵盖了自定义安装界面,调用dll等等应用
    MS SQL SERVER 数据库日志压缩方法与代码
    SQLSERVER:计算数据库中各个表的数据量和每行记录所占用空间
    mysql记录执行的SQL语句
    powershell 激活WIN10
    jfinal undertow web.xml
  • 原文地址:https://www.cnblogs.com/xiaomaohai/p/6157104.html
Copyright © 2011-2022 走看看