Add custom field in Material Master
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的更多相关文章
- 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 ...
- [转]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 ...
- JIRA Plugin Development——Configurable Custom Field Plugin
关于JIRA Plugin开发的中文资料相当少,这可能还是由于JIRA Plugin开发在国内比较小众的原因吧,下面介绍下自己的一个JIRA Plugin开发的详细过程. 业务需求 创建JIRA IS ...
- redmine computed custom field formula tips
项目中要用到Computed custom field插件,公式不知道怎么写,查了些资料,记录在这里. 1.http://apidock.com/ruby/Time/strftime 查看ruby的字 ...
- [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 ...
- 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 ...
- Add custom daemon on Linux System
Ubuntu add custom service(daemon) Task 需要在系统启动的时候自动启动一个服务(后台程序),在系统关闭的时候关闭服务. 比如在部署某个应用之前,需要将某个任务设置成 ...
- SharePoint Development - Custom Field using Visual Studio 2010 based SharePoint 2010
博客地址 http://blog.csdn.net/foxdave 自定义列表的时候有时候需要自定义一些字段来更好地实现列表的功能,本文讲述自定义字段的一般步骤 打开Visual Studio,我们还 ...
- Material Master
02-03 03: 物料主的定义:相同的物料应该是同一个物料号. 在PP放面我们主要关心的是工厂 . 定义公司后在公司下面在定义工厂. spro配置的时候我们可以在.后勤.物料管理.物料.创建: 后勤 ...
随机推荐
- PythonStudy——三种字符串 Three strings
# 普通字符串:u'以字符作为输出单位'print(u'abc') # 用于显示 # 二进制字符串:b'' 二进制字符串以字节作为输出单位print(b'abc') # 用于传输 # 原义字符串:r' ...
- PythonStudy——进制 System of numeration
十进制 人类天然选择了十进制. 二进制 二进制有两个特点:它由两个数码0,1组成,二进制数运算规律是逢二进一. 四进制 四进制是以4为基数的进位制,以 0.1.2 和 3 四个数字表示任何实数. 七进 ...
- jar包不能乱放【浪费了下午很多时间】
不能放在类路径下(也即是src文件夹下),然后再buildpath 必须放在web-inf文件夹下 这样才能tomcat找打jar文件
- 配置SSH使用秘钥登录
使用密码远程登录ssh还是有比较大的风险的,比较安全的方法是使用秘钥登录 配置步骤如下 首先生成秘钥 ssh-keygen (直接默认回车也可以,生成的秘钥和公钥默认防止在/root/.ssh/文件 ...
- JAVA常用工具类异常处理
1异常的定义 异常就是与我们编译相违背在过程中出现的逻辑或忘记一些赋值等等 分为编译时错误和运行时错误 运行时异常 我们一般处理的时Exception异常: 异常处理 异常处理可以通过关键字try,c ...
- ionic3安卓平台引用高德地图
1.前置条件 第一步,注册高德开发者:第二步,去控制台创建应用:第三步,获取Key. 2.打开src目录下的index.html, 在head标签中添加以下代码,引入js: <script ty ...
- 前端-JavaScript1-4——JavaScript之变量
变量(Variables),和高中代数学习的x.y.z很像,它们不是字母,而是蕴含值的符号. 它和直接量不同,直接量5,就是数字5:直接量”你好”就是字符串“你好”.现在这个变量不一样了,你看见一个a ...
- 关于想通过ros的dstnat实现公网IP nat 公网IP的情况
转发群里大神的“苏州-海豚在跳舞”的图 理论上客户机收到2.2.2.2过来的包应该直接丢弃.因为它并没有给2.2.2.2发过包.这里不知道如果在2.2.2.2上做 src-nat伪装成1.1.1.1回 ...
- 8、Curator的监听机制
原生的zookeeper的监听API所实现的方法存在一些缺点,对于开发者来说后续的开发会考虑的细节比较多. Curator所实现的方法希望摒弃原声API 的不足,是开发看起来更加的简单,一些重连等操作 ...
- NIOS II With uCOSII
1.如果使用uCOS,那么Qsys中Nios II核就不能使用外部中断控制器(EIC). 2.遇到很迷惑的问题,运行uCOSII的实例代码,总是在第二个OSTimeDlyHMSM(0, 0, 3, 0 ...