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 ,

EVERYBODY

I AM DOING SCREEN EXIT FOR TCODE ME51N, ENHANCEMENT (MEREQ001) EXIT SAPLMEGUI , I HAVE ADDED TWO FIELDS

VALIDITY START DATE AND VALIDITY END DATE.

I HAVE CONFUSION ABOUT HOW TO EXPORT DATA ENTERED IN SUBSCREEN.

PLS HELP ME ..........

THANKS & REGARDS

SANJEEV

7 REPLIES 7

Former Member
0 Kudos

Hi

Hi ,

I guess you have extended structure CI_EBANDB to save the screen values in database.

You can use the following exits to pass data to and from subscreen -

EXIT_SAPLMEREQ_001 Export Data to Customer Subscreen for Re

EXIT_SAPLMEREQ_002 Prepare Customer Subscreen for Requisiti

EXIT_SAPLMEREQ_003 Import Data from Customer Subscreen for

You have another thread opened for the same subject. Please clsoe one of them.

Cheers

Former Member
0 Kudos

Hi,

try with this code in EXIT_SAPLMEREQ_003

  • process after input

data: ls_mereq_item type mereq_item.

*get values if PReq item exists

if not im_req_item is initial.

*read item data from system

ls_mereq_item = im_req_item->get_data( ).

*if customer field changed

if eban-zflag ne *eban-zflag.

*fill field with new value

ls_mereq_item-zflag = eban-zflag.

*set new item data to system

call method im_req_item->set_data( ls_mereq_item ).

*tell the system that there has something changed on the customer tab

EX_CHANGED = 'X'.

endif.

endif.

cheers,

Sasi

0 Kudos

Hi,

I am new to User exits and want to know how to disable fields in the subscreen using user exits in me51n, me52n and me53 n? I tried putting a breakpoint in all the components of MERE001.

thanks

0 Kudos

Hi Uma,

To disable your field in me53n. First create a PBO module of the subscreen which have your own fields. You can do it by just clicking *status--- of PBO in se51 of screen exits.

Thereafter put the following codes there

IF SY-TCODE+3(1) = '3'.

LOOP AT SCREEN.

SCREEN-INPUT = 0.

MODIFY SCREEN.

ENDLOOP.

ENDIF.

This would disable your field.

Hope this helps.

Regards

Amit

Message was edited by: amit kumar

0 Kudos

Hi amit and sasi,

Thanks for the quick response. If it is a standard transaction how can i create a pbo module? Sasi, thanks for the code. I have tried putting a break point in the user exit EXIT_SAPLMREQ_001. The control never seems to go there.

Thanks

0 Kudos

Hi,

You can put the break point in the exit. Even if u put the breakpoint it does not go to the breakpoint.

Former Member
0 Kudos

hi,

EXIT_SAPLMEREQ_001 -

Export Data to Customer Subscreen for Requisition (PBO)

*sample code write in the corresponding include

DATA: ls_mereq_item TYPE mereq_item.

  • clear eban values if no PReq item

IF im_req_item IS INITIAL.

CLEAR: *eban,

eban.

ELSE.

  • read item data from system

ls_mereq_item = im_req_item->get_data( ).

  • fill customer field with old values

eban-zflag = ls_mereq_item-zflag.

*eban-zflag = ls_mereq_item-zflag.

ENDIF.

  • Read and store activity type to chnge the field status

  • of the subscreen

IF NOT im_req_item IS INITIAL.

gf_aktyp = im_req_item->GET_ACTIVITY( ).

endif.

EXIT_SAPLMEREQ_003 Import Data from Customer Subscreen for Requisition

data: ls_mereq_item type mereq_item.

*get values if PReq item exists

if not im_req_item is initial.

*read item data from system

ls_mereq_item = im_req_item->get_data( ).

*if customer field changed

if eban-zflag ne *eban-zflag.

*fill field with new value

ls_mereq_item-zflag = eban-zflag.

*set new item data to system

call method im_req_item->set_data( ls_mereq_item ).

*tell the system that there has something changed on the customer tab

EX_CHANGED = 'X'.

endif.

endif.

cheers,

sasi