1.Add fields in the Append Structure of table MARA.

2.Configure

SPRO IMG -> Logistics General -> Material Master -> Configuring the Material Master -> Create Programs for Customized Subscreens
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)

3.Paint

4.Coding

 process before output.
module modify_screen.
module get_data.
process after input. chain.
field:
mara-zz_tl_fot_status,
mara-zz_tl_fot_date,
mara-zz_tl_fot_time.
module check_fot_input.
endchain. chain.
field:
mara-zz_tl_isi_status,
mara-zz_tl_isi_date,
mara-zz_tl_isi_time.
module check_isi_input.
endchain. field mara-zz_tl_fot_status.
field mara-zz_tl_fot_date.
field mara-zz_tl_fot_time.
field mara-zz_tl_isi_status.
field mara-zz_tl_isi_date.
field mara-zz_tl_isi_time.
module set_data_output.
module modify_screen output.
case sy-tcode.
when 'MM03'.
loop at screen.
case screen-group1.
when 'G1'.
screen-input = 0.
modify screen.
endcase.
endloop.
when 'MM01' or 'MM02'.
loop at screen.
case screen-group1.
when 'G1'.
screen-input = 1.
modify screen.
endcase.
endloop.
endcase.
endmodule. " MODIFY_SCREEN OUTPUT
module get_data output.
call function 'MARA_GET_SUB'
importing
wmara = mara
xmara = *mara
ymara = lmara
. endmodule. " GET_DATA OUTPUT
module check_isi_input input.
if mara-zz_tl_isi_status is initial
and ( mara-zz_tl_isi_date is not initial or mara-zz_tl_isi_time is not initial ).
clear: mara-zz_tl_isi_date,mara-zz_tl_isi_time.
message 'Select the the ISI status first' type 'E'.
endif. if mara-zz_tl_isi_status is not initial
and ( mara-zz_tl_isi_date is initial or mara-zz_tl_isi_time is initial )..
message 'Please fill in the ISI status date and time' type 'E'.
endif.
endmodule. " CHECK_DATA_INPUT INPUT
module set_data_output input.
data:
lv_fot_status type mara-zz_tl_fot_status,
lv_fot_date type mara-zz_tl_fot_date,
lv_fot_time type mara-zz_tl_fot_time,
lv_isi_status type mara-zz_tl_isi_status,
lv_isi_date type mara-zz_tl_isi_date,
lv_isi_time type mara-zz_tl_isi_time.
data lv_mail_flag type flag. check sy-tcode eq 'MM01' or sy-tcode eq 'MM02'. lv_fot_status = mara-zz_tl_fot_status.
lv_fot_date = mara-zz_tl_fot_date.
lv_fot_time = mara-zz_tl_fot_time.
lv_isi_status = mara-zz_tl_isi_status.
lv_isi_date = mara-zz_tl_isi_date.
lv_isi_time = mara-zz_tl_isi_time.
export lv_fot_status to memory id 'MARA_FOT_STATUS'.
export lv_fot_date to memory id 'MARA_FOT_DATE'.
export lv_fot_time to memory id 'MARA_FOT_TIME'.
export lv_isi_status to memory id 'MARA_ISI_STATUS'.
export lv_isi_date to memory id 'MARA_ISI_DATE'.
export lv_isi_time to memory id 'MARA_ISI_TIME'. endmodule. " SET_DATA_OUTPUT INPUT

4.Configure

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)

5.In FM:EXIT_SAPLMGMU_001.include zxmg0u02.

This user exit is called every time PAI is triggered.
if ( sy-tcode eq 'MM01' or sy-tcode eq 'MM02' ) and cmara-matnr cp 'T01*'.
data:
lv_fot_status type mara-zz_tl_fot_status,
lv_fot_date type mara-zz_tl_fot_date,
lv_fot_time type mara-zz_tl_fot_time,
lv_isi_status type mara-zz_tl_isi_status,
lv_isi_date type mara-zz_tl_isi_date,
lv_isi_time type mara-zz_tl_isi_time.
"To be easily understand
"import lv_fot_status from memory id 'MARA_FOT_STATUS'.
"cmara-zz_tl_fot_status = lv_fot_status. import lv_fot_status = cmara-zz_tl_fot_status from memory id 'MARA_FOT_STATUS'.
import lv_fot_date = cmara-zz_tl_fot_date from memory id 'MARA_FOT_DATE'.
import lv_fot_time = cmara-zz_tl_fot_time from memory id 'MARA_FOT_TIME'.
import lv_isi_status from memory id 'MARA_ISI_STATUS'.
if 'X' eq lv_isi_status and 'X' ne cmara-zz_tl_isi_status.
call function 'ZZXMG0U02_SEND_MAIL'
exporting
iv_material = cmara-matnr
.
endif.
cmara-zz_tl_isi_status = lv_isi_status.
import lv_isi_date = cmara-zz_tl_isi_date from memory id 'MARA_ISI_DATE'.
import lv_isi_time = cmara-zz_tl_isi_time from memory id 'MARA_ISI_TIME'.
endif.

Parameter ID must be same in “export” and “import”

4. Another example.

process before output.
module liste_initialisieren.
loop at extract with control
tctrl_zcustomer_name cursor nextline.
module liste_show_liste.
endloop.
*
process after input.
module liste_exit_command at exit-command.
module liste_before_loop.
loop at extract.
module liste_init_workarea.
chain.
field zcustomer_name-zcustomer_name .
module set_update_flag on chain-request.
endchain.
field vim_marked module liste_mark_checkbox.
chain.
field zcustomer_name-zcustomer_name .
module liste_update_liste.
endchain.
endloop.
module liste_after_loop.

Add custom field in Material Master的更多相关文章

  1. Add custom and listview web part to a page in wiki page using powershell

    As we know, Adding list view web part is different from custom web part using powershell, what's mor ...

  2. [转]How to query posts filtered by custom field values

    Description It is often necessary to query the database for a list of posts based on a custom field ...

  3. JIRA Plugin Development——Configurable Custom Field Plugin

    关于JIRA Plugin开发的中文资料相当少,这可能还是由于JIRA Plugin开发在国内比较小众的原因吧,下面介绍下自己的一个JIRA Plugin开发的详细过程. 业务需求 创建JIRA IS ...

  4. redmine computed custom field formula tips

    项目中要用到Computed custom field插件,公式不知道怎么写,查了些资料,记录在这里. 1.http://apidock.com/ruby/Time/strftime 查看ruby的字 ...

  5. [webgrid] – header - (How to Add custom html to Header in WebGrid)

    How to Add custom html to Header in WebGrid MyEvernote Link Posted on March 30, 2013by mtryambake Ho ...

  6. How To Add Custom Build Steps and Commands To setup.py

    转自:https://jichu4n.com/posts/how-to-add-custom-build-steps-and-commands-to-setuppy/ A setup.py scrip ...

  7. Add custom daemon on Linux System

    Ubuntu add custom service(daemon) Task 需要在系统启动的时候自动启动一个服务(后台程序),在系统关闭的时候关闭服务. 比如在部署某个应用之前,需要将某个任务设置成 ...

  8. SharePoint Development - Custom Field using Visual Studio 2010 based SharePoint 2010

    博客地址 http://blog.csdn.net/foxdave 自定义列表的时候有时候需要自定义一些字段来更好地实现列表的功能,本文讲述自定义字段的一般步骤 打开Visual Studio,我们还 ...

  9. Material Master

    02-03 03: 物料主的定义:相同的物料应该是同一个物料号. 在PP放面我们主要关心的是工厂 . 定义公司后在公司下面在定义工厂. spro配置的时候我们可以在.后勤.物料管理.物料.创建: 后勤 ...

随机推荐

  1. 什么是pytorch(2Autograd:自动求导)(翻译)

    Autograd: 自动求导 pyTorch里神经网络能够训练就是靠autograd包.我们来看下这个包,然后我们使用它来训练我们的第一个神经网络. autograd 包提供了对张量的所有运算自动求导 ...

  2. 学习Unity -- 理解依赖注入(IOC)三种方式依赖注入

    IOC:英文全称:Inversion of Control,中文名称:控制反转,它还有个名字叫依赖注入(Dependency Injection).作用:将各层的对象以松耦合的方式组织在一起,解耦,各 ...

  3. JAVA面向对象设计中类关系

    现在看以前描述有点小问题:类之间关系分为继承.泛化.依赖.关联.聚合.聚合关系几种.继承是is a关系,泛化(类实现接口)表示like a关系. 类之间的关系种类: Generalization(泛化 ...

  4. Flask 框架

    装饰器知识回顾 http://www.cnblogs.com/0bug/p/7978595.html 普通装饰器格式: def wrapper(func): def inner(*args, **kw ...

  5. node升级的正确方法

    本文主要是针对安装了node的用户如何对node进行升级或者安装指定版本:没有安装node的可以参考连接node安装方法 . 安装方法: 1.产看node版本,没安装的请先安装: $  node -v ...

  6. springboot 的war包在Tomcat中启动失败

    springboot 默认是通常是打包成jar的,里面会内置一个tomcat容器 有时候我们需要使用以前打成war包的方式部署到对应的tomcat中, 具体springboot 怎么从jar改成war ...

  7. 20165312 2017-2018-2 《JAVA程序设计》第6周学习总结

    20165312 2017-2018-2 <JAVA程序设计>第6周学习总结 一.在本周学习过程中遇到的问题以及对上周测试的查漏补缺 编写110页代码时出现问题,主类Test中创建CPU对 ...

  8. normalization正规化

    用到sklearn模块 from sklearn import preprocessing用preprocessing.scale正规化 print(preprocessing.scale(a))

  9. c# 对DataTable进行分组group by

    ]);//对索引为0的一列进行分组,结果是集合

  10. ES6 入门Promise

    Promise是一个对象用来传递异步操作的消息,有三种状态:Pending(进行中),Resolved(已完成又称Fulfilled)和Rejected(已失败). 特点:对象状态不受外界的影响.一旦 ...