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

Runtime Errors MOVE_TO_LIT_NOTALLOWED_NODATA

0 Likes
1,747

I am getting this error when i perform sum in ALV on particular field.

Runtime Errors        MOVE_TO_LIT_NOTALLOWED_NODATA                                               

Date and Time          08.05.2014 04:40:38                                                         

                                                                                                   

Short text                                                                                       
    Error at assignment: Overwritten protected field.                                           

What happened?                                                                                   
    Error in the ABAP Application Program                                                       
   
    The current ABAP program "SAPLKKBL" had to be terminated because it has                     
    come across a statement that unfortunately cannot be executed.                               


What can you do?                                                                                 
    Note down which actions and inputs caused the error.                                         
   
   
    To process the problem further, contact you SAP system                                       
    administrator.                                                                               
   
    Using Transaction ST22 for ABAP Dump Analysis, you can look                                 
    at and manage termination messages, and you can also                                         
    keep them for a long time.                                                                   

Error analysis                                                                                   
    A new value is to be assigned to the field "<L_UNIT>", although this field is               
    entirely or partly protected against changes.                                               
   
    The following are protected against changes:                                                 
    - Character literals or numeric literals                                                     
    - Constants (CONSTANTS)                                                                     
    - Parameters of the category IMPORTING REFERENCE for functions and                           
    methods                                                                                     
    - Untyped field symbols not yet assigned a field using ASSIGN                               
    - TABLES parameters if the actual parameter is protected against changes                     
    - USING reference parameters and CHANGING parameters for FORMs, if the                       
    actual parameter is protected against changes and                                           
    - Accesses using field symbols if the field assigned using ASSIGN is                         
    protected (or partially protected, e.g. key components of an internal                       
    table with the type SORTED or HASHED TABLE) against changes                                 
    - Accesses using references, if the field bound to the reference is                         
    protected (or partially protected) against changes                                           
    - External write accesses to READ-ONLY attributes,                                           
    - Content of a shared object area instance accessed using a shared lock                     
    (ATTACH_FOR_READ).     
Source Code Extract                                                                             
Line SourceCde                                                                                 
2975*        IF LS_FIELDCAT-NO_OUT NE 'X'.                                                     
2976*          LFLG_SHOW = 'X'.                                                               
2977*          EXIT.                                                                           
2978*        ENDIF.                                                                           
2979*      ENDIF.                                                                             
2980*    ENDLOOP.                                                                             
2981                                                                                           
2982*  Wenn die Einheit gleichzeitig das aktuelle                                             
2983*  Zwischensummenkriterium ist                                                           
2984    if ls_dep_field-s_dep_fieldcat-fieldname =          "INS K_SUBTOTEH                   
2985                      rs_sort-fieldname. "INS K_SUBTOTEH                                   
2986*    in einer Split-Zeile nie die Einheit ausgeben,                                       
2987*    da diese in der aktuellen Zwischensumme immer                                       
2988*    homogen sein muß und deshalb schon in der ersten                                     
2989*    Zeile ausgegeben wurde                                                               
2990      if vflg_splitline = 'X'.        "INS K_SUBTOTEH                                     
2991        clear lflg_show.              "INS K_SUBTOTEH                                     
2992*    in der ersten Zeile immer die Einheit ausgeben,                                     
2993*    da diese Zwischensummenkrit. ist und deshalb                                         
2994*    auch erscheinen muß, falls keine Kennzahl diese                                     
2995*    referenziert                                                                         
2996      else.                            "INS K_SUBTOTEH                                     
2997        lflg_show = 'X'.              "INS K_SUBTOTEH                                     
2998      endif.                          "INS K_SUBTOTEH                                     
2999    endif.                            "INS K_SUBTOTEH                                     
3000                                                                                           
3001    if lflg_show is initial.                                                               
3002*    assign component <ls_dep_field>-s_dep_fieldcat-fieldname                             
3003      assign component ls_dep_field-s_dep_fieldcat-fieldname                               
3004            of structure t_outtab to <l_unit>.                                           
>>>>>      clear <l_unit>.                                                                     
3006    endif.                                                                                 
3007  endloop.                                                                                 
3008                                                                                           
3009endform.                              " SPLIT_LINE_CHECK                                 
3010*&---------------------------------------------------------------------*                   
3011*&      Form  SUM_EXPA_SINGLE_NEW                                                         
3012*&---------------------------------------------------------------------*                   
3013*      text                                                                               
3014*----------------------------------------------------------------------*                   
3015*      -->P_LFLG_KOMP  text                                                               
3016*      -->P_L_SUBRC  text                                                                 
3017*----------------------------------------------------------------------*                   
3018form sum_expa_single_new using rflg_komp type c                                           
3019                              r_subrc like sy-subrc.                                     
3020                                                                                           
3021  data: ls_levels type kkblo_sort_extend.                                                 
3022  data: ls_groups type kkblo_grouplevels.                                                 
3023  data: ls_groups_static type kkblo_grouplevels.                                           
3024  data: l_subrc like sy-subrc.

I am getting this error when i perform sum in ALV on particular field.

Runtime Errors        MOVE_TO_LIT_NOTALLOWED_NODATA                                               

Date and Time          08.05.2014 04:40:38                                                         

                                                                                                   

Short text                                                                                       
    Error at assignment: Overwritten protected field.                                           

What happened?                                                                                   
    Error in the ABAP Application Program                                                       
   
    The current ABAP program "SAPLKKBL" had to be terminated because it has                     
    come across a statement that unfortunately cannot be executed.                               


What can you do?                                                                                 
    Note down which actions and inputs caused the error.                                         
   
   
    To process the problem further, contact you SAP system                                       
    administrator.                                                                               
   
    Using Transaction ST22 for ABAP Dump Analysis, you can look                                 
    at and manage termination messages, and you can also                                         
    keep them for a long time.                                                                   

Error analysis                                                                                   
    A new value is to be assigned to the field "<L_UNIT>", although this field is               
    entirely or partly protected against changes.                                               
   
    The following are protected against changes:                                                 
    - Character literals or numeric literals                                                     
    - Constants (CONSTANTS)                                                                     
    - Parameters of the category IMPORTING REFERENCE for functions and                           
    methods                                                                                     
    - Untyped field symbols not yet assigned a field using ASSIGN                               
    - TABLES parameters if the actual parameter is protected against changes                     
    - USING reference parameters and CHANGING parameters for FORMs, if the                       
    actual parameter is protected against changes and                                           
    - Accesses using field symbols if the field assigned using ASSIGN is                         
    protected (or partially protected, e.g. key components of an internal                       
    table with the type SORTED or HASHED TABLE) against changes                                 
    - Accesses using references, if the field bound to the reference is                         
    protected (or partially protected) against changes                                           
    - External write accesses to READ-ONLY attributes,                                           
    - Content of a shared object area instance accessed using a shared lock                     
    (ATTACH_FOR_READ).     
Source Code Extract                                                                             
Line SourceCde                                                                                 
2975*        IF LS_FIELDCAT-NO_OUT NE 'X'.                                                     
2976*          LFLG_SHOW = 'X'.                                                               
2977*          EXIT.                                                                           
2978*        ENDIF.                                                                           
2979*      ENDIF.                                                                             
2980*    ENDLOOP.                                                                             
2981                                                                                           
2982*  Wenn die Einheit gleichzeitig das aktuelle                                             
2983*  Zwischensummenkriterium ist                                                           
2984    if ls_dep_field-s_dep_fieldcat-fieldname =          "INS K_SUBTOTEH                   
2985                      rs_sort-fieldname. "INS K_SUBTOTEH                                   
2986*    in einer Split-Zeile nie die Einheit ausgeben,                                       
2987*    da diese in der aktuellen Zwischensumme immer                                       
2988*    homogen sein muß und deshalb schon in der ersten                                     
2989*    Zeile ausgegeben wurde                                                               
2990      if vflg_splitline = 'X'.        "INS K_SUBTOTEH                                     
2991        clear lflg_show.              "INS K_SUBTOTEH                                     
2992*    in der ersten Zeile immer die Einheit ausgeben,                                     
2993*    da diese Zwischensummenkrit. ist und deshalb                                         
2994*    auch erscheinen muß, falls keine Kennzahl diese                                     
2995*    referenziert                                                                         
2996      else.                            "INS K_SUBTOTEH                                     
2997        lflg_show = 'X'.              "INS K_SUBTOTEH                                     
2998      endif.                          "INS K_SUBTOTEH                                     
2999    endif.                            "INS K_SUBTOTEH                                     
3000                                                                                           
3001    if lflg_show is initial.                                                               
3002*    assign component <ls_dep_field>-s_dep_fieldcat-fieldname                             
3003      assign component ls_dep_field-s_dep_fieldcat-fieldname                               
3004            of structure t_outtab to <l_unit>.                                           
>>>>>      clear <l_unit>.                                                                     
3006    endif.                                                                                 
3007  endloop.                                                                                 
3008                                                                                           
3009endform.                              " SPLIT_LINE_CHECK                                 
3010*&---------------------------------------------------------------------*                   
3011*&      Form  SUM_EXPA_SINGLE_NEW                                                         
3012*&---------------------------------------------------------------------*                   
3013*      text                                                                               
3014*----------------------------------------------------------------------*                   
3015*      -->P_LFLG_KOMP  text                                                               
3016*      -->P_L_SUBRC  text                                                                 
3017*----------------------------------------------------------------------*                   
3018form sum_expa_single_new using rflg_komp type c                                           
3019                              r_subrc like sy-subrc.                                     
3020                                                                                           
3021  data: ls_levels type kkblo_sort_extend.                                                 
3022  data: ls_groups type kkblo_grouplevels.                                                 
3023  data: ls_groups_static type kkblo_grouplevels.                                           
3024  data: l_subrc like sy-subrc.
1 REPLY 1
Read only

former_member183804
Active Contributor
0 Likes
1,194

Hello Zia,

line 3002 is the key to the issue you have experienced:

*    assign component <ls_dep_field>-s_dep_fieldcat-fieldname                             

The component of a structure field-symbols get assigned to a 2nd field-symbol. The structure field-symbols is most likely assigned to a line of an internal table. This internal table is possibly an importing parameter (not changable) or the table is of kind sorted/hased and the structure component part of the table key.

Hope this helps

  Klaus