2009 Feb 27 1:22 PM
hi friends,
please could you help let me know.
hoiw to display the hierachical list for the data using alv eports.
example: header having the item details in the below .
thanks in adv.
hi friends,
please could you help let me know.
hoiw to display the hierachical list for the data using alv eports.
example: header having the item details in the below .
thanks in adv.
2009 Feb 27 1:30 PM
Hi
you can use this FM ''REUSE_ALV_HIERSEQ_LIST_DISPLAY''
You can refer these programs in se38
BCALV_TEST_HIERSEQ_LIST
BCALV_TEST_HIERSEQ_LIST_EVENTS
Edited by: Komal Prakashlal Lakhwani on Feb 27, 2009 7:02 PM
2009 Feb 27 1:32 PM
Hi
try this code .This will give you ALV TREE structure and now make the changes
according to your needs.
REPORT zalv_tree.
DATA:
t_node TYPE snodetext.
DATA:
it_node LIKE TABLE OF t_node,
wa_node LIKE LINE OF it_node.
DATA:
t_spfli LIKE TABLE OF spfli,
wa_spfli LIKE LINE OF t_spfli,
t_sflight LIKE TABLE OF sflight,
wa_sflight LIKE LINE OF t_sflight.
SELECT * FROM spfli INTO TABLE t_spfli.
SELECT * FROM sflight INTO TABLE t_sflight.
wa_node-type = 'T'.
wa_node-name = 'SPFLI'.
wa_node-tlevel = '01'.
wa_node-nlength = '15'.
wa_node-color = '4'.
wa_node-text = wa_spfli-carrid.
wa_node-tlength ='20'.
wa_node-tcolor = 3.
APPEND wa_node TO it_node.
CLEAR wa_node.
LOOP AT t_spfli INTO wa_spfli.
LOOP AT t_sflight INTO wa_sflight WHERE carrid = wa_spfli-carrid.
wa_node-type = 'P'.
wa_node-name = 'SFLIGHT'.
wa_node-tlevel = '02'.
wa_node-nlength = '8'.
wa_node-color = '1'.
wa_node-text = wa_sflight-carrid.
wa_node-tlength ='20'.
wa_node-tcolor = 4.
APPEND wa_node TO it_node.
CLEAR wa_node.
wa_node-type = 'P'.
wa_node-name = 'CONNID'.
wa_node-nlength = '8'.
wa_node-color = '1'.
wa_node-text = wa_sflight-connid.
wa_node-tlength ='20'.
wa_node-tcolor = 4.
APPEND wa_node TO it_node.
CLEAR wa_node.
ENDLOOP.
ENDLOOP.
CALL FUNCTION 'RS_TREE_CONSTRUCT'
TABLES
nodetab = it_node.
CALL FUNCTION 'RS_TREE_LIST_DISPLAY'
EXPORTING
callback_program = sy-repid
check_duplicate_name = '1'
color_of_node = '4'
color_of_mark = '3'
color_of_link = '1'
color_of_match = '5'
node_length = 30
text_length = 75
use_control = 'L'.Regards
Hareesh
PLS DONT FORGET TO CLOSE THE THREAD
2009 Feb 27 1:33 PM
chk these prg:
BCALV_TEST_HIERSEQ_LIST
BCALV_TEST_HIERSEQ_LIST_EVENTS
these help you to undertsand how to display hierarchical ALVs.
u can search in SCN . there are a lot of posts reg the same.
2009 May 11 2:56 PM
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |