Application Development and Automation 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: 
Read only

exit code

Former Member
0 Likes
682

I am using filed exit for unloading point in purchase requisition.

code is something like this..

If sy-tcode = 'ME51N' or sy-tcode = 'ME52N'

....

if cond1

message error.

endif.

....

endif.

If we are changing purchase requisition using display/change in ME53n then sy-tcode = 'ME53N'. Still error message displays when saving Purchase Requisition?

Any ideas...

Thanks in advance

Srinivas.

4 REPLIES 4
Read only

Former Member
0 Likes
623

Hi,

Change is only possible in ME52N. When You are clicking Change in ME53N, then sy-tcode will be changing to ME52N. Hence your field exit is getting triggered and error message is shown. If you are navigating to different screens in ME53N then you will not get any error message. Try.

thanks,

sksingh

Read only

Former Member
0 Likes
622

Hi

I don't know which exit u're using, but you should check the activity (insert/change or display) and not the trx code.

The trx code doesn't change if it goes to changing mode from display mode.

Max

Read only

0 Likes
622

Thanks for the replies,

Yes. The tcode still remais ME53N even in change mode but the validation is still done and displayed error message.

I am changing the exisitng filed exit FIELD_EXIT_ABLAD. Unfortunately we can't debug filed exits. I have written field values to file using TRANSFER on application server. I am sure the control has not entered this part of code still displaying error message..

Thanks,

Stinivas

Read only

Former Member
0 Likes
622

Hi Srinivas,

keep a breakpoint in the exit and check the tcode there... it will be ME52N only...

This is because ur initial using the tcode ME53N but then you are seleting the 'Change' option from menu... internally it call the tcode MD52N.

Regards,

Satya.