当前位置:网站首页>ABAP essay - material master data interface enhancement - tab enhancement
ABAP essay - material master data interface enhancement - tab enhancement
2022-06-27 22:48:00 【Tab Zhu】
Material master data enhancement (2)
I wrote a document about material master data enhancement ABAP essays - The material master interface is enhanced , Need configuration + Strengthen the code , Today, I will upgrade the function , Enhance the material master data tab
1. Enhance the material master data table
append custom field in MARA
Add whatever field you want
2. Material master data configuration
- To configure 1 Path is :SPRO-> logistics - routine -> Material master data -> Configure the material master record -> Create a custom sub screen program
Create the corresponding function group
For the screen 0001 Add a field , increase PAI PBO The logic of module
among status_0001,set_ztab_mara_01 The code is
MODULE status_0001 OUTPUT.
IF sy-tcode = 'MM02'
OR sy-tcode = 'MM03'.
CALL FUNCTION 'MARA_GET_SUB'
IMPORTING
wmara = mara
xmara = *mara
ymara = lmara.
ENDIF.
IF sy-tcode = 'MM03'.
LOOP AT SCREEN.
screen-input = '0'.
MODIFY SCREEN.
ENDLOOP.
ENDIF.
ENDMODULE.
MODULE set_ztab_mara_01 INPUT.
DATA:ls_cust TYPE ztab_mara_01 .
MOVE-CORRESPONDING mara TO ls_cust .
CALL FUNCTION 'MARA_GET_SUB'
IMPORTING
wmara = mara
xmara = *mara
ymara = lmara.
MOVE-CORRESPONDING ls_cust TO mara .
CALL FUNCTION 'MARA_SET_SUB'
EXPORTING
wmara = mara.
ENDMODULE.
among function MARA_GET_SUB and MARA_SET_SUB Get and update respectively MM02/MM01/MM03 Memory variable MARA Value
- To configure 2 Then we continue to choose spro-> logistics - routine -> Material master data -> Configure the material master record -> Define the structure of the data screen for each screen sequence
The configuration we are currently using is 21 Screen order
In the data screen interface, we add a new piece of data
At the same time, we configure the data sub screen , Fill in the... We just created FUNCTION GROUOP Inside the screen among SAPLMGD1->1002 It is the header that displays the material number
You can click on... On the right View data screen View the generated screen
- To configure 3 Save after exit , We enter spro-> logistics - routine -> Material master data -> Configure the material master record -> Select... In the maintenance order of the main screen and the additional screen 21 Double click enter on the serial number screen We can see the configured sub screen , If you want to Z1 The screen moves up , Then change the sequence number
Now let's go into MM03 Enter materials in the interface and click enter to view the new view for selection
In fact, we can now modify and save the new fields
3. Data update
We were in The material master interface is enhanced I've already talked about it in , How to perform enhanced verification on material master data ,
Here we simply do a uniqueness check : Enable EXIT_SAPLMGMU_001 exit and CI_MMH1
*&---------------------------------------------------------------------*
*& contain ZXMG0U02
*&---------------------------------------------------------------------*
IF sy-ucomm = 'BU' OR sy-ucomm = 'YES'.
IF sy-tcode = 'MM01' OR sy-tcode = 'MM02'.
CHECK wmara-custom_field1 IS NOT INITIAL.
SELECT matnr INTO TABLE @DATA(lt_matnr)
FROM mara WHERE custom_field1 = @wmara-custom_field1.
IF sy-subrc EQ 0.
DELETE lt_matnr WHERE matnr = wmara-matnr.
IF lt_matnr[] IS NOT INITIAL.
READ TABLE lt_matnr INDEX 1 INTO DATA(ls_matnr).
MESSAGE e001(ztab) WITH wmara-custom_field1 ls_matnr-matnr.
ENDIF.
ENDIF.
ENDIF.
ENDIF.
When we double-click CI_MMH1 when , It is found that the structure does not exist , We directly SE11 establish , Then write in the enhanced fields
Actually CI_MMH1 This is not possible in our enhancements , But this creates CI_MMH1 Is in the structure BMMH1 Medium , be used for LSMW- If there is no enhancement here ,LSMW Enhanced field batch import cannot be performed
After activation and saving , We are looking for another material SGPI002, Enter... In the customer field 1234567890 preservation , This will prompt :
4. Be careful
In the top code sy-tcode = 'MM01' Yes MM01 The uniqueness verification is also performed because ,MM01 You can extend the existing materials
For more articles, please click history
ABAP essays - The material master interface is enhanced
BP Customer enhancements - Add verification event when saving (DCHCK)
边栏推荐
猜你喜欢

结构化机器学习项目(一)- 机器学习策略

渗透学习-sql注入过程中遇到的问题-针对sort=left(version(),1)的解释-对order by后接字符串的理解

Service gateway of microservices

使用sqlite3语句后出现省略号 ... 的解决方法

信通院举办“业务与应用安全发展论坛” 天翼云安全能力再获认可

Character interception triplets of data warehouse: substrb, substr, substring
![The problem of minimum modification cost in two-dimensional array [conversion question + shortest path] (dijkstra+01bfs)](/img/e6/4eb2ddf4d9bac5e40bf2e96656d294.png)
The problem of minimum modification cost in two-dimensional array [conversion question + shortest path] (dijkstra+01bfs)

Ellipsis after SQLite3 statement Solutions for

Crawler notes (1) - urllib

CUDA error:out of memory caused by insufficient video memory of 6G graphics card
随机推荐
Go语言fsnotify接口实现监测文件修改
Azure Kinect DK realizes 3D reconstruction (PC non real time version)
Is flush stock trading software reliable?? Is it safe?
STM32与RC522简单公交卡系统的设计
Improving deep neural networks: hyperparametric debugging, regularization and optimization (III) - hyperparametric debugging, batch regularization and program framework
跟着存档教程动手学RNAseq分析(二)
《7天学会Go并发编程》第7天 go语言并发编程Atomic原子实战操作含ABA问题
Management system itclub (Part 1)
Workflow automation low code is the key
网易云“情怀”底牌失守
《7天学会Go并发编程》第六天 go语言Sync.cond的应用和实现 go实现多线程联合执行
月薪3万的狗德培训,是不是一门好生意?
渗透学习-靶场篇-dvwa靶场详细攻略(持续更新中-目前只更新sql注入部分)
Record a list object traversal and determine the size of the float type
Learn to go concurrent programming in 7 days go language sync Application and implementation of cond
批量处理-Excel导入模板1.1-支持多Sheet页
Character interception triplets of data warehouse: substrb, substr, substring
Hiplot 在线绘图工具的本地运行/开发库开源
Structured machine learning project (II) - machine learning strategy (2)
【mysql实战】查询语句实战演示