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: 

New to BADi, Need help.

Former Member
0 Kudos

Hi all

I need to display a field on ME21N screen, which is EKKO-BRGEW, which is already there in the database. Just I need to display this field on status tab of ME21.

As I am new to BADi can anybody tell me process how can i go for it.

It is urgent. Please reply.

Regards

Mona

8 REPLIES 8

Former Member
0 Kudos

Dear Mona,

You may try the BADI ME_PO_PROCESS_CUST.

Hope this helps you.

Encourage other to answer your queries by suitably rewarding them

Thanks

Venugopal

Former Member
0 Kudos

Hi

I always reward points but if you people are getting points.

Please tell how do i do it. After getting an reply I rewards points by clicking on the star option on the left side of who has given me reply but if it is not working plz tell me. How do I do it.

Regards

Mona

Former Member
0 Kudos

hI,

Check BADI : ME_GUI_PO_CUST or use the USER EXIT: MM06E005.

Sample code refer the theards

https://forums.sdn.sap.com/click.jspa?searchID=12856132&messageID=2083825

Regards

Kiran Sure

Former Member
0 Kudos

Hi

Do I have to create screen and select a button on it.

How I will do this. Please tell in detail.

mona.

Former Member
0 Kudos

Hi Mona,

YES. Definitely you have to create a sub screen for that in SE51. You should select a screen element there and activate it. I am having this example with screen shots. Give your ID I will forward it you, If u dont mind.

Recently I have developed a screen exit for ME21n transaction.

I am giving the documentation to you.

I hope it may helps you.

Check the following regarding adding custom fields in ME21n

The same applies to your requirement.

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.

I am having a document regarding screen exit. If you give your ID I will forward that to you. It is in detail with screen shots.

Reward points if useful

Just check out this and apply for your field BRGEW. Then I hope it works. I think EXIT suits your requirement.

Cheers,

Swamy Kunche

Former Member
0 Kudos

Hi Swamy

I have same requirement

I need to add a field EKKO-BRGEW on status tab.

Can u send me whatever u did for ur requirement In steps.

Regards

MOna

Former Member
0 Kudos

Hi swamy

I cannot send my adress on this I dont know why.

can u give me ur adress I will reply u back.

Regards

Mona.

0 Kudos

HI mona,

my id is : krishna529 at gmail dot com

pls send it tome.