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: 

Error in copy of BCALV_TREE_SIMPLE_DEMO

Former Member
0 Kudos
115

I copied BCALV_TREE_SIMPLE_DEMO to a z version,

changed it with own structure

DATA: gt_sflight TYPE zhpa_vakantie_struc OCCURS 0, "sflight OCCURS 0, "Output-Table

now when running an error occurs, i think this has to do with the screen collumn layout???????

When in debug mode i see somewhere that the code is looking for fields from structure sflight!

Anyone a clue??

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.

tartpunt van runtime error

Programma CL_GUI_ALV_TREE_SIMPLE========CP

Include CL_GUI_ALV_TREE_SIMPLE========CM01G

Regel 13

Moduletype (METHOD)

Modulenaam SET_HIERARCHY_DATA

ectie source code

egel Source

1 method SET_HIERARCHY_DATA.

2

3 data: ls_fieldcat type lvc_s_fcat,

4 ls_new_item type lvc_s_item,

5 l_data type lvc_value.

6

7 field-symbols: <f1> type any.

8 if not is_outtab_line is initial.

9 loop at mt_fieldcatalog into ls_fieldcat where

10 tech is initial.

11 assign component ls_fieldcat-fieldname

12 of structure is_outtab_line to <f1>.

>>>> if not <f1> is initial.

14 * get cell-value

15 call method cl_gui_alv_grid=>cell_display

16 exporting

17 is_data = is_outtab_line

18 i_int_value = <f1>

19 importing

Edited by: Richard van Veen on Oct 28, 2010 2:35 PM

Edited by: Richard van Veen on Oct 28, 2010 2:46 PM

1 ACCEPTED SOLUTION

Former Member
0 Kudos
50

Maybe the problem comes from gt_sort then :

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

However, you get this error because there are differences between the structure of the table containing your data and the ones defining your field catalog or the sorting order.

3 REPLIES 3

Former Member
0 Kudos
50

Hi Richard,

Did you adapt your fieldcat according to the structure change you made ?

If you didn't, then you should have something like this in your program :

call function 'LVC_FIELDCATALOG_MERGE'
       exporting
            i_structure_name = 'SFLIGHT'
       changing
            ct_fieldcat      = gt_fieldcatalog.

Then you need to replace the structure name SFLIGHT with your new structure.

Regards.

Nicolas.

0 Kudos
50

Yes i did

CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'

EXPORTING

i_structure_name = 'ZHPA_VAKANTIE_STRUC' "'SFLIGHT'

CHANGING

ct_fieldcat = gt_fieldcatalog.

Former Member
0 Kudos
51

Maybe the problem comes from gt_sort then :

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

However, you get this error because there are differences between the structure of the table containing your data and the ones defining your field catalog or the sorting order.