‎2009 Mar 25 4:23 AM
Hello guys,
there is a demo available showing how to use trees in ABAP Objects. This demo program name is DEMO_ABAP_OBJECTS_CONTROLS. I'm trying to customize this demo changing the select statement to get values from table MARA. I'm receiving a dump error with the message "MESSAGE_TYPE_X". I've tried even to use another fields but I'm still receiving this error. Do you have some idea why this is working only with the table shown in the demo?
Regards,
‎2009 Mar 25 5:02 AM
Hi guys,
I think probably some value is comming repeated and as is not possible to insert duplicate keys, then, the dump is comming. The field "node_key" holds only 12 characters, so, values are truncated to insert them in the field. Probably when some values are truncated, the duplication occurrs.
I think something like this is happening:
value 1 : AAAAAAAAAAAAAAAAAA
value 2: AAAAAAAAAAAABBBBBB
when truncate occurs:
value 1 : AAAAAAAAAAAA
value 2: AAAAAAAAAAAA
Then, duplicate key and dump error.
I'm not sure, but, may be this is the problem.
Regards,
‎2009 Mar 25 5:02 AM
Hi guys,
I think probably some value is comming repeated and as is not possible to insert duplicate keys, then, the dump is comming. The field "node_key" holds only 12 characters, so, values are truncated to insert them in the field. Probably when some values are truncated, the duplication occurrs.
I think something like this is happening:
value 1 : AAAAAAAAAAAAAAAAAA
value 2: AAAAAAAAAAAABBBBBB
when truncate occurs:
value 1 : AAAAAAAAAAAA
value 2: AAAAAAAAAAAA
Then, duplicate key and dump error.
I'm not sure, but, may be this is the problem.
Regards,
‎2009 Mar 25 8:41 AM
Dear Cardoso,
Make use of Tree models for contructing Tree. For the following reasons:-
- Easy to use methods
- NODE_KEY is a string and hence any no. of characters
Following are the 3 classes you can use for Tree model:-
- CL_SIMPLE_TREE_MODEL
- CL_COLUMN_TREE_MODEL
- CL_ITEM_TREE_MODEL
Demo programs:-
- SAPSIMPLE_TREE_MODEL_DEMO
- SAPCOLUMN_TREE_MODEL_DEMO
- SAPTLIST_TREE_MODEL_DEMO
Refer thread :-
Hope it helps !!!!
Regards,
Ashish
‎2009 Mar 25 8:39 AM
Hello
I guess you are quite close to the root cause of this dump. Assuming that you are using MATNR (Char18) as key for your nodes you should use only the last 12 characters of the MATNR (assumption: only numeric material numbers).
Otherwise I recommend to use an arbitrary key (counter) for the node key and add MATNR as (hidden) item to your tree.
Regards
Uwe