去年写过一遍相关的文章
原文地址:https://blog.csdn.net/weixin_46540694/article/details/106189141
该文章主要讲述的是,OXK3新增字段后,相关字段报错,怎么利用Eclipse去删除OXK3的字段,解决报错方式.
这次文章提到的是,怎么把OXK3定制化字段增加到NSDM_E_MSEG里面去,并能正常使用该字段,
Eclipse的相关介绍可以查看历史文章方式处理,SAP相关视图及表请查看Note:2865970
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 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.
NOTE提到The is NSDM_E_MSEG.
进入Eclipse进行设置
Package:传输请求号/TMP本地
Name:ZNSDM_E_MSEG
Description:MSEG EXTEND VIEW
完成后,输入代码
@AbapCatalog.sqlViewAppendName: 'ZNSDM_E_MSEG'
@EndUserText.label: 'MSEG EXTEND VIEW'
extend view nsdm_e_mseg with ZNSDMEMSEG {
zzbu
}
ZZBU为OXK3定制的字段,NSDM_E_MSEG为MSEG的关联视图,NOTE有写需要增加ALL字段,但进行测试和激活发现只需增加OXK3的定制字段,
Eclipse保存激活后,无错误的情况下,再去检查SAP BSEG表,无报错,Done