Enterprise Resource Planning Blogs by Members
Gain new perspectives and knowledge about enterprise resource planning in blog posts from community members. Share your own comments and ERP insights today!
cancel
Showing results for 
Search instead for 
Did you mean: 
tizo_lee
Explorer
0 Kudos
1,018

本文主要介绍SAP ATP可用性检查的重要函数、表、结构、用户出口及调试步骤。

 

1、函数: AVAILABILITY_CHECK_CONTROLLER

 

当系统调用或运行ATP时,此函数将被调用。我们可以在SE37中打开此函数,然后创建一个调试断点,系统运行ATP时将会跳转到此断点:


这里P_ATPCX是ATP检查中一个重要的内表,

 

 

其中主要几个字段如下:



MATNR 物料编号  
WERKS 工厂  
BERID MRP区域  
LGORT 库存地点  
CHARGE 批次  
PRREG 检查规则  
DELKZ MRP元素 VC = sales order, VJ = delivery, U1 = STO,
BDART 需求类型 BDART and PLART together form the requirements class
PLART 计划类型
SOBKZ 特殊库存标识 This indicator determines which kind of special stock you are using.
BDTER 需求日期 the requirement date is the material availability date that has been determined during the scheduling
BDMNG 需求数量  
CHKFLG 检查记录 for these records the ATP check will carried out
CORFLG 修正记录 these records are considered as correction records during the ATP check e.g. when the confirmed quantity of a preceding document has to be released

 

这些字段可以知道哪些数量将在哪些日期、工厂、存储位置、批次和使用的检查规则进行检查。使用这些信息,您已经可以检查事务Co09中的可用性情况。

 

注意:如果系统激活了自动批次确定时,函数模块AVAILABILITY_CHECK_CONTROLLER将被调用三次。首先只是对材料、厂房和储存地点进行定义。然后进行批次判定,在P_ATPCSX中,你会发现所有选定批次的最大所需数量为9999999.999。ATP检查的结果将交还给批次确定,并进行第二次选择。第三个调用随后与最终选择的批次和实际请求的数量一起发生。

 

2、ATP增强出口:EXIT_SAPLATPC_001,即SMOD:ATP00001


当调试运行到达调用函数AVAILABILITY_CHECK(在S/4HANA版本中为AVAILABILITY_CHECK_S4)时,就会得到ATP检查的结果。可以在表P_MDVEX中找到结果。

 

相关字段如下:



DAT00 required date = BDTER in P_ATPCSX
MNG01 required quantity = BDMNG in P_ATPCSX
DAT01 confirmed date
MNG02 confirmed quantity

 

3、相关的重要函数:STOCK_RECEIPT_ISSUE_READ




函数中的内表:

G_ATPKXS 库存
G_ATPKXR 收货数据
G_ATPKXI 发货数据
G_T441V

检查组(field: MTVFP)

检查规则(field: PRREG)

 

4、ATP检查增强的一个应用案例:

 

客户有一个材料A,然后有一个后继材料B,也就是材料A用完之后再用材料B。现在如果需求是100,材料A库存30,那么当创建生产订单,进行可用性检查时,系统标准的是用30个材料A和70个材料B。但客户需求,A、B材料不可以用在同一个生产订单上。解决方案:ATP增强ATP00001中修改内表的P_ATPCX数据,将材料A的需求改为0,订单组件就只有材料B了。

 

以上就是SAP ATP可用性检查的重要函数、表、结构、用户出口及调试步骤。

 

欢迎大家反馈交流,也可关注本人公众号:leetzh进行交流

Labels in this area