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

Function Module

Former Member
0 Likes
395

Hi,

In a FM in ECCversion there is declaration like this:

end_column type sy-cucol default value 5.

START_COLUMN type sy-cucol default value 1.

and there is a statement in source code like this:

END_COLUMN = START_COLUMN + COLUMNS - 1.

When i am exicuting this FM i am getting error like:

The field END_COLUMN can not be changes.

How to fix this error?

Regards

1 ACCEPTED SOLUTION
Read only

dustyplanet
Active Participant
0 Likes
372

Hi,

Is END_COLUMN a parameter of the function module ? If so, it should be a CHANGING or EXPORTING parameter.

If it is a data object, it should have been declared with a DATA statement... but I have a hunch it is a parameter.

If it's not any of the above cases please provide the declaration for END_COLUMN along with the keyword used, and the exact text of the error.

Regards,

Dushyant Shetty

3 REPLIES 3
Read only

dustyplanet
Active Participant
0 Likes
373

Hi,

Is END_COLUMN a parameter of the function module ? If so, it should be a CHANGING or EXPORTING parameter.

If it is a data object, it should have been declared with a DATA statement... but I have a hunch it is a parameter.

If it's not any of the above cases please provide the declaration for END_COLUMN along with the keyword used, and the exact text of the error.

Regards,

Dushyant Shetty

Read only

0 Likes
372

Additionally, If END_COLUMN is an IMPORTING parameter and you just want to change it in code before using it, Turn on the "Pass by Value" check box in the parameter properties... and voila, the error disappears

Regards,

Dushyant Shetty

Read only

0 Likes
372

Hi ,

Thanks