cancel
Showing results for 
Search instead for 
Did you mean: 

" Assignment error: Overwriting a protected field".

Former Member
0 Kudos

<b>Requirement:</b> We have to populate time-characteristic field(cal quarter) based on fiscal period in the planning layout.

<b>Effort:</b>Formula doesn't seem to help as it doesn't give ability to manipulate character strings. So we tried with user exit. In user exit when tried to populate field fiscal quarter based on fiscal period, we're getting error" Assignment error: Overwriting a protected field". It seems like key figures can be manipulated without this problem but not characteristics , as modifying xth_data table is failing. Also couldn't find any example given by SAP under function group UPFX.

Did anybody face this problem or any suggestions?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

I think you are trying to change the values directly in XTH_DATA, which is not possible as XTH_DATA is a hashed internal table with all the characteristics as key fields. You will have to take all the entries from the table into another internal table defined in the function module perform the required operation (changes to values) pass the entries back to XTH_DATA

XTH_DATA = internal table.

let me know if this was helpful..

thanks

Answers (2)

Answers (2)

Former Member
0 Kudos

You might want to check into a characteristic relationship exit using the function module UPX_DATES_DERIVE.

Hope this helps,

Mary

Former Member
0 Kudos

Hi,

You must use the following instruction

ASSIGN COMPONENT 'S_CHAS-0COSTCENTER' OF STRUCTURE <fsl_wa> TO <fsl_costcenter>

<b>CASTING TYPE /bi0/oicostcenter</b>.

If you do, then the data can be modified.

Regards

Laurent