S/4系统中对某些表如(MARC、MBEW、COBL)进行增强的时候,需要同时更新CDSVIEW的DDL,否则就会报如下的错误导致标准表无法激活。

SAP在NOTE 2242679 - Redirect inconsistency - Proxy Substitution 中介绍了原因和各个版本的变化,把NOTE原文放到最下面作参考:

https://sapyard.com/how-to-append-standard-tables-having-replacement-objects-in-s-4hana/ 这篇文章有介绍详细的操作步骤

大概总结一下:

1.首先按照传统的方法去APPEND STRUCTRUE,激活, 这个时候会有报错,不用管

2.新建一个EXTEND VIEW,代码如下: 示例中MARC APPEND的 structrue:zzapend01 包含字段zzflag

@AbapCatalog.sqlViewAppendName: 'ZZAPPEND01_V'
@EndUserText.label: 'Extension view for Append ZZAPPEND01'
extend view nsdm_e_marc with Zzappend01_E {t.zzflag
}

激活,如果没有报错的话应该问题不大

3.检查一下NSDM_V_MARC,增强字段是否已经插入了。

4.重新激活MARC

注意:涉及到表的调整,操作请一定按照步骤来,如果需要做删除的操作,应该先删除DDL,再删除APPEND STRUCTRUE,如果有遇到无法激活或者未知的报错,

可以用SE14对表进行调整或者重构。以下是SAP提供NOTE的内容。

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Symptom

After migration to S/4HANA OP1511 you get the runtime error DBSQL_REDIRECT_INCONSISTENCY  'A table could not be redirected' while accessing table MARC, MBEW, EBEW, OBEW, QBEW, MKPF or MSEG in ABAP.

This error message may also be thrown for the tables MARD, MCHB, MSSQ, MSSL, MSSA, MSPR, MSLB, MSKU, MSKA or MKOL after migration to S/4HANA OP1610 or higher.

The error analysis describes that a setting in the dictionary stipulates that proxy data object "<AbapCatalogViewName>" is used to execute table "<table>" at runtime. The definition of "<table>" and "<AbapCatalogViewName>" are not consistent however, meaning that the operation had to be terminated.

If you check the table in the dictionary via SE11 you get an error message like:

  • DT 342 MSEG and proxy object NSDM_V_MSEG have different numbers of columns
  • DT 338 Column ZZFIELD exists in MSEG but not in NSDM_V_MSEG or has a different position there

Other Terms

MKPF, MSEG, MARC, MBEW, EBEW, OBEW, QBEW, MARD, MCHB, MSSQ, MSSL, MSSA, MSPR, MSLB, MSKU, MSKA, MKOL, CDS proxy view; Append, $EXTENSION, EXTEND VIEW, DT342, DT338

Reason and Prerequisites

Background information:

The MM-IM data model in S/4HANA has been changed compared to ERP/SoH. Actual stock data will not be stored anymore in the former key figure material master data tables and the material document will not be stored anymore in the tables MKPF (header data) and MSEG (item data). Instead the single table MATDOC has been introduced which stores the material document and from which the actual stock data will be calculated on-the-fly because each material document is a change of stock. More details are described in note 2206980.

To ensure compatibility for customer coding there are proxy objects assigned to the former document tables and the material master key figure tables (use SE11 -> Extras -> Proxy object). These proxy objects are CDS views which read the data from table MATDOC instead from the "old" tables. The assignment requires that the proxy view is identical to the table regarding fields and the sequence of fields.

Issues may occur if the tables have been enhanced by APPENDs because in this case the structure compatibility between table and assigned proxy obejct is broken.

For S/4HANA OP1511 all support and feature packages:

For most of the tables the structural compatibility is still ensured because the delivered proxy CDS view uses the $EXTENSION keyword at the end which adds fields from APPENDs at the end of a table also at the end of the proxy CDS view. This is the case for the proxy CDS views for the tables MARD, MCHB, MSSQ, MSSL, MSSA, MSPR, MSLB, MSKU, MSKA or MKOL.

Affected are customer appends on tables MARC, MBEW, EBEW, OBEW, QBEW, MKPF or MSEG or implementation of include structure CI_COBL in MSEG because for those tables the $EXTENSION mechanism does not work in any case due to:

  • MARC and xBEW are build of a structure which itself is build by structures and fields. If the APPEND is done in one of those sub-structures then the consequence is that the fields from the APPEND is somewhere in between in the table and hence appending fields at the end of the assigned proxy view will lead to a structure mismatch.

  • MSEG contains the custumer include CI_COBL somewhere in the middle of the table definition. Hence by implementing CI_COBL the fields are also somehwere in the middle of the table and hence appending fields at the end of the assigned proxy view will lead to a structure mismatch.

For S/4HANA OP1610 and higher:

For S/4HANA OP1610 the $EXTENSION keyword has been removed from the proxy CDS views of tables MARD, MCHB, MSSQ, MSSL, MSSA, MSPR, MSLB, MSKU, MSKA or MKOL. This has been done due to too many side effects like unpredictable sequence of fields from APPENDs.

Hence, additionally to the OP1511 case, customer appends on tables MARD, MCHB, MSSQ, MSSL, MSSA, MSPR, MSLB, MSKU, MSKA or MKOL are affected.

Solution

Follow the instructions given in the next blocks and import the program NSDM_PROXY_SUBSTITUTION via SNOTE if this program is not available in your system (delivered with S/4HANA OP1511 SP01).

For S/4HANA OP1511:

To make it pretty clear: the below mentioned steps are not required if you have an APPEND structure directly at the end of the tables MARC or xBEW in the table. This case is automatically handled by the $EXTENSION keyword in the CDS proxy views delivered by SAP. If SE11 reports inconsistency between table and proxy object then please do a re-activation of the proxy view (use ABAP Development Tools for this) and then a re-activation of the table.

The steps 1 and 2.1 as well as 2.2 below must be executed in cases where:

  • the APPEND is in some of the structures building MARC or xBEW.

  • or there is an APPEND in table MKPF or MSEG.

  • or for table MSEG with implemented CI_COBL include.

For S/4HANA OP1610 and higher:

Only the step 1 below must be executed in cases where:

  • the APPEND is in some of the structures building MARC or xBEW.

  • or there is an APPEND structure in the tables MKPF, MSEG, MARC (at the end of table MARC itself), MARD, MCHB, MSSQ, MSSL, MSSA, MSPR, MSLB, MSKU, MSKA or MKOL.

  • or for table MSEG with implemented CI_COBL include.

1. Create an EXTEND VIEW

For APPENDs on structures of tables for the above described cases use ABAP Development Tools (ADT) Core Data Services (CDS) and create a new DDL source (ABAP Core Data Services - Data Definition) with name <Name of your append>_DDL (how to install ABAP in Eclipse is described in note 1718399)Enter a description like 'Extension view for Append <Name of your append>'. Select the template 'Extend View'  and adopt the proposed coding EXTEND VIEW <proxy view name for table> with <Name of your append>_E . 

  • The <proxy view name for MARC> is NSDM_E_MARC.
  • The <proxy view name for xBEW> is MBV_xBEW.
  • The <proxy view name for MSEG> is NSDM_E_MSEG.
  • The <proxy view name for MKPF> is NSDM_E_MKPF.
  • The <proxy view name for Mxyz> is NSDM_E_Mxyz.

Enter all the fields from the APPEND in this extend proxy view. If you have several APPENDs in one table (may happen if a table is composed by sub-structures or for MSEG an implemented CI_COBL include as well as an APPEND on table MSEG), then all fields from all your APPENDs shall be inserted in the customer CDS proxy view.

Example for MARC:

@AbapCatalog.sqlViewAppendName:'<Name of your append>_V'
@EndUserText.label:'Extension view for Append <Name of your append>'
@AccessControl.authorizationCheck:#NOT_REQUIRED
EXTEND VIEW NSDM_E_MARC with <Name of your append>_E
{
<your field list>
}

If you have implemented the CI_COBL customer include structure of table MSEG than do the same as above. Additionally you need note 2240878 to migrate the CI_COBL data of MSEG to MATDOC. If you later on like to make use of one of the fields in EXTEND VIEW for CI_COBL in the app "Custom fields and logic" then you need to follow the instructions given in this article in the SAP Help portal. Basically you need to remove the field from the EXTEND VIEW for CI_COBL, save without activate and then add the field in the app "Custom fields and logic" (valid for release 1709 and higher).

2. Correct sequence of fields for S/4HANA OP1511

The below mentioned steps shall be executed only in the case described above where

  • an APPEND exist in the sub-structures building the tables MARC, xBEW
  • or if there is an APPEND on table MKPF or MSEG
  • or in case of the CI_COBL implementation for table MSEG.

These steps shall not be executed in case of an APPEND directly in tables MARC, MARD, MCHB, MSSQ, MSSL, MSSA, MSPR, MSLB, MSKU, MSKA or MKOL.

2.1. Implement the program NSDM_PROXY_SUBSTITUTION

Implement the new program NSDM_PROXY_SUBSTITUTION delivered with this note as below if it is not available in your system (S/4HANA OP1511 SP00).

2.2. Execute the program NSDM_PROXY_SUBSTITUTION

Run the report to perform the additional manual adjustments.

Select the table to adjust, enter a <name> with customer namespace for the new CDS view and an explanatory text which will become part of the short description '<table>: <explanatory text>'.

This adjustment program creates a new CDS proxy view <name>_E with AbapCatalog name <name>_V  and DDL <name>_DDL, which SELECTs data from the underlying delivered CDS proxy view but where the fields are sequenced according to their order in the table to ensure compatibility between table and proxy object. This new CDS proxy view will then be assigned to the table thereafter. The new CDS proxy view will be inserted in a workbench transport request if necessary.

HANA S/4 标准表(MARC MBEW COBL)增强流程相关推荐

  1. S/4 HANA标准表MARC增强字段

    导语:每次在项目初期,都会有顾问要求增强标准表的字段,比如MARA,MARC这些大表. 在对MARC增强的时候需要特别注意,MARC是通过DDL视图组件出来的,CSD实体是NSDM_E_MARC,所以 ...

  2. SAP 系统标准表的结构增强

    在实际业务操作中,经常会存在较多的客制化需求.很多时候,企业可能会需要在表中增加一些自定义的字段.例如,VBAP表用于保存销售订单的详细信息,在一些销售订单行业,每个商品都可能存在很多价格相关的信息, ...

  3. NO.20-SAP S4 HANA Cloud中的表单模板(3)

    今天大家分享一下,在S/4 HANA Cloud中如何修改系统标准的表单,大家在项目中可能会遇到需要打印的单据,系统有标准的模板但是需要适当的改动,以前都是由开发人员通过代码改变,但是在S/4 HAN ...

  4. 2020身高体重标准表儿童_2020年儿童标准身高体重表发布,对比看看,你家孩子达标了吗?...

    下载好向圈APP可以快速联系圈友 您需要 登录 才可以下载或查看,没有帐号?立即注册 x 说起孩子的身高,恐怕没有父母不关注.尤其到了春天,长高的"黄金季"来了,都恨不得孩子在这个 ...

  5. 释疑の修改SAP标准表内容

    我们都知道SE11/SE12/SE16/SE16N等等事务代码都可以查看标准表的内容,那么问题来了. 如果我们需要偷个鸡,修改标准表的内容怎么整呢? (操作有风险,请勿模仿) 我们使用事务代码:SE1 ...

  6. 2020身高体重标准表儿童_2020年儿童标准体重表出炉!过胖影响发育!(附身高体重标准表)...

    近年来,孩子们长胖的趋势越来越明显,一些疾病也有年轻化的趋势. 很多家长们平时也很注意饮食搭配和运动,但孩子还是一不小心就"超重"了,真的防不胜防. 相信和我一样担忧孩子家长肯定不 ...

  7. 2020身高体重标准表儿童_男女孩最新身高标准表,你家孩子达标了吗?(附增高秘籍)...

    现在大家的生活水平提高了,和很多年前相比,孩子们的平均身高提高了不少,孩子能长成一个高个子,也是很多家长非常关注的事情. 其实,要想孩子长高,除了营养要跟上以外,充足的睡眠.体重不要太胖都是很重要的事 ...

  8. 2020身高体重标准表儿童_2020上海1-12岁男女孩最新身高标准表,你家孩子达标了吗?...

    了解更多资讯,关注[上海幼升小资讯] 现在大家的生活水平提高了,和很多年前相比,孩子们的平均身高提高了不少,孩子能否长成一个高个子,也是很多家长非常注意的事情. 其实,要想孩子长高,除了营养要跟上以外 ...

  9. 2020身高体重标准表儿童_2019年0~12岁儿童身高体重标准表出炉了,你家娃达标没...

    对于孩子来说,虽然学习很重要,身高更重要,但是,各个年龄段孩子的身高标准是多少呢?快来看看最近新出的0-12岁儿童身高体重标准表,赶快对照看看,自己家的娃达标没. 0-12岁小王子身高体重标准表 0- ...

最新文章

  1. [动态dp]线段树维护转移矩阵
  2. 数据挖掘基础知识-矩阵(分解)
  3. 移动测试中游戏和应用的不同之处
  4. Feed43自定义 RSS 订阅源
  5. k8s jenkins pipeline 多分支发布_给 Jenkins 换一个新皮肤:BlueOcean
  6. OJ1076: 三位数求解(C语言)
  7. 【java】java JVM如何科学的设置内存参数 虚拟机调优案例
  8. 什么是UIScrollView
  9. taro更新页面数据_Taro 全局数据状态管理
  10. 将vim打造成python开发工具
  11. 【通信】基于matlab多径衰落信道仿真【含Matlab源码 338期】
  12. 像素测量工具_像素大厨PxCook for Mac(自动标注工具)中文免费版
  13. FreeSwitch学习(1)-总体简介
  14. 一种文件捆绑型病毒研究
  15. VMware View Client 连接服务器,提示身份验证失败,连接服务器时
  16. 今天,魅族发布了一款AirPods!
  17. Word处理控件Aspose.Words功能演示:使用 C# 将 Word 文档转换为 Markdown
  18. inline函数在IAR中的使用
  19. java 并发(并发工具包)
  20. BootLoader有什么作用?

热门文章

  1. 兴趣爱好选择程序java+Swing界面
  2. Linux虚拟机与主机共享文档
  3. marplotlib坐标轴ax
  4. DirectX11 Direct3D基本概念
  5. oracle上亿数据的删除
  6. 数据结构详解——最大(小)左倾树
  7. 山西最新道路运输安全员模拟真题集及答案解析
  8. 基于node.js开发环境下创建及开发vue.js项目的环境配置骤
  9. 【中级软考—软件设计师】2操作系统2.7磁盘管理【**】:2.7.1磁盘管理01
  10. lammps教程:径向分布函数g(r)的计算与输出方法