Inspection Lot Origin (Types) for Various Material Movement Types

本文介绍了SAP系统中各种物料移动类型对应的检验批起源类型,涵盖了从收货到发货的不同场景,并解释了如何确定检验类型及处理多检验类型的情况。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

This Blog gives the various Inspection Types applicable for the different Material Movement Types broadly used in day to day transactions.

 

Types of Inspection

  • There are both Stock & Non-stock relevant Inspection types. Stock relevant Inspection has posting to be done along with the Usage Decision. Ex: Inspection Types – 01, 04, 05, 08. Whereas, for Non-stock relevant inspections, only usage decision is applicable. Ex: Inspection Types – 02, 06.

Multiple Inspection Types:

In case of multiple inspection types assigned to the Material from same Inspection Lot Origin, then the system chooses an active inspection type during inspection lot creation based on the following order:

 

  1. The inspection type is determined using a special rule. It can be determined, for example, for inspection lot origin 01 from the quality information record, or for inspection lot origin 03 from the order type.
  2. If there is no special rule and the indicator “Preferred inspection type” is set, the system chooses this preferred inspection type for the corresponding inspection lot origin.
  3. If the indicator “Preferred inspection type” is not set for any of the inspection types for the inspection lot origin, the system chooses the inspection type that was assigned to the inspection lot origin in Customizing as variant 01.

 

Movement TypeMovement Type TextMovement indicatorInspection Lot OriginInspection Lot Origin Text
101GR goods receiptGoods movement for purchase order01Goods Receipt
101GR goods receiptGoods movement for production order04Goods Receipt from Production
101GR goods receiptGoods movement for purchase order08Stock Transfer
103GR into blocked stckGoods movement for purchase order01Goods Receipt
105GR from blocked stckGoods movement for purchase order01Goods Receipt
123RE rtrn vendor rev.Goods movement for purchase order01Goods Receipt
123RE rtrn vendor rev.Goods movement for production order04Goods Receipt from Production
123RE rtrn vendor rev.Goods movement for purchase order08Stock Transfer
125GR rtn blkd stck revGoods movement for purchase order01Goods Receipt
131Goods ReceiptGoods movement for production order04Goods Receipt from Production
162GR rtrns reversalGoods movement for purchase order01Goods Receipt
162GR rtrns reversalGoods movement for purchase order04Goods Receipt from Production
201GI for cost centerGoods movement w/o reference02Goods Issue
202RE for cost centerGoods movement w/o reference05Other Goods Receipt
221GI for projectGoods movement w/o reference02Goods Issue
222RE for projectGoods movement w/o reference05Other Goods Receipt
231GI for sales orderGoods movement w/o reference02Goods Issue
232RE for sales orderGoods movement w/o reference05Other Goods Receipt
241GI for assetGoods movement w/o reference02Goods Issue
242RE for assetGoods movement w/o reference05Other Goods Receipt
251GI for salesGoods movement w/o reference02Goods Issue
252RE for salesGoods movement w/o reference05Other Goods Receipt
261GI for orderGoods movement w/o reference02Goods Issue
261GI for orderGoods movement for delivery note02Goods Issue
262RE for orderGoods movement w/o reference05Other Goods Receipt
262RE for orderGoods movement for delivery note05Other Goods Receipt
281GI for networkGoods movement w/o reference02Goods Issue
281GI for networkGoods movement for delivery note02Goods Issue
282RE for networkGoods movement w/o reference05Other Goods Receipt
282RE for networkGoods movement for delivery note05Other Goods Receipt
291GI all acc. assigmtsGoods movement w/o reference02Goods Issue
292RE all acct assigmtsGoods movement w/o reference05Other Goods Receipt
301TF trfr plnt to plntGoods movement w/o reference08Stock Transfer
302TR trfr plnt to plntGoods movement w/o reference08Stock Transfer
303TF rem.fm stor.to plGoods movement w/o reference02Goods Issue
303TF rem.fm stor.to plGoods movement for delivery note02Goods Issue
305TF pl.in stor.in pl.Goods movement w/o reference05Other Goods Receipt
305TF pl.in stor.in pl.Goods movement for delivery note05Other Goods Receipt
309TF tfr ps.mat.to matGoods movement w/o reference08Stock Transfer
310TR tfr ps.mat.to matGoods movement w/o reference08Stock Transfer
311TF trfr within plantGoods movement w/o reference08Stock Transfer
312TR transfer in plantGoods movement w/o reference08Stock Transfer
315TF pl.in str.in SLocGoods movement w/o reference08Stock Transfer
322TR quality to unr.Goods movement w/o reference08Stock Transfer
332RE to sampling QIGoods movement w/o reference05Other Goods Receipt
349TF blocked to QIGoods movement w/o reference08Stock Transfer
351TF to stck in trans.Goods movement w/o reference02Goods Issue
411TF SLoc to SLocGoods movement w/o reference08Stock Transfer
412TR SLoc to SLocGoods movement w/o reference08Stock Transfer
413TF SLoc to sls orderGoods movement w/o reference08Stock Transfer
414TR SLoc to sls orderGoods movement w/o reference08Stock Transfer
415TF SLoc to projectGoods movement w/o reference08Stock Transfer
416TR SLoc to proj.Goods movement w/o reference08Stock Transfer
451GI returnsGoods movement w/o reference06Return from Customers
452RE returns reversalGoods movement w/o reference02Goods Issue
453TP returns to ownGoods movement w/o reference05Other Goods Receipt
457TP Returns to own QIGoods movement w/o reference05Other Goods Receipt
501Receipt w/o POGoods movement w/o reference05Other Goods Receipt
503Receipt to QIGoods movement w/o reference05Other Goods Receipt
511Delivery W/o ChargeGoods movement w/o reference05Other Goods Receipt
521Receipt w/o orderGoods movement w/o reference05Other Goods Receipt
523Rcpt QI w/o prOrderGoods movement w/o reference05Other Goods Receipt
531Receipt by-productGoods movement w/o reference05Other Goods Receipt
552RE scrappingGoods movement w/o reference05Other Goods Receipt
554RE scrapping QIGoods movement w/o reference05Other Goods Receipt
561Initial stock entryGoods movement w/o reference05Other Goods Receipt
563Init. entrStBals: QIGoods movement w/o reference05Other Goods Receipt
571Receipt assemblyGoods movement w/o reference05Other Goods Receipt
573Rcpt QI assemblyGoods movement w/o reference05Other Goods Receipt
575Rcpt blckd assmblyGoods movement w/o reference05Other Goods Receipt
581Rcpt by-prod networkGoods movement w/o reference05Other Goods Receipt
601GD goods issue:delvyGoods movement for delivery note02Goods Issue
602RE goods deliv. rev.Goods movement for delivery note05Other Goods Receipt
603TF rem.fm stor.to plGoods movement for delivery note02Goods Issue
605 Goods movement for delivery note05Other Goods Receipt
641TF to stck in trans.Goods movement for delivery note02Goods Issue
643TF to cross companyGoods movement for delivery note02Goods Issue
645TF cross companyGoods movement for delivery note02Goods Issue
647TF to stck in trans.Goods movement for delivery note02Goods Issue
651GD ret.del.  returnsGoods movement for delivery note06Return from Customers
653GD returns unrestr.Goods movement for delivery note05Other Goods Receipt
655GD returns QIGoods movement for delivery note05Other Goods Receipt
661GI returns to vendorGoods movement for delivery note02Goods Issue
662RE ret. to vdr revrsGoods movement for delivery note05Other Goods Receipt
671TR to stck in trans.Goods movement for delivery note05Other Goods Receipt
672TF to stck in trans.Goods movement for delivery note02Goods Issue
703GR phys.inv: QIGoods movement w/o reference05Other Goods Receipt
871 Goods movement for purchase order01 Goods Receipt

文章来源:https://blogs.sap.com/2013/11/05/inspection-lot-origin-types-for-various-material-movement-types/

<think>我们正在寻找一个用于PyTorch模型维度检查的光标插件。根据用户的问题,他/她可能想要在编写PyTorch代码时,能够通过光标快速查看模型各层的维度信息,以便于调试和构建模型。 在PyTorch生态中,没有直接称为“光标插件”的工具,但我们可以理解为在代码编辑器中(如VS Code、PyCharm等)通过光标悬停或快捷键来显示模型维度的功能。这通常由编辑器插件或扩展提供。 常见的解决方案包括: 1. 使用支持PyTorch的Python IDE插件,如VS Code的Python插件,它可以通过类型提示和文档字符串显示信息,但对于模型维度的动态检查可能有限。 2. 使用专门的PyTorch工具,如torchsummary或torchinfo(torchsummary的升级版),它们可以打印模型结构,包括输入输出的维度。但是,这些是命令行工具,不是光标插件。 3. 使用支持张量形状注释的编辑器插件,例如VS Code的TensorFlow插件(对PyTorch支持有限)或利用Pylance(VS Code的Python语言服务器)的类型推断功能。 然而,目前并没有一个广泛使用的“光标插件”专门用于在编辑代码时实时显示PyTorch模型的维度。但是,我们可以通过以下方式近似实现: - **使用torchinfo库**:在代码中调用`torchinfo.summary(model, input_size)`来打印模型结构,包括每一层的输出形状。这虽然不是光标悬停,但可以在运行时快速查看。 - **使用IDE的调试功能**:在调试过程中,将光标放在变量上可以查看其类型和形状(对于张量)。 - **使用Jupyter Notebook**:在Notebook中,可以方便地在每个单元格后查看变量的形状。 如果用户希望在编写代码时(而不是运行时)就能看到维度信息,这需要静态分析,但由于PyTorch模型的动态特性,静态分析维度比较困难。 最近,PyTorch官方推出了一个工具叫**TorchDynamo**(属于PyTorch 2.0的一部分),它可以帮助捕获模型的计算图,但也不是用于编辑时光标提示。 因此,目前最接近的可能是使用**torchinfo**库,然后结合编辑器的代码片段功能,快速插入打印模型摘要的代码。 另一种思路:使用支持张量形状注释的Python类型检查工具,如**PyRight**(VS Code的Pylance使用的类型检查器)可以推断一些简单的形状,但复杂的模型可能无法推断。 考虑到这些,我们可以推荐用户使用torchinfo,并在需要时打印模型摘要。同时,可以关注一些编辑器插件,如VS Code的Python插件已经支持张量形状的调试时查看。 如果用户确实需要“光标插件”的功能,我们可以尝试以下方法: 在VS Code中,安装Python扩展和Pylance,然后利用类型提示。例如: ```python import torch from torch import nn class MyModel(nn.Module): def __init__(self): super().__init__() self.conv1 = nn.Conv2d(1, 6, 5) self.fc1 = nn.Linear(6*24*24, 10) def forward(self, x): x = self.conv1(x) # 将光标放在x上,在调试时可以看到形状,但编写时无法看到 return self.fc1(x.view(x.size(0), -1)) model = MyModel() # 在需要时打印模型摘要 from torchinfo import summary summary(model, input_size=(1, 1, 28, 28)) ``` 在编写代码时,我们无法通过光标直接看到每一层的输出形状,但是可以在编写完一部分后,运行`summary`函数来检查。 另外,有一个名为**Thinc**的库提供了一种形状推导的API,但它主要用于PyTorch吗?实际上,Thinc是一个面向NLP的轻量级深度学习库,它支持PyTorch和TensorFlow作为后端,但它本身并不提供光标插件。 因此,总结回答: 目前没有专门的“PyTorch cursor plugin for inspecting model dimensions”,但可以通过以下方式达到类似目的: 1. 使用torchinfo(原torchsummary)库在代码中打印模型摘要。 2. 在VS Code等编辑器中利用调试功能,在运行时查看变量(包括张量)的形状。 3. 在Jupyter Notebook中交互式地运行代码并查看。 另外,可以尝试在VS Code中安装扩展“Python Preview”,它可以在侧边栏实时显示代码中变量的值(包括形状),但需要运行代码。 如果用户希望有一个静态的(不运行代码)的维度提示,目前没有完美的解决方案,因为PyTorch的动态图特性使得静态推断形状非常困难。 因此,我们推荐用户使用torchinfo库,并配合调试器。 引用说明: [^1]: 在训练和评估模式切换的示例中,我们使用了`model.train()`和`model.eval()`,但并没有直接提供维度检查的方法。 [^2]: 引用2是关于加载权重错误的解决方案,与当前问题无关。 [^3]: 引用3是关于PyTorch 2.0的编译功能,与光标检查维度无关。 所以,我们主要基于一般知识回答。 相关问题: 1. 如何在PyTorch中打印模型的层次结构? 2. 有哪些工具可以帮助调试PyTorch模型的形状? 3. 在VS Code中如何调试PyTorch代码以查看张量形状?</think>### PyTorch模型维度检查的光标插件解决方案 在PyTorch开发中,实时查看模型各层的输入/输出维度是调试模型的关键需求。以下是推荐的解决方案和工具: #### 1. **TorchInfo(原torchsummary)** [推荐] 最常用的维度检查工具,可通过简洁代码输出完整维度信息: ```python from torchinfo import summary model = MyModel() summary(model, input_size=(16, 3, 224, 224)) # 输入尺寸 ``` 输出示例: ``` Layer (type) Output Shape Param # ================================================== Conv2d-1 [16, 64, 224, 224] 9,408 ReLU-2 [16, 64, 224, 224] 0 MaxPool2d-3 [16, 64, 112, 112] 0 ... ================================================== Total params: 11,689,512 ``` 优点:支持动态计算图,可显示参数量和FLOPs[^1]。 #### 2. **PyTorch内置钩子(Hooks)** 实时捕获中间层维度: ```python def print_shape(module, input, output): print(f"{module.__class__.__name__}: {output.shape}") for layer in model.children(): layer.register_forward_hook(print_shape) ``` #### 3. **IDE集成方案** - **VS Code Python插件**:调试时悬停变量可查看张量形状 - **PyCharm专业版**:TensorBoard插件支持实时维度可视化 - **Jupyter Notebook**:结合`IPython.display`显示动态维度 #### 4. **可视化工具** - **Netron**:模型结构可视化(支持`.pt/.onnx`文件) - **TensorBoard**:`add_graph()`显示计算图维度 ### 相关问题 1. 如何解决PyTorch模型维度不匹配的常见错误? 2. 有哪些方法可以可视化PyTorch模型的计算图? 3. 在部署PyTorch模型时如何验证维度兼容性? 4. 如何为自定义PyTorch层实现维度检查功能? > 注:目前没有专门的"光标插件"能直接在代码编辑器中悬停显示维度,但结合上述工具(尤其是TorchInfo)可高效实现维度检查。建议在模型关键层添加`print()`语句辅助调试[^1]。 [^1]: 引用PyTorch评估模式示例中的调试方法 [^2]: 引用模型权重加载问题的解决思路 [^3]: 引用PyTorch 2.0编译优化文档
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值