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

Assignment error: Overwriting a protected field.

Former Member
0 Likes
830

Hi Experts!!

From ME22N when we Print Preview, it will refer to ENTRY_NEU subroutine in a zprogram. Now, in that I placed CLEAR ent_retco to avoid the error message - Processing routine ENTRY_NEU in program ZPROGRAM does not exist.

But this is resulting in runtime error mentioned in the subject. I see the same clear statement even in standard programs. How come, it is giving problem in my program alone?

Can somebody please help me out in solving this. I tried searching in vain.

Your help is highly appreciable.

I have even found that NAST is empty in this subroutine.

Edited by: Srinivas Kalluri on Jan 20, 2012 5:13 PM

3 REPLIES 3
Read only

Former Member
0 Likes
673

Hi,

can you paste the code where exactly the error is coming.. is it in the line "clear ent_retco"?

Thanks,

Venkatesh..

Read only

Former Member
0 Likes
673

From the transaction, it appears that SAP is calling your zprogram. What do you have configured for this output...program name and entry subroutine. Your ZPROGRAM should have the entry subroutine. However, the error that you're complaining about is common if you try to change the value of a "USING" or input field to a subroutine or function module. You can't overwrite the value. So, copy the value to a variable, do what you need with the custom variable, and use the custom inside your routine...on the other hand, if your parameter is changing or exporting, then you can overwrite the value.

Read only

Former Member
0 Likes
673

Strangely, when I placed the same CLEAR statement within an IF condition, it's working. Not sure of the exact reason why it didn't work outside.