业务背景:采购订单或STO中需要启用内向交货单收货。实战项目上针对于内向交货单有着不同的用法。
后台表:EKPO
表字段:EKPO-BSTAE
字段描述:确认控制(CCK)
用法1:由SAP跑MRP生成需求,然后从SAP推送到外围系统,协同到供应商,供应商准时化配送。这里的内向交货单就等于要货指令。
用法2:内向交货单由外围系统触发然后接口传入SAP自动生成,这种情况下的内向交货单就是SAP系统定义的标准功能,这里的内向交货单就等于供应商的送货通知单ASN。
我们看看采购订单中哪里可以看到确认控制CCK字段,
这个字段就是用于控制采购订单的收货方式:
1、当确认控制=空,仓库使用MIGO收货的时候,可以直接用采购订单或STO进行收货过账。
2、当确认控制=0004,仓库使用MIGO收货的时候,只能用内向交货单进行收货收货。
问题:那么采购订单或STO是如何进行确认控制自动确定的?手工输入只是一种方式,很多时候是直接通过前续单据带入的。
SAP Note: 2436023 - How is the confirmation control key determined in PO/STO?
SAP Note下载:Links
The full logic is:
所有确认控制CCK字段确定逻辑如下:
Regular PO items
普通的采购订单行项目
- If Goods Receipt is already posted for the PO item or if there are existing confirmation entries, determination is not executed.
- 如果采购采购采购订单已经收货了,确认控制字段已经确认的情况下,将不会被更新。
- If the PO item is copied from an existing PO, it takes the CCK from the reference item.
- 如果新采购订单从或老采购订单拷贝而来,那么确认控制CCK会从拷贝的老采购订单复制过来的。
- If the PO item is not a copy and is assigned a contract, it takes the CCK of the contract (even if CCK is blank).
- 如果采购订单行项目不是从别的采购订单拷贝的,而是参照采购合同进行创建的,那么字段 确认控制 将会从合同上带入,如果合同中的字段 确认控制 是空值,那么就带入 空值。
Exception: if the contract item category is "material group" or "material unknown", the CCK is taken only if it is not blank.
例外:如果采购合同的项目类别涉及到物料组或物料未知的情况下,如何采购合同CCK不空,才会带入到PO。 - If PO item does not have contract, it takes the CCK from the info record (even if CCK is blank).
- 如果采购订单没有参照合同进行创建,同时存在有效期内的采购订单信息记录被采用的情况下,CCK将会被直接被引用,如果采购信息记录中的CCK是空值,空值也会被直接引用。
- If PO item does not have contract and info record, it takes the CCK of the vendor master data (LFM1-BSTAE).
- 如果采购订单行项目没有参照采购信息记录或采购合同创建,那么CCK将会引用于供应商主数据采购视图。
Even when CCK from contract or info record is blank it does not take CCK from vendor. The modification note 909885 changes this logic for Info Record only: if PO has no Contract and a Info Record with blank CCK, then CCK from vendor is taken. - 即使当采购合同或采购信息记录上的CCK都是空值时,因为不会取供应商主数据上的CCK。修改版本的note 909885 变更了采购采购信息记录CCK逻辑:如何采购订单没有采购合同,但是有采购信息记录,然后采购信息记录中的CCK又是空值的时候,这种情况下,CCK将会取值于供应商主数据。
- If there is alternative vendor master data (e.g. plants-specific, or vendor subrange in table LFM2), then the CCK is taken from there.
- 如果存在LFM2,CCK将会取之LFM2值
- After checking Contract, Info Record and vendor master data, it is possible that CCK is still blank. In this scenario system tries to find a valid CCK from table T163LV.
- 在检查完 采购合同、采购信息记录、供应商主数据后,如果CCK都是空值时。这种情况下系统会尝试从后台配置对应的后台表T163LV中进行取值。
- If the PO item has a Storage Location, system tries to find a CCK from T163LV using Document Category, Document Type, Plant and Storage Location.
- 如果采购订单行项目有库存地点,系统会根据采购订单类型,工厂和库存地点从后台表T163LV取值CCK。
If it is not found, it searchs again for a CCK with Document Category, Document Type, Plant and empty Storage Location.
- If the PO item has no Storage Location, system tries to find a CCK from T163LV using Document Category, Document Type, Plant and a empty Storage Location.
- 如果采购订单行项目没有库存地点,系统会根据采购订单类型,工厂和空库存地点的配置点取值CCK。
- If no CCK can be determined using this logic, it remains blank in the PO item.
- 如果上面的逻辑都没有找到CCK,那么PO行项目CCK就只能为空了。
Returns PO items
- If Goods Receipt is already posted for the PO item or if there are existing confirmation entries, determination is not executed.
- The use of a CCK is generally not allowed in returns PO items. It is allowed only if Advanced Returns Management is used (business function OPS_ADVRETURNS_1 is activated).
If it is active and the Enhanced Store returns is also activated for the PO document type (T161-FLS_RSTO=X) and the PO has a supplying plant (EKKO-RESWK) or a vendor that is assigned to a plant (LFA1-WERKS is not blank), it is possible to use a CCK.
- If the PO item is copied from an existing PO for which the Enhanced Store returns is also active, it takes the CCK from the reference item.
- If no such PO is used, the system tries to find table T163LV for a CCK with the same logic as in case of non-returns items above.
In case of returns items, the contract, info record and vendor master are never checked.
- If no CCK is found based on T163LV, a manual entry is possible.
Remarks:
- If Advanced Returns Management is used and a replacement PO is created with transaction MSR_VRM_GR, the PO will always have the confirmation control key 0004. This is hardcoded in include LMSR_REP_DIALOG_GRP02.
-
For the document type in use, ensure that the "Stock transfer: Take vendor data into account" flag ("Trfr Vdr" field in the customizing screen) has been set in customizing. If a stock transport order or scheduling agreement is then created and a vendor is assigned to the supplying plant, the system adopts the data from the vendor master record.
Please follow this path to find the flag: transaction OLME > Purchase Order > Define Document Types > select the document type. - BAdI ME_PROCESS_PO_CUST can be use to introduce custom logic and derive from the standard one.
后台配置
SPRO路径:后勤执行->装运->交货->定义内向交货的订单确认
后台表:T163LV
Done.
Created on 18th November, 2024
标签:Control,vendor,item,MM,订单,CCK,采购,PO From: https://blog.csdn.net/weixin_36231828/article/details/143842226