Skip to Content
avatar image
Former Member

hi everyone!

I am calling the function REUSE_ALV_GRID_DISPLAY but it ends to a dump. The error coming is "Field symbol has not yet been assigned" but I initializated all the parameters exported by the function.

<b>The termination occurred in the ABAP program "SAPLSLVC" in "FILL_DATA_TABLE".

The main program was "ZPRREPIM06 ".

The termination occurred in line 3157 of the source code of the (Include)

program "LSLVCF36"

of the source code of program "LSLVCF36" (when calling the editor 31570). </b>

<b>>>>>> macro_cell_data_get

3158 <ls_fcat>

3159 <ls_data>

3160 <l_field_value>

3161 ls_lvc_data-value.

3162

3163 *>>> new API

3164 if ir_salv_adapter is bound.

3165 clear ls_lvc_data-style. </b>

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • avatar image
    Former Member
    Aug 17, 2007 at 10:48 AM

    Hi Nisha,

    Can help if you can send the code for the call to function module ALV_grid....

    and also the parameters type which you have passed to its interface.

    Because that can only be the reason of it resulting in a dump.

    Ensure the types which you have passed and which the function module expects are the same.

    regards,

    Vikas

    Reward all useful answers.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Thanks a lot!!

      REPORT ZPRREPIM06 NO STANDARD PAGE HEADING LINE-SIZE 300.

      ************************************************************************

      *Definición de tablas del sistema

      ************************************************************************

      TABLES: ZTBNET_TRANSACT, "Tabla con las referencias y si estan o no activadas

      ekko,

      ekbe,

      ekpo.

      ************************************************************************

      *Definición de variables

      ************************************************************************

      *DATA: D_XXXXX, "descripción

      • D_YYYYY. "descripción

      ************************************************************************

      *Definición de estructuras

      ************************************************************************

      • Definición de la estructura

      *DATA: BEGIN OF R_XXXXXXXX,

      • YYYYYYY, "descripción

      • XXXXXXX, "descripción

      data: begin of t_alv occurs 0,

      ebeln1 like ekbe-ebeln,

      ebelp1 like ekbe-ebelp,

      ebeln2 like ekbe-ebeln,

      ebelp2 like ekbe-ebelp,

      vgabe like ekbe-vgabe,

      bwart1 like ekbe-bwart,

      menge1 like ekbe-menge,

      bwart2 like ekbe-bwart,

      menge2 like ekbe-menge,

      menge161 like ekpo-menge,

      menge101 like ekpo-menge,

      end of t_alv.

      • END OF R_XXXXXXXX.

      ************************************************************************

      *Definición de tablas internas

      ************************************************************************

      *Definición de la tabla interna

      data: begin of i_ztbnet_transact occurs 0.

      include structure ztbnet_transact.

      data: end of i_ztbnet_transact.

      data: begin of i_ekko occurs 0,

      ebeln like ekko-ebeln,

      unsez like ekko-unsez,

      end of i_ekko.

      data: begin of i_ekbe occurs 0,

      ebeln like ekbe-ebeln,

      ebelp like ekbe-ebelp,

      vgabe like ekbe-vgabe,

      bwart like ekbe-bwart,

      menge like ekbe-menge,

      end of i_ekbe.

      data: begin of i_ekpo occurs 0,

      ebeln like ekpo-ebeln,

      ebelp like ekpo-ebelp,

      menge like ekpo-menge,

      end of i_ekpo.

      *&----


      *

      *& DEFINICION DE TABLAS Y ESTRUCTURAS NECESARIAS ALV

      *&----


      *

      • Type Pool donde vienen definidas todas las estructuras y tablas

      TYPE-POOLS: slis.

      • Catálogo de campos: contiene la descripción de los campos de salida

      DATA: gt_fieldcat TYPE slis_t_fieldcat_alv WITH HEADER LINE,

      gt_sort TYPE slis_t_sortinfo_alv WITH HEADER LINE,

      • Especificaciones de la disposición de la lista: descripción de la

      • estructura de salida

      gs_layout TYPE slis_layout_alv,

      gt_list_top_of_page TYPE slis_t_listheader,

      gt_events TYPE slis_t_event,

      • gt_sort type slis_t_sortinfo_alv,

      ls_vari TYPE disvariant,

      g_repid LIKE sy-repid.

      • Tabla de excluir funciones

      DATA: gt_exclude TYPE slis_t_extab WITH HEADER LINE.

      ***********************************************************

      **Definición de estructuras para la ventana con los ratios

      ***********************************************************

      DATA: lt_fieldcat TYPE slis_t_fieldcat_alv WITH HEADER LINE.

      • ls_sort TYPE slis_t_sortinfo_alv WITH HEADER LINE,

      *

      • Especificaciones de la disposición de la lista: descripción de la

      • estructura de salida

    • ls_layout TYPE slis_layout_alv,

    • ls_list_top_of_page TYPE slis_t_listheader,

    • ls_events TYPE slis_t_event,

      • ls_sort type slis_t_sortinfo_alv,

      • ls_vari TYPE disvariant,

    • ls_repid LIKE sy-repid.

    • DATA: l_tabname TYPE slis_tabname.

      • LS_SELFIELD TYPE KKBLO_SELFIELD.

      • LT_FIELDCAT TYPE KKBLO_T_FIELDCAT,

      ************************************************************************

      *Definición de pantalla de selección

      ************************************************************************

      *SELECTION-SCREEN: XXXXXX. "descripción

      SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.

      PARAMETERS p_fecha TYPE ztbnet_transact-fecha OBLIGATORY. "descripción

      select-options: s_ref for ztbnet_transact-referencia,

      s_origen for ztbnet_transact-tienda,

      s_destin for ztbnet_transact-destino.

      SELECTION-SCREEN END OF BLOCK b1.

      ************************************************************************

      • LOGICA DEL PROGRAMA

      ************************************************************************

      ************************************************************************

      *Definición de inicializaciones

      ************************************************************************

      INITIALIZATION.

      ************************************************************************

      *Proceso principal

      ************************************************************************

      START-OF-SELECTION.

      • Seleccionamos los datos segun los parametros de entrada

      select * appending corresponding fields of table i_ztbnet_transact

      from ztbnet_transact

      where fecha = p_fecha

      and referencia in s_ref

      and tienda in s_origen

      and destino in s_destin

      and activado eq 'X'

      and ejecutado eq 'X'.

      • Con el campo referencia seleccionamos el nº pedido (ebeln) y tda.destino (unsez)

      select * appending corresponding fields of table i_ekko

      from ekko

      for all entries in i_ztbnet_transact

      where ihrez = i_ztbnet_transact-referencia.

      • Con el pedido seleccionamos bwart y menge

      select * appending corresponding fields of table i_ekbe

      from ekbe

      for all entries in i_ekko

      where ebeln eq i_ekko-ebeln.

      • Seleccionamos datos de pedido origen y generado para comparar cantidades

      select * appending corresponding fields of table i_ekpo

      from ekpo

      for all entries in i_ekbe

      where ebeln eq i_ekbe-ebeln.

      sort i_ekbe by ebeln ebelp vgabe.

      loop at i_ekbe.

      read table i_ekko with key ebeln = i_ekbe-ebeln.

      if sy-subrc eq 0.

      if i_ekko-unsez(1) eq '1'.

      t_alv-ebeln1 = i_ekbe-ebeln.

      t_alv-ebelp1 = i_ekbe-ebelp.

      t_alv-vgabe = i_ekbe-vgabe.

      t_alv-bwart1 = i_ekbe-bwart.

      t_alv-menge1 = i_ekbe-menge.

      append t_alv.

      clear t_alv.

      elseif i_ekko-unsez(1) eq '9'.

      read table t_alv with key ebeln1 = i_ekko-unsez

      ebelp1 = i_ekbe-ebelp

      vgabe = i_ekbe-vgabe.

      if sy-subrc eq 0.

      t_alv-ebeln2 = i_ekbe-ebeln.

      t_alv-ebelp2 = i_ekbe-ebelp.

      t_alv-bwart2 = i_ekbe-bwart.

      t_alv-menge2 = i_ekbe-menge.

      modify t_alv index sy-tabix.

      clear t_alv.

      endif.

      endif.

      endif.

      endloop.

      sort i_ekpo by ebeln ebelp.

      loop at i_ekpo.

      read table i_ekko with key ebeln = i_ekpo-ebeln.

      if sy-subrc eq 0.

      if i_ekko-unsez(1) eq '1'.

      read table t_alv with key ebeln1 = i_ekpo-ebeln

      ebelp1 = i_ekpo-ebelp.

      if sy-subrc eq 0.

      t_alv-menge161 = i_ekpo-menge.

      modify t_alv index sy-tabix.

      clear t_alv.

      endif.

      elseif i_ekko-unsez(1) eq '9'.

      read table t_alv with key ebeln1 = i_ekko-unsez

      ebelp1 = i_ekpo-ebelp.

      if sy-subrc eq 0.

      t_alv-menge101 = i_ekpo-menge.

      modify t_alv index sy-tabix.

      clear t_alv.

      endif.

      endif.

      endif.

      endloop.

      perform init_fieldcat.

      perform mostrar_alv_01.

      ***********************************************************************

      *Acciones de final de proceso

      ************************************************************************

      END-OF-SELECTION.

      ************************************************************************

      *Definición de cabeceras del listado

      ************************************************************************

      TOP-OF-PAGE.

      ************************************************************************

      *Definición de lineas de pie de listado

      ************************************************************************

      END-OF-PAGE.

      ************************************************************************

      *Definición de acciones por doble click

      ************************************************************************

      AT LINE-SELECTION.

      ************************************************************************

      *Definición y control de acciones a tomar según entrada del usuario

      ************************************************************************

      AT USER-COMMAND.

      ************************************************************************

      *Definición y control de acciones a tomar según la tecla de función

      ************************************************************************

      AT PFN.

      ************************************************************************

      *Validaciones de los parámetros de entrada

      ************************************************************************

      AT SELECTION-SCREEN.

      ************************************************************************

      • FORMS ADICIONALES

      ************************************************************************

      *&----


      *

      *& Form init_fieldcat

      *&----


      *

      • text

      *----


      *

      FORM init_fieldcat.

      REFRESH: gt_fieldcat.

      • nombre del Programa

      g_repid = sy-repid.

      • Mediante esta tabla vamos a definir los campos que queremos mostrar

      • en el listado de salida.

      SORT t_alv BY ebeln1 ebelp1.

      • PEDIDOS

      gt_fieldcat-tabname = 'T_ALV'.

      gt_fieldcat-fieldname = 'EBELN'.

      gt_fieldcat-seltext_l = 'PEDIDO1'.

      APPEND gt_fieldcat. CLEAR gt_fieldcat.

      • POSICION

      gt_fieldcat-tabname = 'T_ALV'.

      gt_fieldcat-fieldname = 'EBELP'.

      gt_fieldcat-seltext_l = 'POSICION1'.

      APPEND gt_fieldcat. CLEAR gt_fieldcat.

      • PEDIDOS

      gt_fieldcat-tabname = 'T_ALV'.

      gt_fieldcat-fieldname = 'EBELN'.

      gt_fieldcat-seltext_l = 'PEDIDO2'.

      APPEND gt_fieldcat. CLEAR gt_fieldcat.

      • POSICION

      gt_fieldcat-tabname = 'T_ALV'.

      gt_fieldcat-fieldname = 'EBELP'.

      gt_fieldcat-seltext_l = 'POSICION2'.

      APPEND gt_fieldcat. CLEAR gt_fieldcat.

      • Cantidad del pedido1

      gt_fieldcat-tabname = 'T_ALV'.

      gt_fieldcat-fieldname = 'MENGE'.

      gt_fieldcat-seltext_l = 'CANTIDAD1'.

      APPEND gt_fieldcat. CLEAR gt_fieldcat.

      • Cantidad del pedido2

      gt_fieldcat-tabname = 'T_ALV'.

      gt_fieldcat-fieldname = 'MENGE'.

      gt_fieldcat-seltext_l = 'CANTIDAD2'.

      APPEND gt_fieldcat. CLEAR gt_fieldcat.

      • Cantidad para bwtar = 161

      gt_fieldcat-tabname = 'T_ALV'.

      gt_fieldcat-fieldname = 'MENGE'.

      gt_fieldcat-seltext_l = 'CANTIDAD161'.

      APPEND gt_fieldcat. CLEAR gt_fieldcat.

      • Cantidad para bwtar = 101

      gt_fieldcat-tabname = 'T_ALV'.

      gt_fieldcat-fieldname = 'MENGE'.

      gt_fieldcat-seltext_l = 'CANTIDAD101'.

      APPEND gt_fieldcat. CLEAR gt_fieldcat.

      ENDFORM. "init_fieldcat

      *&----


      *

      *& Form init_layout

      *&----


      *

      • text

      *----


      *

      • --> p1 text

      • <-- p2 text

      *----


      *

      FORM init_layout .

      • gs_layout-colwidth_optimize = 'X'.

      gs_layout-zebra = 'X'.

      gs_layout-f2code = '&ETA'.

      gs_layout-no_input = ' '.

      • gs_layout-header_text = 'Listado_estatus_de_la_mercancia'.

      ENDFORM. " init_layout

      *&----


      *

      *& Form mostrar_alv_01

      *&----


      *

      • text

      *----


      *

      • --> p1 text

      • <-- p2 text

      *----


      *

      FORM mostrar_alv_01 .

      • Inicialización de Variante de Trabajo

      ls_vari-report = sy-repid.

      ls_vari-handle = space.

      ls_vari-log_group = space.

      ls_vari-username = space.

      ls_vari-variant = space.

      ls_vari-text = space.

      ls_vari-dependvars = space.

      • t_datos[] = i_datos[].

      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

      EXPORTING

      i_callback_program = g_repid

      i_callback_user_command = 'USER_COMMAND'

      • i_callback_pf_status_set = 'STATUS'

      i_structure_name = 't_alv'

      is_layout = gs_layout

      it_fieldcat = gt_fieldcat[]

      • it_sort = gt_sort[]

      • it_excluding = gt_exclude[]

      • I_DEFAULT = 'X'

      • i_save = 'A' "Grabar Variante

      • is_variant = ls_vari

      • it_events = gt_events[]

      TABLES

      t_outtab = t_alv

      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.

      ENDFORM. " mostrar_alv_01

  • avatar image
    Former Member
    Aug 17, 2007 at 11:11 AM

    Hi,

    The dump could be a result of how you are filling the fieldcat internal table. For example, you could be adding a column to the fieldcat which does exist in the internal table holding the data.

    Regards,

    Aparna

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Aug 17, 2007 at 11:18 AM
    • PEDIDOS

    gt_fieldcat-tabname = 'T_ALV'.

    gt_fieldcat-fieldname = 'EBELN'.

    gt_fieldcat-seltext_l = 'PEDIDO1'.

    APPEND gt_fieldcat. CLEAR gt_fieldcat.

    • POSICION

    gt_fieldcat-tabname = 'T_ALV'.

    gt_fieldcat-fieldname = 'EBELP'.

    gt_fieldcat-seltext_l = 'POSICION1'.

    APPEND gt_fieldcat. CLEAR gt_fieldcat.

    • PEDIDOS

    gt_fieldcat-tabname = 'T_ALV'.

    gt_fieldcat-fieldname = 'EBELN'.

    gt_fieldcat-seltext_l = 'PEDIDO2'.

    APPEND gt_fieldcat. CLEAR gt_fieldcat.

    • POSICION

    gt_fieldcat-tabname = 'T_ALV'.

    gt_fieldcat-fieldname = 'EBELP'.

    gt_fieldcat-seltext_l = 'POSICION2'.

    APPEND gt_fieldcat. CLEAR gt_fieldcat.

    <b>* Cantidad del pedido1

    gt_fieldcat-tabname = 'T_ALV'.

    gt_fieldcat-fieldname = 'MENGE'.</b>

    gt_fieldcat-seltext_l = 'CANTIDAD1'.

    APPEND gt_fieldcat. CLEAR gt_fieldcat.

    • Cantidad del pedido2

    <b>gt_fieldcat-tabname = 'T_ALV'.

    gt_fieldcat-fieldname = 'MENGE'.</b>

    gt_fieldcat-seltext_l = 'CANTIDAD2'.

    APPEND gt_fieldcat. CLEAR gt_fieldcat.

    • Cantidad para bwtar = 161

    <b>gt_fieldcat-tabname = 'T_ALV'.

    gt_fieldcat-fieldname = 'MENGE'.</b>

    gt_fieldcat-seltext_l = 'CANTIDAD161'.

    APPEND gt_fieldcat. CLEAR gt_fieldcat.

    • Cantidad para bwtar = 101

    <b>gt_fieldcat-tabname = 'T_ALV'.

    gt_fieldcat-fieldname = 'MENGE'.</b>

    gt_fieldcat-seltext_l = 'CANTIDAD101'.

    APPEND gt_fieldcat. CLEAR gt_fieldcat.

    ur tabname and fieldname s are the same..

    Regards,

    Aparna

    Add comment
    10|10000 characters needed characters exceeded