ALV: shortdump in CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
Hello ABAP fans,
I have a serious issue with this one: it worked fine untill yesterday - since then I constantly get this dump:
'Field symbol has not yet been assigned.
The current ABAP/4 program "SAPLKKBL " had to be terminated because
one of the statements could not be executed.'
Untill ysterday, it worked fine! Ok, I have made some modifications trying to dipslay my ALV list vertically. After a couple of changes I eventually could make a weird vertical display: all of my fields were under each other, including the header ones! But ok, that's now an other issue.
I have set everything like it was before the dump, and I still cannot have my previous (horizontal) display!
Here's my call:
Got it!
Actually problem was in my FORM populate_layout!
Here is what I've changed (so it didn't work - giving dump):
FORM populate_layout USING p_fieldlayout TYPE slis_layout_alv.
fieldlayout-f2code = '&ETA' .
fieldlayout-zebra = 'X'.
* FOR THE WINDOW TITLE.
fieldlayout-window_titlebar = 'ALV with Events'.
fieldlayout-colwidth_optimize = 'X'.
fieldlayout-no_vline = ' '.
fieldlayout-no_input = ' '.
* fieldlayout-confirmation_prompt = ' '.
fieldlayout-key_hotspot = 'X'.
* This removes the column headings if the flag is set to 'X'
fieldlayout-no_colhead = ' '.
*fieldlayout-hotspot_fieldname = 'MAKTX'.
fieldlayout-detail_popup = 'X'.
fieldlayout-coltab_fieldname = 'X'.
and now it works with this tiny change:
FORM populate_layout USING p_fieldlayout TYPE slis_layout_alv.
fieldlayout-f2code = '&ETA' .
fieldlayout-zebra = 'X'.
* FOR THE WINDOW TITLE.
fieldlayout-window_titlebar = 'ALV with Events'.
fieldlayout-colwidth_optimize = 'X'.
fieldlayout-no_vline = ' '.
fieldlayout-no_input = ' '.
* fieldlayout-confirmation_prompt = ' '.
fieldlayout-key_hotspot = 'X'.
* This removes the column headings if the flag is set to 'X'
fieldlayout-no_colhead = ' '.
*fieldlayout-hotspot_fieldname = 'MAKTX'.
fieldlayout-detail_popup = 'X'.
* fieldlayout-coltab_fieldname = 'X'.
Don't ask me why, but it works!
Cheers!
coltab_fieldname expects a field in your structure representing the style (in this case color) of the cell. Since you do not have a field named X in your structure the program fails if it tries to access it.
Christian
Danke schöne Christian for clearing up!
Cheers