物料主数据增强 - MM01 Enhance

2 篇文章 0 订阅


https://blogs.sap.com/2015/03/06/additional-fields-on-the-material-master/


Extending the master table
1 , 标准表附加结构
Go to TCode SE11 and display table for plant-specific fields (MARC)
Extend an existing or create new custom Append for MARC table- it will be a normal structure (will be editable in SE11) which will be appended at the end of the table
New MARC Append structure


Add your fields to the Append-structure – In our example we will add field for storing a process code called ZZ_PROCCODE of type ZZ_DTEL_PROCCODE built on domain ZZ_DOM_PROCCODE.
New data element for MARC Append structure


Data element Domain definition


Activate the append structure -> this will trigger the MARC table
(and all depending tables/structures) adjustments – this can be quite 
time consuming so take care when doing such change in production 
environment
Updated MARC table with new Append structure


2 , 创建子屏幕 (通过  后勤-常规>>物料主数据>>配置物料主数据>>(1)创建定制子屏幕程序
                                                             >>(2)定义每个屏幕序列的数据屏幕的结构

Create/Extend own sub-screen
Create new function group (you can skip this step if you already 
have a FUGR created for this purpose) where you define new sub-screens 
which will contain your custom fields.
!!! STOP !!!


Do not create the FUGR manually but go through customizing for the MM views in
SPRO IMG -> Logistics General -> Material Master -> 
Configuring the Material Master -> Create Programs for Customized 
Subscreens


SAP IMG for Material Master Customizing


Let’s call our new FUGR ZSALES_MASTER.


通过复制 标准程序 函数组 MGD1 的子屏幕 到  2 创建的 函数组子屏幕 ,更改数据元素 即可
In SE80 display FUGR MGD1 and select the screen (MM View 
sub-screen) you want to enhance with your own fields – in our case it 
will be screen 2701 (Storage data: general data)
Copy the selected screen from MGD1 to your FUGR (keep its current number)
Copy standard screen to your FUGR


Using Screen Painter edit the new screen in your FUGR (in our case 
screen 2701) and rename the group to some custom text describing the 
group of fields you’re going to put inside. Then delete all fields from 
the screen and put there only your custom fields.
…the original layout will be changed from this


Original screen layout


… to the following


New screen layout


Save and activate your new screen
In SE80 open the screen (in our case 2701) and go to tab Flow logic
In the code displayed remove (or comment out) all lines manipulating
with fields that no longer exist in the screen and replace them with 
commands that will manipulate with your own custom fields. Be careful – 
don’t remove (comment out) module calls MODULE GET_DATEN_SUB and MODULE SET_DATEN_SUB – these are responsible for reading data from database and putting them back once you change them in the MM views.
Changed Flow logic of your new screen


Activate all changes in the custom FUGR (added screen, its layout and flow logic)
Add the new subscreen to the standard MM Views
Go to customizing for the MM views in SPRO IMG -> Logistics 
General -> Material Master -> Configuring the Material Master 
-> Define Structure of Data Screens for Each Screen Sequence (Tcode OMT3)


Now you can either create your own screen sequence (by copying some 
of the existing ones) or just modify one of the already prepared ones – 
we will go to update already existing one (21 – Standard Industry: Tab 
pages)
SAP IMG - MM Screens Sequence Customizing


select the line and double-click on Data Screens
SAP IMP Screens Sequence Customizing - Data Screens


Now select the line with Screen Desription General Plant Data / Storage 1 and double-click on Subscreens
SAP IMG Screens Sequence Customizing - Sub Screens


Here you can preview the whole screen with its all sub-screens by pushing the button View Data Screen
You can see your custom sub-screen is not visible … yet :-)
Go back and select the first line where  PROGRAM = SAPLMGD1 and SCREEN=0001 (screen 0001 is a dummy/empty screen), click on the Add new Entries button and replace the program name with SAPLZSALES_MASTER (main program of your FUGR) and put your own screen number (2701)
Press SAVE button (you will be asked for a transport number) and voila …YOU ARE DONE 8-)
To test your new screen go to MM01 or MM02


New material creation


Check in the General Plant Data / Storage 1 tab, that your new field (ZZ_PROCCODE) in your new sub-screen (2161) is visible. Change its value, enter all other required fields and save changes.


New material details


Check in SE16 that data has been saved correctly in the MARC table


New material details in MARC table


Modification of new fields data in PAI
In case you need to process or modify data of your new fields (or


also data of standard fields) during PAI in MM01/MM02/MM03) you have to


增强检查 可通过 >>
implement Customer-Exit EXIT_SAPLMGMU_001.


This user exit is called every time PAI is triggered.


If you need to do some error-checking during the SAVE action only, then you can surround your code with something like


IF sy-ucomm = ‘BU’. “this code executed only during SAVE
* your code
ENDIF.








================================================================================================
= DBSQL_REDIRECT_INCONSISTENCY 的解决 
================================================================================================


参考 Note 2242679 - Redirect inconsistency - Proxy Substitution
https://launchpad.support.sap.com/#/notes/2242679


For S/4HANA OP1610:


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. 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>
}
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值