06-02-2008 8:15 AM
Hi all,
right now i m working with SAPTLIST_TREE_CONTROL_DEMO program.
now the problem is that, i have an internal table which have multiple records, now i want to print all records in internal table through
INCLUDE TLIST_TREE_CONTROL_DEMOF01
my code is look like :
LOOP AT I_FINAL.
CLEAR ITEM.
item-node_key = c_nodekey-new1.
ITEM-ITEM_NAME = '2'.
ITEM-CLASS = CL_GUI_LIST_TREE=>ITEM_CLASS_TEXT.
ITEM-LENGTH = 4.
ITEM-USEBGCOLOR = 'X'.
ITEM-TEXT = I_FINAL-MTART.
"ITEM-TEXT = '01'.
APPEND ITEM TO ITEM_TABLE.
CLEAR ITEM.
item-node_key = c_nodekey-new1.
ITEM-ITEM_NAME = '3'.
ITEM-CLASS = CL_GUI_LIST_TREE=>ITEM_CLASS_TEXT.
ITEM-LENGTH = 11.
ITEM-USEBGCOLOR = 'X'. "
"ITEM-TEXT = 'Zert'.
ITEM-TEXT = I_FINAL-IDNRK+9(9).
APPEND ITEM TO ITEM_TABLE.
CLEAR ITEM.
item-node_key = c_nodekey-new1.
ITEM-ITEM_NAME = '4'.
ITEM-CLASS = CL_GUI_LIST_TREE=>ITEM_CLASS_TEXT.
ITEM-ALIGNMENT = CL_GUI_LIST_TREE=>ALIGN_AUTO.
ITEM-FONT = CL_GUI_LIST_TREE=>ITEM_FONT_PROP.
item-text = ''(006).
APPEND ITEM TO ITEM_TABLE.
ENDLOOP.
but dump error is occured when record is greater than one.
with one record report is running successfully.
plz reply as soon as possible
thanx in advance.
06-02-2008 8:20 AM
make sure that the item-node_key is unique for each record.
whats the dump message?
06-02-2008 8:26 AM
1 FUNCTION AC_SYSTEM_FLUSH .
2 *"----
3 ""Lokale Schnittstelle:
4 *" IMPORTING
5 *" VALUE(CALLED_BY_SYSTEM) TYPE C OPTIONAL
6 *" EXCEPTIONS
7 *" CNTL_SYSTEM_ERROR
8 *" CNTL_ERROR
9 *"----
10 data: sysubrc like sy-subrc.
11
12 CALL FUNCTION 'AC_FLUSH_CALL'
13 EXPORTING
14 SYSTEM_FLUSH = 'X'
15 CALLED_BY_SYSTEM = CALLED_BY_SYSTEM
16 IMPORTING
17 MESSAGE_NR = sysubrc
18 MESSAGE_TEXT = SY-MSGLI.
19
20 sy-subrc = sysubrc.
21
22 CASE SY-SUBRC.
23 WHEN 0.
24 WHEN 1.
25 * system_error
26 MESSAGE ID 'CNDP' TYPE 'X' NUMBER 007 RAISING CNTL_SYSTEM_ERROR.
27 WHEN 2.
28 * method_call_error
>>>> MESSAGE ID 'CNDP' TYPE 'X' NUMBER 006 RAISING CNTL_ERROR.
30 WHEN 3.
31 * property_set_error
32 MESSAGE ID 'CNDP' TYPE 'X' NUMBER 006 RAISING CNTL_ERROR.
33 WHEN 4.
34 * property_get_error
35 MESSAGE ID 'CNDP' TYPE 'X' NUMBER 006 RAISING CNTL_ERROR.
36 WHEN OTHERS.
Technical information about the m
Message class....... "CNDP"
Number.............. 006
Variable 1.......... " "
Variable 2.......... " "
Variable 3.......... " "
Variable 4.......... " "
06-02-2008 8:27 AM
how can i increment the node key as per my requirement?
plz give me one example
06-02-2008 9:11 AM
does your itab I_FINAL has any field which is unique for each record, if yes , use it are use a counter variable within the loop to arrive at a unique id for each record
06-02-2008 11:18 AM
I have internal table which contain these values: how can i print these value using SAPTLIST_TREE_CONTROL_DEMO. Plz. give me answer through code
1 00000139 000000000200000046 B CARTON Profol 1% 10ml
2 00000139 000000000550000050 Metoclopramide Injection BP (5 mg/ml)
06-02-2008 12:52 PM
06-02-2008 1:27 PM
Actually till now i m facing problem.
its my first project which is Ops based.
plz help me.
actually still i confused where i start loop for printing?
06-08-2008 6:21 PM
Hello Anshuman
Activate the tree control trace by referring to note 637844.
Once you run your application, please open the trace file and search for error. Also refer to note 438387 for different kind of error messages.
Update this thread with the error message you received.
Regards,
Dinesh