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: 

ALV Tree dumps permanently

Former Member
0 Kudos
1,355

Hello!

This below listed code dumps all over the time.

I checked the whole code and its almost impossible to find

out the problem. Hopefully has somebody an idea.

Reagrds

Ilhan

class cl_gui_column_tree definition load.
class cl_gui_cfw definition load.

data tree1  type ref to cl_gui_alv_tree_simple.


INCLUDE /G2A/ZTREE_ICON.

INCLUDE /G2A/ZTREE_EVENT.


data: gt_sflight      type sflight occurs 0,      "Output-Table
      gt_fieldcatalog type lvc_t_fcat, "Fieldcatalog
      gt_sort         type lvc_t_sort, "Sortiertabelle
      ok_code         like sy-ucomm.   "OK-Code



 data itab type  ZQMCOMP occurs 0.



data wa type ZQMCOMP.

* Struktur Feldkatalog
data lw TYPE  lvc_s_fcat.

* interne Tabelle  Feldkatalog
data  gt  TYPE lvc_t_fcat.

* Layoutstruktur
data wa_layout TYPE lvc_s_layo.


start-of-selection.

end-of-selection.

  call screen 100.

*&---------------------------------------------------------------------*
*&      Form  BUILD_FIELDCATALOG
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
form build_fieldcatalog.
** get fieldcatalog
*  call function 'LVC_FIELDCATALOG_MERGE'
*       exporting
*            i_structure_name = 'wa'
*       changing
*            ct_fieldcat      = gt.
*
** change fieldcatalog
*  data: ls_fieldcatalog type lvc_s_fcat.
*  loop at gt_fieldcatalog into ls_fieldcatalog.
*    case ls_fieldcatalog-fieldname.
*      when 'CARRID' or 'CONNID' or 'FLDATE'.
*        ls_fieldcatalog-no_out = 'X'.
*        ls_fieldcatalog-key    = ''.
*      when 'PRICE' or 'SEATSOCC' or 'SEATSMAX' or 'PAYMENTSUM'.
*        ls_fieldcatalog-do_sum = 'X'.
*    endcase.
*    modify gt_fieldcatalog from ls_fieldcatalog.
*  endloop.


* ================================================
*                FELDKATALOG
* ================================================

CLEAR: lw.
    lw-fieldname = 'QMNUM'.
    lw-tabname   = 'wa'.
    lw-col_pos  = 1.
    lw-EMPHASIZE = 'C711'.
    APPEND lw TO gt.

CLEAR: lw.
    lw-fieldname = 'QMART'.
    lw-tabname   = 'wa'.
    lw-col_pos  = 2.
    lw-EMPHASIZE = 'C711'.
    APPEND lw TO gt.


CLEAR: lw.
    lw-fieldname = 'POSNR'.
    lw-tabname   = 'wa'.
    lw-col_pos  = 3  .
    lw-EMPHASIZE = 'C711'.
    APPEND lw TO gt.


CLEAR: lw.
    lw-fieldname = 'REFNR'.
    lw-tabname   = 'wa'.
    lw-col_pos  = 4.
    lw-EMPHASIZE = 'C711'.
    APPEND lw TO gt.


CLEAR: lw.
    lw-fieldname = 'KUNDE'.
    lw-tabname   = 'wa'.
    lw-col_pos  = 5.
    lw-EMPHASIZE = 'C711'.
    APPEND lw TO gt.


CLEAR: lw.
    lw-fieldname = 'DUNS'.
    lw-tabname   = 'wa'.
    lw-col_pos  = 6.
    lw-EMPHASIZE = 'C711'.
    APPEND lw TO gt.




endform.                               " BUILD_FIELDCATALOG
*&---------------------------------------------------------------------*
*&      Form  BUILD_OUTTAB
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*  -->  p1        text
*  <--  p2        text
*----------------------------------------------------------------------*
form build_outtab.

*  select * from sflight into table gt_sflight.

  select * from ZQMCOMP into table itab.
*              up to 1 rows.

endform.                               " BUILD_OUTTAB

*&---------------------------------------------------------------------*
*&      Form  BUILD_SORT_TABLE
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*  -->  p1        text
*  <--  p2        text
*----------------------------------------------------------------------*
form build_sort_table.

  data ls_sort_wa type lvc_s_sort.

* create sort-table
  ls_sort_wa-spos = 1.
  ls_sort_wa-fieldname = 'CARRID'.
  ls_sort_wa-up = 'X'.
  ls_sort_wa-subtot = 'X'.
  append ls_sort_wa to gt_sort.

  ls_sort_wa-spos = 2.
  ls_sort_wa-fieldname = 'CONNID'.
  ls_sort_wa-up = 'X'.
  ls_sort_wa-subtot = 'X'.
  append ls_sort_wa to gt_sort.

  ls_sort_wa-spos = 3.
  ls_sort_wa-fieldname = 'FLDATE'.
  ls_sort_wa-up = 'X'.
  append ls_sort_wa to gt_sort.

endform.                               " BUILD_SORT_TABLE
*&---------------------------------------------------------------------*
*&      Module  PBO  OUTPUT
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
module pbo output.
  if tree1 is initial.
    perform init_tree.
  endif.
  set pf-status 'MAIN100'.

endmodule.                             " PBO  OUTPUT
*&---------------------------------------------------------------------*
*&      Module  PAI  INPUT
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
module pai input.

  case ok_code.
    when 'EXIT' or 'BACK' or 'CANC'.
      perform exit_program.

    when others.
      call method cl_gui_cfw=>dispatch.
  endcase.
  clear ok_code.
endmodule.                             " PAI  INPUT
*&---------------------------------------------------------------------*
*&      Form  exit_program
*&---------------------------------------------------------------------*
*       free object and leave program
*----------------------------------------------------------------------*
form exit_program.

  call method tree1->free.
  leave program.

endform.                               " exit_program
*&---------------------------------------------------------------------*
*&      Form  register_events
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*  -->  p1        text
*  <--  p2        text
*----------------------------------------------------------------------*
form register_events.
* define the events which will be passed to the backend
  data: lt_events type cntl_simple_events,
        l_event type cntl_simple_event.

* define the events which will be passed to the backend
  l_event-eventid = cl_gui_column_tree=>eventid_node_context_menu_req.
  append l_event to lt_events.
  l_event-eventid = cl_gui_column_tree=>eventid_item_context_menu_req.
  append l_event to lt_events.
  l_event-eventid = cl_gui_column_tree=>eventid_header_context_men_req.
  append l_event to lt_events.
  l_event-eventid = cl_gui_column_tree=>eventid_expand_no_children.
  append l_event to lt_events.
  l_event-eventid = cl_gui_column_tree=>eventid_header_click.
  append l_event to lt_events.
  l_event-eventid = cl_gui_column_tree=>eventid_item_keypress.
  append l_event to lt_events.

  call method tree1->set_registered_events
    exporting
      events = lt_events
    exceptions
      cntl_error                = 1
      cntl_system_error         = 2
      illegal_event_combination = 3.

* set Handler
  data: l_event_receiver type ref to lcl_tree_event_receiver.
  create object l_event_receiver.
  set handler l_event_receiver->on_add_hierarchy_node
                                                        for tree1.
endform.                               " register_events
*&---------------------------------------------------------------------*
*&      Form  build_header
*&---------------------------------------------------------------------*
*       build table for html_header
*----------------------------------------------------------------------*
*  -->  p1        text
*  <--  p2        text
*----------------------------------------------------------------------*
form build_comment using
      pt_list_commentary type slis_t_listheader
      p_logo             type sdydo_value.

  data: ls_line type slis_listheader.
*
* LIST HEADING LINE: TYPE H
  clear ls_line.
  ls_line-typ  = 'H'.
  ls_line-info = 'METZELER OEM-BEANSTANDUNGEN'.
  append ls_line to pt_list_commentary.
  clear ls_line.
  ls_line-typ  = 'S'.
  ls_line-key  = 'Datum'.
  ls_line-info = sy-datlo.
  append ls_line to pt_list_commentary.
*  ls_line-key  = 'time'.
*  ls_line-info = '00.00 pm'.
*  append ls_line to pt_list_commentary.
** ACTION LINE: TYPE A
*  clear ls_line.
*  ls_line-typ  = 'A'.
** LS_LINE-KEY:  NOT USED FOR THIS TYPE
*  ls_line-info = 'up-to-date data'.
*  append ls_line to pt_list_commentary.

  p_logo = 'ENJOYSAP_LOGO'.
endform.
*&---------------------------------------------------------------------*
*&      Form  init_tree
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*  -->  p1        text
*  <--  p2        text
*----------------------------------------------------------------------*
FORM init_tree.
  perform build_fieldcatalog.

  perform build_outtab.

*  perform build_sort_table.

* create container for alv-tree
  data: l_tree_container_name(30) type c,
        l_custom_container type ref to cl_gui_custom_container.
  l_tree_container_name = 'TREE1'.

  create object l_custom_container
      exporting
            container_name = l_tree_container_name
      exceptions
            cntl_error                  = 1
            cntl_system_error           = 2
            create_error                = 3
            lifetime_error              = 4
            lifetime_dynpro_dynpro_link = 5.

* create tree control
  create object tree1
    exporting
        i_parent              = l_custom_container
        i_node_selection_mode =
                              cl_gui_column_tree=>node_sel_mode_multiple
        i_item_selection      = 'X'
        i_no_html_header      = ''
        i_no_toolbar          = ''
    exceptions
        cntl_error                   = 1
        cntl_system_error            = 2
        create_error                 = 3
        lifetime_error               = 4
        illegal_node_selection_mode  = 5
        failed                       = 6
        illegal_column_name          = 7.

* create info-table for html-header
  data: lt_list_commentary type slis_t_listheader,
        l_logo             type sdydo_value.

  perform build_comment using
                 lt_list_commentary
                 l_logo.

* repid for saving variants
  data: ls_variant type disvariant.
  ls_variant-report = sy-repid.

* register events
  perform register_events.

* create hierarchy
  call method tree1->set_table_for_first_display
          exporting
               it_list_commentary   = lt_list_commentary
*               i_logo               = l_logo
               i_background_id      = 'ALV_BACKGROUND'
               i_save               = 'A'
               is_variant            = ls_variant
          changing
*               it_sort              = gt_sort
               it_outtab            = itab
*               it_fieldcatalog      = gt_fieldcatalog.
               it_fieldcatalog      = gt.


* expand first level
  call method tree1->expand_Tree
         exporting
             i_level = 1.

* optimize column-width

  call method tree1->column_optimize
           exporting
               i_start_column = tree1->c_hierarchy_column_name
               i_end_column   = tree1->c_hierarchy_column_name.


ENDFORM.                    " init_tree

1 ACCEPTED SOLUTION

former_member194669
Active Contributor
0 Kudos
363

Hi,

Please check

All the fields there in the fieldcatalog should be there in the output tab ie your ITAB.

ie check any field in the fieldcatalog but not in itab (output tab)

aRs

9 REPLIES 9

Former Member
0 Kudos
363

its easy to send someone a link with an "alv sample tree" like

BCALV_TREE_DEMO and being rewarded.

But its diffucult to say somebody what is wrong with his code like

my situation. Where are here abap gurus.

Am I really in sap abap forum ))))

Bye

Ilhan

0 Kudos
363

Hi Idhan,

I think Chandrasekhar detected your error.

If you'd sent excerpts of the dump created, it would have been even more useful.

Regards,

Clemens

Former Member
0 Kudos
363

give the tabname in uppercase

lw-fieldname = 'QMNUM'.

lw-tabname = 'WA'. "<----


lw-col_pos = 1.

lw-EMPHASIZE = 'C711'.

APPEND lw TO gt.

Todally ABAP forum is really dumb....Friday Fever!!!!!!!!!!!!!

But what you have quoted is wrong!!!!!!!!!!

Former Member
0 Kudos
363

thank you very much

I have written wa in uppercase. But I still have an error message

Field symbol has not yet been assigned.

What happened?

The current ABAP/4 program "CL_GUI_ALV_TREE_SIMPLE========CP " had to be

terminated because

one of the statements could not be executed.

This is probably due to an error in the ABAP/4 program.

What can you do?

Note the actions and input that caused the error.

Inform your SAP system administrator.

You can print out this message by choosing "Print". Transaction ST22

allows you to display and manage termination messages, including keeping

them beyond their normal deletion date.

Error analysis

You attempted to access an unassigned field symbol

(data segment 32771).

This error occurs:

- if you address a typed field symbol before it has been set with

ASSIGN or

- if you address a field symbol that has been reset with UNASSIGN

or pointed to a local field that no longer exists, or

Former Member
0 Kudos
363

Hello!

This the dump!

ABAP-Laufzeitfehler GETWA_NOT_ASSIGNED

aufgetreten am 09.03.2007 um 15:26:15

-

-


>> ABAP-Kurzdump ist nicht komplett abgespeichert (zu groß)

-

-


Feldsymbol ist noch nicht zugewiesen.

-

-


Was ist passiert?

-

-


Fehler im ABAP-Anwendungsprogramm.

Das laufende ABAP-Programm "CL_GUI_ALV_TREE_SIMPLE========CP " mußte

abgebrochen werden, da es auf

eine Anweisung gestoßen ist, die leider nicht ausgeführt werden kann.

-

-


Was können Sie tun?

-

-


Notieren Sie bitte, welche Aktionen und Eingaben zu dem Fehler geführt

haben.

Wenden Sie sich bitte zur weiteren Bearbeitung des Problems an Ihren

SAP-Administrator.

Durch Anwählen der Funktion "Drucken" können Sie einen Ausdruck der

vorliegenden Abbruchmeldung erhalten. - Mit der Transaktion ST22

zur ABAP-Dumpanalyse können Sie Abbruchmeldungen anschauen und

verwalten, insbesondere längere Zeit aufbewahren.

-

-


Fehleranalyse

-

-


Es wurde auf ein noch nicht zugewiesenes Feldsymbol zugegriffen

(Datensegment Nr. 32771).

Dieser Fehler tritt auf, wenn

- ein typisiertes Feldsymbol angesprochen wird, bevor es mittels

ASSIGN gesetzt wird, oder

- ein Feldsymbol angesprochen wird, das auf die Zeile einer

internen Tabelle gezeigt hat, die gelöscht wurde, oder

- ein Feldsymbol angesprochen wird, das vorher mit UNASSIGN

zurückgesetzt wurde oder das auf ein lokales Feld gezeigt hat,

das nicht mehr existiert oder

- ein Parameter einer globalen Funktionsschnittstelle angesprochen

wird, obwohl der entsprechende Funktionsbaustein nicht aktiv ist,

d.h. nicht in der Liste der aktiven Aufrufe steht. Die Liste der

aktiven Aufrufe kann diesem Kurzdump entnommen werden.

-

-


Hinweise zur Fehlerbehebung

-

-


Falls der Fehler in einem nicht modifizierten SAP-Programm vorkommt

findet sich vielleicht eine Vorablösung im SAP-Hinweissystem.

Falls Sie selbst Zugang zum SAP-Hinweissystem haben, so suchen Sie

bitte zunächst mit folgenden Schlagworten:

-

-


"GETWA_NOT_ASSIGNED"

"CL_GUI_ALV_TREE_SIMPLE========CP " bzw. "CL_GUI_ALV_TREE_SIMPLE========CM00J

"

"SET_NODES"

-

-


Falls Sie das Problem nicht selbst lösen können, so senden Sie bitte

folgende Unterlagen an SAP:

1. Ausdruck der vorliegenden Problembeschreibung

Hierzu wählen Sie bitte in der aktuellen Anzeige die Funktion

"Drucken" aus.

2. Passender Ausdruck des Systemlogs

Hierzu rufen Sie bitte mit der Transaktion SM21 den Systemlog auf

und bringen mit der Funktion "Drucken" den das Problem betreffenden

Teil davon zu Papier.

3. Falls es sich um eigene Programme oder um modifizierte SAP-Programme

handelt: Source-Code dieser Programme

Hierzu können Sie im Editor das Kommando "PRINT" verwenden oder die

Programme durch das Programm RSINCL00 ausdrucken lassen.

4. Hinweise, unter welchen Bedingungen der Fehler bisher aufgetreten ist

bzw. welche Aktionen und Eingaben zu dem Fehler geführt haben.

-

-


Systemumgebung

-

-


SAP-Release.............. "46C"

Applikationsserver....... "s96as822"

Netzwerkadresse.......... "53.71.198.54"

Betriebssystem........... "SunOS"

Release.................. "5.8"

Hardwaretyp.............. "sun4u"

Datenbankserver.......... "s96as822"

Datenbanktyp............. "ORACLE"

Datenbankname............ "G2E"

Datenbank-User-Id........ "SAPR3"

Zeichensatz.............. "de"

SAP-Kernel............... "46D"

hergestellt am........... "Nov 27 2005 20:48:26"

hergestellt auf.......... "SunOS 5.7 Generic_106541-05 sun4u"

Datenbankversion......... "OCI_816_64__OCI_7_API "

Patch-Level.............. "2162"

Patch-Text " "

Unterstützte Umgebung....

Datenbank ............... "ORACLE 8.0.5.., ORACLE 8.0.6.., ORACLE

8.1.6.., ORACLE 8.1.7.., ORACLE 9.2.0.."

SAP-Datenbankversion..... "46D"

Betriebssystem........... "SunOS 5.6, SunOS 5.7, SunOS 5.8, SunOS 5.9, SunOS

5.10, , System build information:, -

-


, LCHN

: 794995"

-

-


Benutzer, Transaktion...

-

-


Mandant............. 112

Benutzer............ "ASIKOGLU"

Sprachenschlüssel... "D"

Transaktion......... "SEU_INT "

Programm............ "CL_GUI_ALV_TREE_SIMPLE========CP "

Dynpro.............. "/G2A/ZTREE 0100"

Dynprozeile......... 2

-

-


Informationen zur Abbruchstelle

-

-


Der Abbruch trat im ABAP-Programm "CL_GUI_ALV_TREE_SIMPLE========CP " auf, und

zwar in

"SET_NODES".

Das Hauptprogramm war "/G2A/ZTREE ".

Im Source-Code findet sich die Abbruchstelle in Zeile 210

(bei Anwahl des Editors: 2100) der ABAP-Source

"CL_GUI_ALV_TREE_SIMPLE========CM00J ".

-

-


Ausschnitt Source-Code

-

-


001800 m_current_node_key = l_node_key.

001810 raise event ON_ADD_HIERARCHY_NODE

001820 exporting

001830 grouplevel = ls_sort_wa-fieldname

001840 index_outtab = l_index_outtab.

001850

001860 * stack last key

001870 insert l_node_key into lt_parent_stack index 1.

001880

001890 * set parameters for next loop.

001900 l_prev_level =

002070 importing

002080 e_ext_value = l_node_text

002090 changing

-

-


cs_fieldcat = ls_fieldcatalog_wa.

002110 condense l_node_text.

002120

002130 * set layout

002140 clear ls_node_layout.

002150 clear lt_item_layout[].

002160 call method me->set_layout

002170 exporting

002180 i_grouplevel = l_last_level

002190 importing

002200 es_node_layout = ls_node_layout

002210 et_item_layout = lt_item_layout

002220 changing

002230 is_outtabline = add_model_node

002260 exporting

002270 i_relat_node_key = l_relat_key

002280 i_relationship = l_relationship

002290 i_node_text = l_node_text

-

-


Inhalt der Systemfelder

-

-


SY-Feld Inhalt....................... SY-Feld Inhalt.......................

-

-


-

-


-

-


-

-


SY-SUBRC 4 SY-INDEX 0

SY-TABIX 1 SY-DBCNT 1

SY-FDPOS 1 SY-LSIND 0

SY-PAGNO 0 SY-LINNO 1

SY-COLNO 1

Former Member
0 Kudos
363

sorry this the english version

ABAP runtime errors GETWA_NOT_ASSIGNED

Occurred on 09.03.2007 at 15:35:20

-


>> Short dump has not been completely stored. It is too big.

-


Field symbol has not yet been assigned.

-


What happened?

-


The current ABAP/4 program "CL_GUI_ALV_TREE_SIMPLE========CP " had to be

terminated because

one of the statements could not be executed.

This is probably due to an error in the ABAP/4 program.

-


What can you do?

-


Note the actions and input that caused the error.

Inform your SAP system administrator.

You can print out this message by choosing "Print". Transaction ST22

allows you to display and manage termination messages, including keeping

them beyond their normal deletion date.

-


Error analysis

-


You attempted to access an unassigned field symbol

(data segment 32771).

This error occurs:

- if you address a typed field symbol before it has been set with

ASSIGN or

- if you address a field symbol that has been reset with UNASSIGN

or pointed to a local field that no longer exists, or

- if you address a field symbol that pointed to a line of an internal

table that has now been deleted, or

- if you address a global function interface partameter, even

though the relevant function module is not active,

i.e. it is not in the list of active calls. You can get the list

of active calls from the this short dump.

-


How to correct the error

-


If the error occurred in a non-modified SAP program, you may be

able to find a solution in the SAP note system.

If you have access to the note system yourself, use the following

search criteria:

-


"GETWA_NOT_ASSIGNED"

"CL_GUI_ALV_TREE_SIMPLE========CP " or "CL_GUI_ALV_TREE_SIMPLE========CM00J "

"SET_NODES"

If you cannot solve the problem yourself, please send the

following documents to SAP:

1. A hard copy print describing the problem.

To obtain this, select the "Print" function on the current screen.

-

2. A suitable hardcopy prinout of the system log.

To obtain this, call the system log with Transaction SM21

and select the "Print" function to print out the relevant

part.

3. If the programs are your own programs or modified SAP programs,

supply the source code.

To do this, you can either use the "PRINT" command in the editor or

print the programs using the report RSINCL00.

4. Details regarding the conditions under which the error occurred

or which actions and input led to the error.

-


System environment

-


SAP Release.............. "46C"

Application server....... "s96as822"

Network address.......... "53.71.198.54"

Operating system......... "SunOS"

Release.................. "5.8"

Hardware type............ "sun4u"

Database server.......... "s96as822"

Database type............ "ORACLE"

Database name............ "G2E"

Database owner........... "SAPR3"

Character set............ "en_US"

SAP kernel............... "46D"

Created on............... "Nov 27 2005 20:48:26"

Created in............... "SunOS 5.7 Generic_106541-05 sun4u"

Database version......... "OCI_816_64__OCI_7_API "

Patch level.............. "2162"

Patch text............... " "

Supported environment....

Database................. "ORACLE 8.0.5.., ORACLE 8.0.6.., ORACLE

8.1.6.., ORACLE 8.1.7.., ORACLE 9.2.0.."

SAP database version..... "46D"

Operating system......... "SunOS 5.6, SunOS 5.7, SunOS 5.8, SunOS 5.9, SunOS

5.10, , System build information:, -


, LCHN

: 794995"

-


User, transaction...

-


Client.............. 112

User................ "ASIKOGLU"

Language key........ "E"

Transaction......... "SEU_INT "

Program............. "CL_GUI_ALV_TREE_SIMPLE========CP "

Screen.............. "/G2A/ZTREE 0100"

Screen line......... 2

-


Information on where termination occurred

-


The termination occurred in the ABAP/4 program

"CL_GUI_ALV_TREE_SIMPLE========CP " in

"SET_NODES".

The main program was "/G2A/ZTREE ".

The termination occurred in line 210

of the source code of program "CL_GUI_ALV_TREE_SIMPLE========CM00J " (when

calling the editor 2100).

-


Source code extract

-


001800 m_current_node_key = l_node_key.

001810 raise event ON_ADD_HIERARCHY_NODE

001820 exporting

001830 grouplevel = ls_sort_wa-fieldname

001840 index_outtab = l_index_outtab.

001850

001860 * stack last key

001870 insert l_node_key into lt_parent_stack index 1.

001880

001890 * set parameters for next loop.

001900 l_prev_level = <ls_grouplevels_wa>-level.

001910 l_index_from = <ls_grouplevels_wa>-index_from.

001920 l_index_to = <ls_grouplevels_wa>-index_to.

001930 endloop.

001940

001950 * complete last nodes from outtab

001960 loop at it_outtab assigning <wa> from l_index_from to l_index_to.

001970 l_index = sy-tabix.

001980 * get relation-key

001990 read table lt_parent_stack into l_relat_key index 1.

002000 l_relationship = cl_tree_control_base=>relat_last_child.

002010 assign component l_last_level of structure <wa> to <h_key>.

002020 * read and format output-data

002030 call method cl_gui_alv_grid=>CELL_Display

002040 exporting

002050 is_data = <wa>

002060 i_int_value = <h_key>

002070 importing

002080 e_ext_value = l_node_text

002090 changing

-


> cs_fieldcat = ls_fieldcatalog_wa.

002110 condense l_node_text.

002120

002130 * set layout

002140 clear ls_node_layout.

002150 clear lt_item_layout[].

002160 call method me->set_layout

002170 exporting

002180 i_grouplevel = l_last_level

002190 importing

002200 es_node_layout = ls_node_layout

002210 et_item_layout = lt_item_layout

002220 changing

002230 is_outtabline = <wa>.

002240

002250 call method me->add_model_node

002260 exporting

002270 i_relat_node_key = l_relat_key

002280 i_relationship = l_relationship

002290 i_node_text = l_node_text

-


Contents of system fields

-


SY field contents..................... SY field contents.....................

-


-


-


-


SY-SUBRC 4 SY-INDEX 0

SY-TABIX 1 SY-DBCNT 1

SY-FDPOS 1 SY-LSIND 0

SY-PAGNO 0 SY-LINNO 1

SY-COLNO 1

0 Kudos
363

Hi,

you copied from sample program:


 data ls_sort_wa type lvc_s_sort.
 
* create sort-table
  ls_sort_wa-spos = 1.
  ls_sort_wa-fieldname = 'CARRID'.
  ls_sort_wa-up = 'X'.
  ls_sort_wa-subtot = 'X'.
  append ls_sort_wa to gt_sort.
 
  ls_sort_wa-spos = 2.
  ls_sort_wa-fieldname = 'CONNID'.
  ls_sort_wa-up = 'X'.
  ls_sort_wa-subtot = 'X'.
  append ls_sort_wa to gt_sort.
 
  ls_sort_wa-spos = 3.
  ls_sort_wa-fieldname = 'FLDATE'.
  ls_sort_wa-up = 'X'.
  append ls_sort_wa to gt_sort.
 

If your Z table does not have the fields CARRID CONNID and FLDATE it is no wonder that it dumps.

OOPs! Sorry - just saw that this is commented.

Clemens

Message was edited by:

Clemens Li

0 Kudos
363

Hi,

but now: Most errors in ALV come from unusable field catalog. Did you try:


  call function 'LVC_FIELDCATALOG_MERGE'
       exporting
            i_structure_name = 'ZQMCOMP'
       changing
            ct_fieldcat      = gt.

if you get more field than you want, you can use a variant or mark the fields as TECH in the field catalog.

Regards and nice weekend,

Clemens

former_member194669
Active Contributor
0 Kudos
364

Hi,

Please check

All the fields there in the fieldcatalog should be there in the output tab ie your ITAB.

ie check any field in the fieldcatalog but not in itab (output tab)

aRs