Skip to Content
0
Former Member
Jul 27, 2010 at 03:23 AM

REUSE_ALV_LIST_DISPLAY' Field symbol has not yet been assigned.

45 Views

Hi Dear All.

My ALV is working well when the internal table is initial,

but if i assign some vale to internal table, it raises short dump...

You attempted to access an unassigned field symbol

(data segment 92).

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.

===================================================

I've checked my fieldcatlog and table sturcture.

and no sort table , no filterr table.

Did i miss something ?

Thank you all

===================================================

DATA : BEGIN OF tmp_list OCCURS 0,
aedat       LIKE ekko-aedat,
ebeln       LIKE ekko-ebeln,
ekgrp       LIKE ekko-ekgrp,
ebelp       LIKE ekpo-ebelp,
lifnr         LIKE ekko-lifnr,
eq_eindt     LIKE ekko-eq_eindt,
matnr      LIKE ekpo-matnr,
matkl       LIKE ekpo-matkl,
maktx     LIKE makt-maktx,
menge    LIKE ekpo-menge,
deli_menge   LIKE ekbe-menge,
undeli_menge LIKE ekbe-menge,
103_rate     TYPE p LENGTH 4 DECIMALS 2,
wm_menge     LIKE ekbe-menge,
unwm_menge   LIKE ekbe-menge,
105_rate     TYPE p LENGTH 4 DECIMALS 2,
        END OF tmp_list.
DATA: t_list LIKE tmp_list OCCURS 0 WITH HEADER LINE.


FORM fieldcat_init.
  DATA: st_fieldcat TYPE slis_fieldcat_alv,
        tabname     LIKE st_fieldcat-tabname,
        fieldname   LIKE st_fieldcat-fieldname,
        seltext_l   LIKE st_fieldcat-seltext_l,
        outputlen   LIKE st_fieldcat-outputlen,
        key         LIKE st_fieldcat-key,
        cfieldname  LIKE st_fieldcat-cfieldname.
  cls gt_fieldcat.
  DEFINE st_fieldcat.
    move: &1 to fieldname, &2 to seltext_l, &3 to outputlen,
          &4 to key,       &5 to cfieldname.
    call method class->fieldcat_init
      exporting
        tabname     = tabname
        fieldname   = fieldname
        seltext_l   = seltext_l
        outputlen   = outputlen
        key         = key
        cfieldname  = cfieldname
      changing
        gt_fieldcat = gt_fieldcat.
  END-OF-DEFINITION.
tabname = 't_list' .
  st_fieldcat:
'aedat'          text-001 15 '' '',
'ebeln'          text-001 15 '' '',
'ekgrp'           text-001 15 '' '',
'ebelp'          text-001 15 '' '',
'lifnr'            text-001 15 '' '',
'eq_eindt'    text-001 15 '' '',
'matnr'         text-001 15 '' '',
'matkl'         text-001 15 '' '',
'maktx'        text-001 15 '' '',
'menge'        text-001 15 '' '' ,
'deli_menge'  text-001 15 '' '',
'undeli_menge' text-001 15 '' '',
'103_rate'    text-001 15 '' '' ,
'wm_menge'   text-001 15 '' '' ,
'unwm_menge'  text-001 15 '' '' ,
'105_rate'    text-001 15 '' ''.

ENDFORM.                    "fieldcat_init

 CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
    EXPORTING
      i_callback_program       = g_repid
      is_layout                = layout
      it_fieldcat              = gt_fieldcat[]
      it_sort                  = gt_sortinfo[]
      it_events                = gt_events
      i_default                = 'X'
      i_save                   = 'X'
      is_variant               = g_variant
    TABLES
      t_outtab                 = t_list
    EXCEPTIONS
      program_error            = 1
      OTHERS                   = 2.
  IF sy-subrc <> 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
  ENDIF.