Skip to Content
0
Former Member
Jan 06, 2011 at 11:56 AM

Field Symbol Read Only

179 Views

Hi all

why is here <lf_any> read only, i can't modify it....

    
loop at ct_changed reference into ls_changed.

      concatenate co_field if_fieldname
                  into lf_field.

      assign (lf_field) to <lf_any>.
      if sy-subrc = 0.
        cl_abap_typedescr=>describe_by_data(
          exporting
            p_data      = <lf_any>
          receiving
            p_descr_ref = lrf_abap_typedescr_1
            ).

        cl_abap_typedescr=>describe_by_data(
          exporting
            p_data      = if_replace
          receiving
            p_descr_ref = lrf_abap_typedescr_2
            ).

        if lrf_abap_typedescr_1->type_kind = lrf_abap_typedescr_2->type_kind.
          replace first occurrence of if_search
                                   in <lf_any>
                                   with if_replace.
        endif.
      endif.
    endloop.