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: 

How to add new tab in ME21N

Former Member
0 Kudos

Hi all,

My requirement is to add a new tab with customar fields in PO Item. I have created a screen through module pool and used BADI ME_GUI_PO_CUST, but can't display the tab in ME21n Screen. How to do this? Is there any coding for reference?

With regardsm

Goutam Sahoo

1 ACCEPTED SOLUTION

Former Member

Hi,

go to function group XM06 .In that go to screens .

If u want to add the tab at header level then use screen 0101.

To add a tab at line item level use screen 0111.

After adding the fields in the screen for item go to function module EXIT_SAPMM06E_016 in the same function group.

In function module EXIT_SAPMM06E_016 in export parameters there is table I_CI_EKPO which has a include structure

CI_EKPODB .add the the fields u have added on the screen in the structure CI_EKPODB so that those fields will appear in table

EKKO.after the tab appears on the screen if u want the changed value of the added field to reflect in the database use the

function module EXIT_SAPMM06E_018 .In that there is export parameter E_CI_UPDATE.Pass that value as 'X'.so that changed

value is updated in the database.

30 REPLIES 30

Former Member
0 Kudos

Hi Goutam,

Please try out the enchancement MM06E005 in CMOD.

There are numebr of exits in the is enhancement.

See if it helps you in anay way.

Thanks,

Sumit

Former Member

Hi,

go to function group XM06 .In that go to screens .

If u want to add the tab at header level then use screen 0101.

To add a tab at line item level use screen 0111.

After adding the fields in the screen for item go to function module EXIT_SAPMM06E_016 in the same function group.

In function module EXIT_SAPMM06E_016 in export parameters there is table I_CI_EKPO which has a include structure

CI_EKPODB .add the the fields u have added on the screen in the structure CI_EKPODB so that those fields will appear in table

EKKO.after the tab appears on the screen if u want the changed value of the added field to reflect in the database use the

function module EXIT_SAPMM06E_018 .In that there is export parameter E_CI_UPDATE.Pass that value as 'X'.so that changed

value is updated in the database.

0 Kudos

Dear Friend,

Instead of going for User Exit u can easily done this thing with the Help of BADI's.

1. ME_GUI_PO_CUST.

This is for Creating Customer own Screen in enjoy Purchase Order..

Details :

For getting a rough details just go to the sample code of this BADI.

For this integration u want to create a Function group with the screen that u want be in PO.

In the First method u want to append the screen . There is one parameter im_element.

In this parameter u can mention that in which part u want the screen . Means header or Item.

2. The second BADI : ME_PROCESS_PO_CUST

In this BADI u can Check the Complete PO at various Level.

Means at the Header Level ,Item Level, At the time of Save, then in the Post .

In my Last Project i had completed this Requirement. If u want more details i can share with u.

I think this can help u for the starting process.

With Regards,

Sumodh.P

0 Kudos

Dear Friend,

for doing this u want to append the EKKO table with the Zfields.

Then Create the Things that i mentioned Above.

0 Kudos

Hi Sumodh,

I don't want to add these fields to EKKO table, these are only additional information which I've to save in a ztable. But I can't display the tab at the itam level. Can u send the sample coding of the BADI ME_GUI_PO_CUST and ME_PROCESS_PO_CUST.

Thanks & regards,

Goutam Sahoo

0 Kudos

Dear Friend,

Please share ur address. If u found my last answer is helpful plz provide marks.

Regards,

Sumodh

0 Kudos

Hi Sumodh,

I've code like below in the method IF_EX_ME_GUI_PO_CUST~SUBSCRIBE , but can't display this tab.

data: ls_subscribe like line of re_subscribers.

CHECK im_application = 'PO'.

CHECK im_element = 'ITEM'.

CLEAR re_subscribers[].

ls_subscribe-name = 'SAPLZPONEWTAB'.

ls_subscribe-dynpro = '9000'.

ls_subscribe-program = 'SAPLZPONEWTAB'.

ls_subscribe-struct_name = 'ZPONEWTAB'.

ls_subscribe-label = text-001..

ls_subscribe-position = 15.

ls_subscribe-height = 7.

append ls_subscribe to re_subscribers.

Is there anything need to display this?

Regards,

Goutam Sahoo

0 Kudos

Dear Friend,

Create a Include in your Function group and paste the below code.

DATA: call_subscreen TYPE sy-dynnr, "#EC NEEDED

call_prog TYPE sy-repid, "#EC NEEDED

call_view TYPE REF TO cl_screen_view_mm, "#EC NEEDED

call_view_stack TYPE REF TO cl_screen_view_mm OCCURS 0, "#EC NEEDED

global_framework TYPE REF TO cl_framework_mm, "#EC NEEDED

global_help_view TYPE REF TO cl_screen_view_mm, "#EC NEEDED

global_help_prog TYPE sy-repid. "#EC NEEDED

----


  • FORM SET_SUBSCREEN_AND_PROG *

----


  • ........ *

----


  • --> DYNNR *

  • --> PROG *

  • --> VIEW *

  • --> TO *

  • --> CL_SCREEN_VIEW_MM *

----


FORM set_subscreen_and_prog USING dynnr TYPE sy-dynnr

prog TYPE sy-repid

view TYPE REF TO cl_screen_view_mm.

call_subscreen = dynnr.

call_prog = prog.

call_view = view.

ENDFORM. "set_subscreen_and_prog

Hope this will solve ur probs.....

With Regards,

Sumodh.P

0 Kudos

Thanks Sumodh, it's working fine.

Regards,

Goutam Sahoo

0 Kudos

Dear Friend,

Welcome.

With Regards,

Sumodh.P

Edited by: Sumodh P on Jul 16, 2009 11:32 AM

0 Kudos

Hi Sumodh,

Here is some more problem.

I can't insert the value from screen to ztable.

In display mode, these fields are shown in input mode. I've to change it in display mode.

How to solve these? Where I've to code to solve? Please help with sample code.

Regards,

Goutam Sahoo

0 Kudos

Dear friend,

After Appending the Screen in the First method did u do any thing in the other methods in that BADI.

U want to Map the fields in the MAP_DYNPRO_fields Method.

Then u want to push the values from the Business object to screen

after that u want to pass the values from the Screen to Business Object.

For these things u just create a function module.

If u find helpful plz provide me marks.

With Regards,

Sumodh.P

0 Kudos

Then about the Fields Input Mode.

Just Check the PBO of that screen. Check u have done any loop at screen.

If there is no Probs come to the BADI ME_PRCOESS_PO_CUST.

just check the method FIELDS_FOR_SELECTION.

comment the code that u wrote there and check that.

With regards,

Sumodh.P

0 Kudos

Hi Sumodh,

I've created all fm to do thsi, but no data is saved. When I click on save buttn, a information message is coming 'No data changed'.

What to do?

Regards,

Goutam Sahoo

0 Kudos

Hi Sumodh,

Nothing is happen. Still it shows no data changed.

What is the process to solve this? I've changed two BADIs according to ur steps.

With regards,

Goutam Sahoo

0 Kudos

Dear gatum,

Please paste the code of ur PBO that screen.

And the BADI's

With Regards,

Sumodh.P

0 Kudos

Sorry Sumodh,

I don't understand what you have told to do. Which code I've to paste and where? Please tell me in detail.

Regards,

Goutam Sahoo

0 Kudos

Hi sumodh,

Display problem is solved. But till now I can't insert those values into the ztable. Where I've to code for this?

Pls help. I will give you the point for this.

Regards,

Goutam Sahoo

0 Kudos

hi Goutam ,

can you please tell me how to add one tab in me21n/me22n.

please tell me it in details.

thanks

manasi

0 Kudos

I have to add a new tab in me21n/ me22n. I have done the required steps of ME_GUI_PO_CUST and hence the tab is appearing in ME23n but not in Me21n. I have to do some coding in the badi ME_PROCESS_PO_CUST in the routine fieldselectionitem. Did the same by copying the sample code. But am getting a dump. Do I have to implenment all the methods of ME_PROCESS_PO_CUST in order to bring the tab in me21n? Please help. I need urgently. pls.

0 Kudos

Hi Sumodh,

i wrote same code below

DATA: ls_subscriber LIKE LINE OF re_subscribers.

CHECK im_application = 'PO'.

CHECK im_element = 'ITEM'.

CLEAR re_subscribers[].

ls_subscriber-name = 'SUBSCREEN1'.

ls_subscriber-dynpro = '0200'.

  • ls_subscriber-program = 'SAPLMEPOBADIEX'.

ls_subscriber-program = 'SAPLMEGUI'.

ls_subscriber-struct_name = 'MEPO_BADI_STRUCT'.

  • Ls_subscriber-struct_name = 'MEPO_T_SUBSCRIBERS'.

ls_subscriber-label = 'OWN TAB'.

ls_subscriber-position = 5.

ls_subscriber-height = 9.

APPEND ls_subscriber TO re_subscribers.

but while exicuting me21n ,not showing tab.

i did not create any screen. just give screen no 200.

if i need to create this screen where i can create it?

i have same requirement same as u did 2 or 3 months back.

please help me out.

please give response

thanks

manasi

0 Kudos

Can u tell me, how to add fields in Standrad table, and structures

Waitng for ur reply

Kumar

0 Kudos

Dear,

In which Standard table u want to add the fields.

EKKO or EKPO .

u can do that by appending the structure the of those tables.

The structure for this is ci_ekpo* . i forgot just check .

ci_ekko*

Append the same fields in the structure also................

With Regards,

Sumodh.P

0 Kudos

Manasi,

How you solved the issues of tab not displayed in ME21N and ME22N. I'm i'm working on that. i'm also facing the same problem.

please share the details

Regards,

KP

0 Kudos

Hi Sumodh,

can u provide the code which u used for enhancing me23n.



Regards,

Umakant.

0 Kudos

Hi Sumodh,

I have the same problem, i am unable to display the custom tab in me21n, i have checked the same with me23n but here also my custom tab is not displayed, please check my post and reply to it:

Regards,

Siva

0 Kudos

Hi Sumodh,

I have the same problem, i am unable to display the custom tab in me21n, i have checked the same with me23n but here also my custom tab is not displayed, please check my post and reply to it:

Re: Custom tab not seen in me21n after enhancement using ME_GUI_PO_CUST

Regards,

Siva

Former Member
0 Kudos

Ignore

Ignore

Former Member
0 Kudos

Hi Sumodh and Goutam,

Its really helpful link and I also want to have additional tab in ME21n. But after every effort given in whole link i am not able get the display. may be some place i am going wrong, let me explain what i did till now

1. Appended filed in EKKO

2. Create function Group -under that

A. Created one Include u2013Paste the code given

B. Created one screen

3. Implemented BADI ME_GUI_PO_CUST and paste the code.

Please help me what s going wrong .

Former Member
0 Kudos

hi goutam,

my requirement is to add a new tab in me21n for item label.

i come to know that u have done same thing.

can you please help me out by giving some idea .

i know that i can use BADI ME_GUI_PO_CUST . but how to do it ?

please give some document for it .

if possible give your ADDRESS.

thanking you,

manasi