当前位置:网站首页>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)
边栏推荐
- Where can I set the slides on the front page of CMS applet?
- Common APIs (Methods) for scope -number and string
- Azure Kinect DK realizes 3D reconstruction (PC non real time version)
- Educational Codeforces Round 108 (Rated for Div. 2)
- Management system itclub (Part 1)
- 渗透学习-sql注入过程中遇到的问题-针对sort=left(version(),1)的解释-对order by后接字符串的理解
- 《7天学会Go并发编程》第7天 go语言并发编程Atomic原子实战操作含ABA问题
- Using the cucumber automated test framework
- Macro task and micro task understanding
- 初识C语言 第二弹
猜你喜欢

渗透学习-靶场篇-pikachu靶场详细攻略(持续更新中-目前只更新sql注入部分)

Login credentials (cookie+session and token token)

99 multiplication table - C language

Mysql database experiment report (I)

Vue+MySQL实现登录注册案例

广告太「野」,吉野家「渡劫」

Conversation Qiao Xinyu: l'utilisateur est le gestionnaire de produits Wei Brand, zéro anxiété définit le luxe

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

Introduce you to ldbc SNB, a powerful tool for database performance and scenario testing

7 jours d'apprentissage de la programmation simultanée go 7 jours de programmation simultanée go Language Atomic Atomic Atomic actual Operation contains ABA Problems
随机推荐
Contest 2050 and Codeforces Round #718 (Div. 1 + Div. 2)
The karsonzhang/fastadmin addons provided by the system reports an error
Windwos 8.1系统安装vmware tool插件报错的解决方法
关于davwa的SQL注入时报错:Illegal mix of collations for operation ‘UNION‘原因剖析与验证
这届考生,报志愿比高考更“拼命”
Which method is called for OSS upload
渗透学习-sql注入过程中遇到的问题-针对sort=left(version(),1)的解释-对order by后接字符串的理解
结构化机器学习项目(二)- 机器学习策略(2)
Arcgis-engine二次开发之空间关系查询与按图形查询
OData - API using SAP API hub in SAP S4 op
网易云“情怀”底牌失守
Oracle obtains the beginning and end of the month time, and obtains the beginning and end of the previous month time
微服務之服務網關
Transformation from student to engineer
Introduction to MySQL operation (IV) -- data sorting (ascending, descending, and multi field sorting)
Record a list object traversal and determine the size of the float type
Is flush stock trading software reliable?? Is it safe?
九九乘法表——C语言
Management system itclub (Part 1)
Is it safe for GF futures to open an account?