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: 

Screen Exit for ME31L - Very Urgent Plzzzz

Former Member
0 Kudos

Hi All,

I have a new requirement in which I need to add a field EKPO- WEORA as a checkbox in the Schedule Agreement ( Item details tab u2013 in the block GR/IR Control u2013 under the checkbox Unlimited u2013 Screen 0211) and based on it has to write some logic. First of all I need to figure out how to add this field in the Standard Transaction ME31L/32L/33L.

I read several articles posted in this forum and with its help I could find out that I can use the enhancement MM06E005 and in that my screen area would be SAPMM06E_0211_CUSTSCR1_SAPLXM06_0211.

But I am not getting any idea how to proceed further. I read that we need to create a subscreen and add our fields and attach it to standard SAP screen but in my case as its only one extra field which is also EKP-WEORA, do I need to design any subscreen or can I add in the existing one and also please let me know how I should do it.

Thanks in advance for all your help!

Please consider this as Urgent.

Regards,

Ameesha

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi Ameesha,

Recently I have implemented one screen exit for ME21n transaction. You are saying that already you have added fields for the includes. So, You need to develop dynpro program.

You should go to SE51 and develop there dynpro program. Create layout by getting your fields from includes of standard tables. Activate it.

You should go to CMOD and create project, one imp thing is here you will selecting an exit that suits your requirement.

When you select exit and go for components there you will be finding the function module exits and screen areas. Unless and until screen areas provided you cannot implement screen exit for that transaction.

You should write your logic in relevant function module exit. You should check the parameters in it to pass the screen field values to that structure of your exit.

This is how you populate data into the database tables from screen fields.

For your clear understanding you give your ID, I will give you all the details and provide you the necessary documentation for ME21n. Then I think it will be easy for you.

Reward points if useful

Cheers,

Swamy Kunche

9 REPLIES 9

jj
Active Contributor
0 Kudos

if you see the enhancement -components of

MM06E005 in tcode SMOD.

You can find the screens.

In CMOD. you create a new enhancement project.

Add MM06E005 enhancement there

then

You include this new fields in the CI _Incude of the std table

in tcode se11.

and

also add the field in the screen .

Then activate the project.

jj
Active Contributor
0 Kudos

If already the screen enhancement is done. You can use the same subscreen or else create and then proceed

Former Member
0 Kudos

Thanks for replying back but I don't need to add my field to any table as it's already existing one. It's WEORA field from EKPO table. So what I want to know is how do I add this field as a checkbox in the ME31L screen and where to write the logic for it. More details of this question is in the start of this thread.I have already searched the screen exit for this but want to know how to proceed.

Points will be rewarded for sure!

Thanks and Regards

Ameesha

Former Member

Former Member
0 Kudos

Hi Ammeesha,

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.

Reward points if useful.

Thanks ,

Surya Pydikondala.

0 Kudos

Thanks a lot Surya. But could you plz let me knw the following:

As you mentioned that you had some custom field to be designed in the ME21N header segment so did you create a separate subscreen for that? As for my requirement I need to add it in the same existing BOX so wanted to know if thatu2019s possible without creating a new subscreen.

Best Regards,

Ameesha

0 Kudos

Hi Ammesha ,

In the earlier mail , I did not mention about the creation of subscreen.

I think u have seen the exit MM06E005

In that components u can see the tab "screen areas" in which we have the "calling screen" and the "called screen"

The called screen needs to be created with the same name .

i.e if you are adding header fields u need an header screen ,

therefore goto SE51 and create a "subscreen" with name "SAPLXM06" and with screen no "0101".

Similarly for the reamining u have to create if you are using them or not.

I am pasting a part of the documentation of it which gives you a clear picture

Dynpro areas

If you use the enhancement, you must create and generate the following dynpros (even if the dynpros are not going to be used):

o SAPLXM06 0101 Subscreen header purchase order

o SAPLXM06 0201 Subscreen header outline agreement

o SAPLXM06 0301 Subscreen header RFQ

o SAPLXM06 0111 Subscreen item purchase order

o SAPLXM06 0211 Subscreen item outline agreement

o SAPLXM06 0311 Subscreen item RFQ

You must identify all dynpros as subscreens. It is not necessary that they contain fields, but it is essential that they exist in order that no program abend occurs.

So create all the subscreens and then populate ur field.

Read the documentation of that customer exits which gives you an clear picture.

Revert back for any further queries.

Thanks,

Surya Pydikondala.

Former Member
0 Kudos

Hi Ameesha,

Recently I have implemented one screen exit for ME21n transaction. You are saying that already you have added fields for the includes. So, You need to develop dynpro program.

You should go to SE51 and develop there dynpro program. Create layout by getting your fields from includes of standard tables. Activate it.

You should go to CMOD and create project, one imp thing is here you will selecting an exit that suits your requirement.

When you select exit and go for components there you will be finding the function module exits and screen areas. Unless and until screen areas provided you cannot implement screen exit for that transaction.

You should write your logic in relevant function module exit. You should check the parameters in it to pass the screen field values to that structure of your exit.

This is how you populate data into the database tables from screen fields.

For your clear understanding you give your ID, I will give you all the details and provide you the necessary documentation for ME21n. Then I think it will be easy for you.

Reward points if useful

Cheers,

Swamy Kunche

0 Kudos

Hi Ameesha,

You can use the screen exit SAPMM06E_0211_CUSTSCR1_SAPLXM06_0211 for the enhancement MM06E005.

Also youcan make use of function module EXIT_SAPMM06E_018.

Here provided documentation shows that

Import data from customer subscreen for item

Here when you observe changing parameters there you call pass your screen field value i.e., EKPO-WEORA to

CHANGING

*" VALUE(E_CI_EKPO) LIKE EKPO_CI STRUCTURE EKPO_CI OPTIONAL

So, when you observe the documentation I have send, you can pass your screen field value to E_CI_EKPO.

Thanks,

Swamy Kunche

Then you can populate your data into the database table EKPO.

Reward points if useful