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

FCODE_TC_MARK_LINES - Tablecontrol

Former Member
0 Likes
443

I have this part of standard code on a TableControl:

<i>FORM FCODE_TC_MARK_LINES USING P_TC_NAME

P_TABLE_NAME

P_MARK_NAME.

&SPWIZARD: EGIN OF LOCAL DATA----


DATA L_TABLE_NAME LIKE FELD-NAME.

FIELD-SYMBOLS <TC> TYPE cxtab_control.

FIELD-SYMBOLS <TABLE> TYPE STANDARD TABLE.

FIELD-SYMBOLS <WA>.

FIELD-SYMBOLS <MARK_FIELD>.

&SPWIZARD: END OF LOCAL DATA----


ASSIGN (P_TC_NAME) TO <TC>.

*&SPWIZARD: get the table, which belongs to the tc *

CONCATENATE P_TABLE_NAME '[]' INTO L_TABLE_NAME. "table body

ASSIGN (L_TABLE_NAME) TO <TABLE>. "not headerline

*&SPWIZARD: mark all filled lines *

LOOP AT <TABLE> ASSIGNING <WA>.

*&SPWIZARD: access to the component 'FLAG' of the table header *

ASSIGN COMPONENT P_MARK_NAME OF STRUCTURE <WA> TO <MARK_FIELD>.

<MARK_FIELD> = 'X'.</i>

But when I execute , I m position in the second register of the tablecontrol and i press the button ():

<i>WHEN 'MARK'. "mark all filled lines

PERFORM FCODE_TC_MARK_LINES USING P_TC_NAME

P_TABLE_NAME

P_MARK_NAME .</i>

and error appears:

<i>

The program tried to assign a new value to a field even though

it is protected against changes.

The following objects are protected:

- Character or numeric literals,

- Constants (CONSTANTS),

- Function module and method parameters with the type IMPORTING

REFERENCE,

- Untyped field symbols to which a field has not yet been assigned

using ASSIGN,

- TABLES parameters, if the corresponding actual parameter is protected

against changes,

- USING reference parameters and CHANGING parameters in subroutines, if

the

actual parameter is protected against changes,

- Field symbols, if the field assigned using ASSIGN is protected against

changes,

- External write access to attributes with the READ-ONLY property,

- Key components of lines of internal tables with the type HASHED or

SORTED TABLE.

Notas para corregir errores

The field you want to overwrite is a parameter or a field symbol:

Declare the parameter as a VALUE parameter or pass an auxiliary field

to which you assigned the value from the constant before the call.

Alternatively, you can assign the auxiliary field to the field symbol

instead of the constant.

If the error occurred in one of your own programs or in an SAP program

that you modified, try to correct it yourself.

You may able to find an interim solution to the problem

in the SAP note system. If you have access to the note system yourself,

use the following search criteria:</i>

somebody knows what happends? is standard!

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
370

Hi

It is a SAP System bug.

Better to raise an Customer message with SAP.

Hope this will help.

Please reward suitable points.

Regards

- Atul

1 REPLY 1
Read only

Former Member
0 Likes
371

Hi

It is a SAP System bug.

Better to raise an Customer message with SAP.

Hope this will help.

Please reward suitable points.

Regards

- Atul