Application Development and Automation 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: 
Read only

regarding ALVs

Former Member
0 Likes
688

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.

4 REPLIES 4
Read only

Former Member
0 Likes
658

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

Read only

Former Member
0 Likes
658

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

Read only

Former Member
0 Likes
658

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.

Read only

Former Member
0 Likes
658

over