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 ME51N

Former Member
0 Kudos

hi all,

i have a requirement , in me51n me52n and me53n, user should see old material number with respect of

material number.

i have to bring in that screen with itemwise.

is there any screen exit.?

i have found this exit MEREQ001 and it is having the screen number 0014 with program SAPLMEGUI.

can anybody guide me how to go ahead?

thanks

Chandramani

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi Chandramani,

Yes you can use Enhancement MEREQ001Screen number 0014 to add custom tab in PR Item. This is a screen exit.

To meet you requirement Create a Project in CMOD and include Enhancement MEREQ001.

Then in the include structure CI_EBANDB add the requisite custom field. Then in the screen 0014 add the custom field and write your requisite code to handle the field processing in PBO and PAI modules (this is similar to module pool programming).

You can use Function Exit EXIT_SAPLMEREQ_001 to transfer data to the custom screen and you can use Function Exit EXIT_SAPLMEREQ_003 to transfer data from the custom screen so that it can be updated in the database. OOPS concept would be required to handle these Function exits.

Moreover you can use Function Exits EXIT_SAPLMEREQ_005 and EXIT_SAPLMEREQ_010 to handle user command based processing (like validating and emitting an error message to sto further processing, etc.).

Hope the above information helps.

Regards,

Abhisek.

7 REPLIES 7

Former Member
0 Kudos

Hi Chandramani,

Yes you can use Enhancement MEREQ001Screen number 0014 to add custom tab in PR Item. This is a screen exit.

To meet you requirement Create a Project in CMOD and include Enhancement MEREQ001.

Then in the include structure CI_EBANDB add the requisite custom field. Then in the screen 0014 add the custom field and write your requisite code to handle the field processing in PBO and PAI modules (this is similar to module pool programming).

You can use Function Exit EXIT_SAPLMEREQ_001 to transfer data to the custom screen and you can use Function Exit EXIT_SAPLMEREQ_003 to transfer data from the custom screen so that it can be updated in the database. OOPS concept would be required to handle these Function exits.

Moreover you can use Function Exits EXIT_SAPLMEREQ_005 and EXIT_SAPLMEREQ_010 to handle user command based processing (like validating and emitting an error message to sto further processing, etc.).

Hope the above information helps.

Regards,

Abhisek.

0 Kudos

hi abhishek, i have used EXIT_SAPLMEREQ_001

data : TP_BISMT type mara-BISMT.

data : tp_matnr type mara-matnr.

DATA: LS_ITEM TYPE MEREQ_ITEM,

LS_ITEMX TYPE MEREQ_ITEMX.

CALL METHOD IM_REQ_ITEM->GET_DATA RECEIVING RE_DATA = LS_ITEM.

select single bismt from mara into tp_bismt

where matnr = LS_ITEM-matnr.

now i have got the parameter which has to be displayed in screen.

but how to pass that parameter to this screen?

can you guide?

Edited by: chandramani kumar on Feb 2, 2009 10:33 AM

0 Kudos

Hi Chandramani,

I suppose that the you have added the custom field in table EBAN using Include structure CI_EBANDB.

Let us say that the field is "zzmatnr_new".

So in the function exit EXIT_SAPLMEREQ_001 you have to do as follows:


tables: eban.

data : TP_BISMT type mara-BISMT.
data : tp_matnr type mara-matnr.

DATA: LS_ITEM TYPE MEREQ_ITEM,
LS_ITEMX TYPE MEREQ_ITEMX.
CALL METHOD IM_REQ_ITEM->GET_DATA RECEIVING RE_DATA = LS_ITEM.


select single bismt from mara into tp_bismt
where matnr = LS_ITEM-matnr.

eban-zzmatnr_new = tp_bismt.

Hope this helps.

Regards,

Abhisek.

0 Kudos

yes the bismt i ahve added in EBAN Table. but this data how to show in screen ?

i got tp_bismt. this i have to pass on that screen, how to do?

0 Kudos

Hi Chandramani,

In the previous post I had already shown it.

At the beginning of the code declare


TABLES: eban.

Then at the end assign as follows:


eban-zzmatnr_new = tp_bismt.

Hope this helps.

Regards,

Abhisek.

0 Kudos

eban-zzmatnr_new = tp_bismt.

but how to display this zzmatnr_new in screen?

0 Kudos

Hi Chandramani,

Go to the screen layout of the custom screen. Press F6.

In Table/Field Name enter EBAN and press enter.

Select the required field and then select the Tick mark at the bottom left corner of the pop-up.

Then drop the selected field on the screen.

Activate the screen layout.

The screen field will be named EBAN-ZZMATNR_NEW.

Then in the exit EXIT_SAPLMEREQ_001 try


At the beginning of the code declare 

TABLES: eban.

Then at the end assign as follows:

eban-zzmatnr_new = tp_bismt.

Also in the exit EXIT_SAPLMEREQ_003 do as follows:


TABLES: eban.

DATA: LS_ITEM TYPE MEREQ_ITEM,
LS_ITEMX TYPE MEREQ_ITEMX.
CALL METHOD IM_REQ_ITEM->GET_DATA RECEIVING RE_DATA = LS_ITEM.

LS_ITEM-ZZMATNR_NEW = EBAN-ZZMATNR_NEW.

  CALL METHOD im_req_item->set_data
    			EXPORTING
    		im_data = ls_item.
  			ex_changed = 'X'.

This will set the data from screen field to item data.

Hope this helps.

Regards,

Abhisek.