Application Development 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: 

strange error

Former Member
0 Kudos

Dear Experts,

I get the error message when I try to

APPEND wa_nr_inc TO it_nr_inc. Have you any Idea why ?

Field symbol has not yet been assigned.

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

rror analysis
   You attempted to access an unassigned field symbol
   (data segment 32821).

   This error may occur if
   - You address a typed field symbol before it has been set with
     ASSIGN
   - You address a field symbol that pointed to the line of an
     internal table that was deleted
   - You address a field symbol that was previously reset using
     UNASSIGN or that pointed to a local field that no
     longer exists
   - You address a global function interface, although the
     respective function module is not active - that is, is
     not in the list of active calls. The list of active calls
     can be taken from this short dump.

TYPES: BEGIN OF ty_nr_inc,
 gb(40) type n,
 pn(10) type c,
 zf   type i,
 df   type i,
 vf   type i,
 mf   type i,
 ext  type i,
END OF   ty_nr_inc.

data: it_nr_inc type ty_nr_inc occurs 0 .
 data: wa_nr_inc type ty_nr_inc.

wa_nr_inc-gb       =  111  .
 wa_nr_inc-pn       =  111.
 wa_nr_inc-zf       =   111 .
 wa_nr_inc-df       =   111 .
 wa_nr_inc-vf       =    111.
 wa_nr_inc-mf      =   111 .
 wa_nr_inc-ext      =   111.
 APPEND wa_nr_inc TO it_nr_inc.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

May be there is a mismatch between the table header and field catalog.

Correct the field catalog to have the same header as internal table.

Regards

Kannaiah

7 REPLIES 7

Sm1tje
Active Contributor
0 Kudos

seems to me your are accessing a field symbol somewhere in the code, which is not yet assigned. Don't think error is in the coding you gave us.

Former Member
0 Kudos

Hi,

I did the same in a test program. It worked fine.

If you have declared the TYPES in another include, check if that include is active.

Otherwise , there is not any problem with this code.

Check one more thing in your program.

Whereever u are using fieldsymbol.

CHECK <FILED SYMBOL NAME> IS ASSIGNED.

Former Member
0 Kudos

I have checked all includes.

I dont' t use any field symbols in my code.

Mybe there is a problem with field catalog or ALV Grid

problem

Former Member
0 Kudos

Further Error Messages:

Trigger Location of Runtime Error
    Program                                 SAPLSLVC
    Include                                 LSLVCF36
    Row                                     3.231
    Module type                             (FORM)
    Module Name                             FILL_DATA_TABLE


                              alv_style_align_center_top.
        endif.

        append ls_lvc_data to ct_lvc_data.
      endif.

************************************
* Column per Fieldcat Entry
************************************
      loop at it_fcat_local assigning <ls_fcat>.
        clear: ls_lvc_data-href_hndl,
               ls_lvc_data-drdn_hndl,
               ls_lvc_data-style,
               ls_lvc_data-style2,
               ls_lvc_data-style3,
               ls_lvc_data-style4,
               ls_lvc_data-maxlen.

        clear: lt_color_lvc, lt_color_slis.

        add 1 to ls_lvc_data-col_pos.

        if not <ls_fcat>-indx_field is initial.
          assign component <ls_fcat>-indx_field

        clear: lt_color_lvc, lt_color_slis.

        add 1 to ls_lvc_data-col_pos.

        if not <ls_fcat>-indx_field is initial.
          assign component <ls_fcat>-indx_field
                           of structure <ls_data> to <l_field_value>.
        else.
          assign component <ls_fcat>-fieldname
                           of structure <ls_data> to <l_field_value>.
        endif.

        macro_cell_data_get
          <ls_fcat>
          <ls_data>
          <l_field_value>
          ls_lvc_data-value.

*>>> new API
        if ir_salv_adapter is bound.
          clear ls_lvc_data-style.

* color
          if g_gui_type ne 1.
            if <ls_fcat>-key eq abap_true.
              ls_lvc_data-style = alv_style_color_int_key.
            elseif l_style_color is initial
                  and ( <ls_fcat>-emphasize is initial or
                        <ls_fcat>-emphasize = '$' ).
              if <ls_stin>-counter is initial.
                ls_lvc_data-style = alv_style_color_normal.
              else.

0 Kudos

Indeed Erdem, looks like an error in the fieldcat. However, since you haven't supplied that part of the coding, we can't tell what the exact error is. Maybe you are not filling the fieldcat correctly...???

Former Member
0 Kudos

Hi,

May be there is a mismatch between the table header and field catalog.

Correct the field catalog to have the same header as internal table.

Regards

Kannaiah

0 Kudos

Hi Kannaiah,

I am having the similar problem ... I am able to connect to the DB and view the tables, but when i click on button " Display table content " then it throws an dump.

"GETWA_NOT_ASSIGNED" " "

"SAPLSLVC" or "LSLVCF36"

"FILL_DATA_TABLE"

Request you to share how do i solve it?

Thanks & Regards,

Anup