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. Linux 判断进程是否运行

    问题 linux平台 多人开发服务器,有时自己运行一个进程在服务器上,但未知原因导致停止运行了,需要添加一个定时任务,用于监控指定进程是否运行 方法 一个通用的方法,以便使用在不同项目中. 思路:定时 ...

  2. 定时重启tomcat

    写个简单的定时重启,弄了一上午,主要是crontab里面奇怪 #!/bin/bash p=`ps -ef |grep tomcat |head -n 1|awk -F" " '{p ...

  3. [zz] MATLAB工具箱介绍

    http://blog.sina.com.cn/s/blog_57235cc701012kfb.html Toolbox工具箱 序号 工具箱 备注   数学.统计与优化   1 Symbolic Ma ...

  4. 关于bit,bin文件的一些研究

    关于bit,bin文件的一些研究 bit文件里面有head information 但bin文件里面并不包含 bit 文件里面包含如下信息 SPI flash 时钟需要用到的源语 watchdog 设 ...

  5. vscode编辑Markdown时的贴图工具

    参看 https://www.jianshu.com/p/74b960efb697 说明: 1. 文件-->首选项-->设置-->填入paste,设置Path值为 ${current ...

  6. Python模块hashlib

    Python的hashlib提供了常见的摘要算法,如MD5,SHA1等等. 什么是摘要算法呢?摘要算法又称哈希算法.散列算法.它通过一个函数,把任意长度的数据转换为一个长度固定的数据串(通常用16进制 ...

  7. 记一次sql server 2005访问http接口,并解析json的过程

    记一次sql server 2005访问http接口,并解析json的过程  JSON解析官方网站:https://www.red-gate.com/simple-talk/sql/t-sql-pro ...

  8. WampServer的下载方法

    http://www.wampserver.com/ 无法访问 报网络连接错误 2019.01.13 最近要用到Windows+apache+mysql+php,为了追求更快的实现速度和更高的稳定性, ...

  9. [转]MySQL group_concat设置group_concat_max_len

    GROUP_CONCAT函数用于将多个字符串连接成一个字符串,在拼接成字符串时就会存在拼接长度的问题,mysql 默认的拼接最大长度为1024 个字节,由于1024个字节会出现不够用的情况,所以有时需 ...

  10. Core Graphices 设置渐变

    Core Graphices 设置渐变 Quartz 提供了两种设置渐变的方式  CGShadingRef and CGGradientRef 尝试CGGradientRef 的使用 import & ...