The screen of SAP material master data is enhanced.

Source: Internet
Author: User

1. use the transaction code OMT3C (or use SPRO to enter, logistics-General-> material master record-> Configure material master record-> create a program to customize the sub-screen) to create a function group, for example, ZMGD1, and then save.

2. Use the transaction code SE80 to enter, select the function group ZMGD1, and create your own layout in screen 0001.

3. PBO and PAI on the Writing screen.
Process before output.
* MM01 time limit system input status
MODULE disable_fields.
* In MM02/MM03, the data is obtained from the custom table and assigned to the corresponding field on the screen.
MODULE get_data.

Process after input.
* Export data to MEMORY
MODULE assign_data.

MODULE disable_fields.
IF SY-TCODE = 'mm03 '.
Loop at screen.
SCREEN-INPUT = '0 '.
Modify screen.
ENDLOOP.
ENDIF.
ENDMODULE.

MODULE GET_DATA OUTPUT.
TABLES: ZVPM_SAP_ENH.
IF SY-TCODE = 'mm02' OR SY-TCODE = 'mm03 '.
Get parameter id 'Mat 'FIELD W_MATNR.
Select single zczbm from ZVPM_SAP_ENH
INTO ZVPM_SAP_ENH-ZCZBM
Where matnr = W_MATNR.
ENDIF.
ENDMODULE.

MODULE ASSIGN_DATA INPUT.
EXPORT ZVPM_SAP_ENH to memory id 'zvpm _ sap_enh '.
ENDMODULE.

4. use the transaction code OMT3B (or use SPRO to enter, logistics-General-> material master record-> Configure material master record-> define the data screen structure of each screen sequence) in the screen sequence, select 21 on the right, click the data screen, select 07 on the right, and then click the screen. then, adjust the sequence of SAPLZMGD1/0001 on the 07 screen in TC on the right.

5. Create a project with the component MGA00001, write the relevant code in the exit EXIT_SAPLMGMU_001, and then activate it.
TABLES: ZVPM_SAP_ENH.
IF SY-UCOMM = 'Bu 'OR SY-UCOMM = 'yes '.
IMPORT ZVPM_SAP_ENH from memory id 'zvpm _ sap_enh '.
ZVPM_SAP_ENH-MATNR = CMARA-MATNR.
MODIFY ZVPM_SAP_ENH FROM ZVPM_SAP_ENH.
ENDIF.

Finally, test the transaction code MM01/MM02/MM03 to see how it works.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.