目录
业务说明
BAPI_BATCH_CREATE 创建批次主数据后,使用事务码MSC2N查看批次时,发现分类页签并没有创建分类视图数据。
报错截图
分类页签没有创建分类视图数据
Before
After
问题回顾
131 SAP报错:MIGO界面批次页签下的分类图标不能正常显示(事务码OMCV-激活 IM 中货物移动的批分类)_sapmigo 分类 按钮打不开-优快云博客
报错分析
BAPI入参字段 ls_batchcontrolfields-doclassify = ' '. "直接给BAPI入参赋值-分类对象
报错根本原因:没有赋值导致报错
BAPI入参字段 ls_batchcontrolfields-doclassify = 'X'. "直接给BAPI入参赋值-分类对象
需要给这个字段赋值'X' 即可
解决方案
Before
After
再次尝试
BAPI执行-SE38
1处,点击 程序执行按钮
批次主数据创建成功!批次号2501180007
批次主数据创建成功!物料号6630000045
批次主数据创建成功!工厂号1087
批次主数据创建成功!库位号1001
前台MSC2N查看
事务码MSC2N进入
SAP Note 3457131
3457131 - Batch is not classified when created by BAPI_BATCH_CREATE
Symptom
When a batch is created using BAPI_BATCH_CREATE, it is not classified automatically. Consequently, field CUOBJ_BM of tables MCHA/MCH1 is not maintained.
Reproducing the Issue
1. Maintain a class type 022 or 023 in transaction MM02.
2. Use BAPI_BATCH_CREATE to create a batch.
3. Check the batch classification in transaction MSC3N.
Batch is not classified.
Cause
Parameter BATCHCONTROLFIELDS-DOCLASSIFY is not maintained.
Resolution
When calling BAPI_BATCH_CREATE, the parameter BATCHCONTROLFIELDS-DOCLASSIFY must be maintained to classify batches.
After maintaining the parameter, the batch is successfully classified.
Keywords
doclassify, create batch, classification, cuobj_bm, batch not classified, BAPI_BATCH_CREATE, mcha, mch1
问题已解决!
Done.
Created on 19th January, 2025