Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

ME21 Screen Exit

Former Member
0 Kudos

Hi

My customer wants to add new customer fields to the transaction ME21, which subscreen (subscreen no) can I use to add the field.

Can anyone give me a detail description of how to do this. I have done customer exit for VA01, I have created the append structure, but I am stuck now

Points will be rewarded for helpful answers

4 REPLIES 4

Former Member
0 Kudos

have u try with exit MM06E005?

Former Member
0 Kudos

Is there any documentation or guide on using the MM06E005?

Sorry but this enhancement is quite urgent cause my timeline is very short

Edited by: jamison2004 jordan2004 on May 29, 2008 4:38 PM

0 Kudos

Former Member
0 Kudos

Hi ,

Check the following regarding adding custom fields in ME21n

The sme applies to ME21

Requirement:

You have to add the custom field in SAP standard table EKKO. Then we have to place the field in ME21N screen. When user enters any input into the field it should get updated in the database.

Note: EKKO table is meant for Purchasing document header, you should add the field in the header level for ME21n screen. There you are provided with customer sub screens where you can add the field in the screen.

Procedure:

1.You have to create a field in the Custom Include of standard table, after creating activate it.

2.Double click on the include then you can add your custom field here.

Find out the Required Enhancements:

1.Go to SMOD. Press F4 in the Enhancement field. In the next popup window, click pushbutton u2018Information systemu2019.

2.Then mention the particular package name of the transaction you need to enhance. Then you will be shown the list of Enhancement components for that particular package.

3.Note down the enhancements. Then, come to the initial screen of SMOD and view the documentation of each enhancement to find out which one is required for your development.

MM06E005 is the Enhancement component we are using here.

Development

Creating a Project to include the enhancement:

1.Go to transaction CMOD and create a project.

2.Enter a description for the project.

3.Then, click on the pushbutton u2018Enhancement Assignmentsu2019 in the Application Toolbar.

4.Click on the components in Application Toolbar.

5.Here you will be shown the function module exits, screen exits and Include tables.

6.Click on the custom screen SAPLXMO6 u2013 0101 in which it suits the requirement of adding the custom field to the layout.

7.Click on layout and go to get from dictionary and select the field you need to add and click ok.

8.Place the field in the layout and activate it.

9.After that you come back and check the respective function module in which you need to implement the code. So, we need to import the data from sub screen for purchasing document header. Therefore we have chosen the EXIT_SAPMM06E_008.

10. Write code in the Function Exits to synchronize the programs:

Now, code has to be written in the function modules EXIT_SAPMM06E_008 so that data flows to and fro between the main SAP program and custom sub screen program. Double clicking on the exit we get the following screen.

11. Double click on the include and write the required code inside it. Then activate it.

12. Now come back and activate the entire project.

13. Now go to ME21n transaction and create a purchase order by giving all the mandatory fields including custom field we have created. Here Test is the custom field we have created. After entering the data then press SAVE button, your data will be populated to the respective table.

14. Go to SE11 or SE16n, check whether the field got updated in the database or not in EKKO table.

Finally it gets updated in the database.

Reward points if useful.

Thanks ,

Surya Pydikondala.