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: 

Field Checking while Pressing Save button in ME51N

Former Member
0 Kudos

I have successfully implemented Screen Exit for MEREQ001 and add new customer field in CI_EBANDB.

everything is working fine but i need a extra checking when user press the save button to save the PR in ME51N

ME51N should prompt user to enter a mandatory field added in CI_EBANDB without click on Screen 0111.

Is there any suitable Enchanment spot or user exit to do that?

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi

Try to use the exit EXIT_SAPLMEREQ_008 (belongs to enhancement MEREQ001you're using)

Max

7 REPLIES 7

Former Member
0 Kudos

Hi

Try to use the exit EXIT_SAPLMEREQ_008 (belongs to enhancement MEREQ001you're using)

Max

0 Kudos

Hi Max,

Thanks for ur reply

i added following codes to EXIT_SAPLMEREQ_008


DATA: wa_eban TYPE ueban.

LOOP AT im_eban_changes INTO wa_eban.
  IF wa_eban-zreason IS INITIAL.
    MESSAGE e000(0k) WITH 'Please Enter Request Reason'.
  ENDIF.
ENDLOOP.

it does prompt me for the field checking message, but it will nvr allow me to go to the screen to put in the value

is like a endless prompt message, what should i do?

0 Kudos

Hi

Try to raise the exception FAILED, u can also try to use the exit 010.

The exit 008 is triggered just before posting the document so perhaps it's too late to do the control, u can try to use the exit 010.

Max

Former Member
0 Kudos

Hi,

Well if the field is on the customer subscreen why dont you make that field mandatory so the user would not be able to navigate away from the screen unless the field is filled.

Also to check customer data you should be using EXIT_SAPLMEREQ_010- Check Customer's Own PReq Data (General)

Regards,

Himanshu

0 Kudos

Hi Himanshu,

Thanks for your reply.

I understood ur meaning, in fact i already put the field as Mandatory.

But there is scenario where the user Enter T-code ME51N, and they nvr navigate the subscreen 0111, system will nvr prompt user to enter the mandatory field when they press Save button, and PR created successfully...

Tat is my problem bro...

0 Kudos

Hi Lai.

U can use the badi ME_PROCESS_REQ_CUST.

In this badi u implement the badi and use the method check.

as u can say the sample code

data: l_item_list type mmpur_requisition_items,

l_item type mmpur_requisition_item.

data: ls_header type mereq_header,

l_item_akt type mereq_item.

l_item_list = im_header->get_items( ).

loop at l_item_list into l_item.

" Get Items

l_item_akt = l_item-item->get_data( ).

if l_item_akt-zzusr01 is initial.

message 'Please enter your enhanced field u can give here in your enhanced tab u can give ' type 'E'.

endif.

Note : Here zzusr01 is the filed wht u extended in the eban .

Then wht system will do when they save or check the PR , One popup will come with the error as u write.

Regards

Rajendra

Former Member
0 Kudos

Hi Lai,

Can u Pls Provide the code which you have implemented in the enhancement MEREQ001. That will help me a lot. As i have the same requirement .

Thanks in advance.

prakash