需求:
(1)公司业务要求VA01创建SO的时候,必须引用一个Quotation(VA21);
(2)限制引用为必要条件,如不引用请提示报错;
实现:
(1)找到User Exit,路径:SPRO->Sales and Distribution->System Modifications->User Exits
(2)找到User Exit ;
User exits in program FV45VFZZ
- USEREXIT_ADD_FIELD_TO_HEADER
- USEREXIT_ADD_FIELD_TO_LINE
(3)在行项目写上限制代码即可;
IF VBAP-VGBEL = '' and ( VBAK-AUART = 'FPOR' or VBAK-AUART = 'FPQT' ).
message E015(zsd) with VBAP-POSNR.
ENDIF.
近日发现以上需求,通过SD基本功能的不完整性检查,也可以实现,过程如下:
配置路径:Sales and Distribution -> Basic Function ->Log of Incomplete
(1)First,Define Incompleteness Procedures
创建一个新的procedure,把需要检查的字段放在里面,然后要选Status Group;
(2)Second,Assign Incompleteness Procedures
分配Incompleteness Procedures 到订单类型或其他;
Assign procedures to the sales document types
Assign procedures to the item categories
Assign procedures to the schedule line categories
Assign procedures to the partner functions
Assign procedures to sales activities
Assign forms to delivery types
Assign procedures to delivery item types