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

ALV TREE Report

Former Member
0 Likes
564

Dear all,

I am currently working on a tree alv report. Here i have 3 levels of heirearchy each heirearchy level has different fields to be displayed. Can anyone please help me out how to build the fieldcatalog when the field changes for each heirearchy level? If anyone can help me with sample report will be rewarded with points.

Example:

1st level - Netwrok Activity -- Display Fields from AFVC table

2nd level - Components of Activity - Display fields from RESB Table

3rd Level - Items of Component - Display fields from STPO table

We dont have such example in BCLAVTREE if so pls help me with some sample code of program how to build fieldcatolog.

Thanks & Regards

Sathish

Dear all,

I am currently working on a tree alv report. Here i have 3 levels of heirearchy each heirearchy level has different fields to be displayed. Can anyone please help me out how to build the fieldcatalog when the field changes for each heirearchy level? If anyone can help me with sample report will be rewarded with points.

Example:

1st level - Netwrok Activity -- Display Fields from AFVC table

2nd level - Components of Activity - Display fields from RESB Table

3rd Level - Items of Component - Display fields from STPO table

We dont have such example in BCLAVTREE if so pls help me with some sample code of program how to build fieldcatolog.

Thanks & Regards

Sathish

3 REPLIES 3
Read only

Former Member
0 Likes
526

Hi Satty,

Check the below link.

[http://help-abap.blogspot.com/search/label/OO%20ALV]

Read only

0 Likes
526

Hi Raj,

I require in ALV Grid Tree Report.

Thanks & Regards

Sathish

Read only

Former Member
0 Likes
526

Hi,

If it's going three level drill down list then you can use can see following piece of code. declaration should be like this.

top_of_page type slis_formname value 'TOP_OF_PAGE',

end_of_page type slis_formname value 'END_OF_PAGE',

user_command type slis_formname value 'USER_COMMAND',

pf_status_set type slis_formname value 'PF_STATUS_SET',

user_command1 type slis_formname value 'USER_COMMAND1',

pf_status_set1 type slis_formname value 'PF_STATUS_SET1',

and displaying the first list will be.

call function 'REUSE_ALV_GRID_DISPLAY'
exporting
* I_INTERFACE_CHECK = ' '
* I_BYPASSING_BUFFER =
* I_BUFFER_ACTIVE = ' '
i_callback_program = name
i_callback_pf_status_set = pf_status_set
i_callback_user_command = user_command
* I_STRUCTURE_NAME =
i_callback_top_of_page = 'TOP-OF-PAGE'
i_grid_title = 'CUSTOMER GROUP WISE REPORT'
is_layout = layout
it_fieldcat = fieldcat_t
* IT_EXCLUDING =
* IT_SPECIAL_GROUPS =
* it_sort = SORT_T
* IT_FILTER =
* IS_SEL_HIDE =
i_default = 'X'
i_save = 'A'
* IS_VARIANT =
* it_events = events_t
* IT_EVENT_EXIT =
* IS_PRINT =
* IS_REPREP_ID =
* IT_ADD_FIELDCAT = FIELDCAT_T1
* I_SCREEN_START_COLUMN = 0
* I_SCREEN_START_LINE = 0
* I_SCREEN_END_COLUMN = 0
* I_SCREEN_END_LINE = 0
* IMPORTING
* E_EXIT_CAUSED_BY_CALLER =
* ES_EXIT_CAUSED_BY_USER =
tables
t_outtab = it_basic.

and capturing user command will be like this.

form user_command using ucomm like sy-ucomm
selfield type slis_selfield.
case ucomm.
when '&IC1'.
read table it_basic index selfield-tabindex.
perform get_data_first_list using it_basic-kdgrp.
when '&PLEVEL'.
when '&CUST'.
when '&F15'.
leave to screen 0.
endcase.
endform. "user_command

you may be able to display the similar when the double click a line or clicking on a button.

if you want have mulitple header lines on the top of page you can this.

form top-of-page.
*ALV Header declarations
data: t_header type slis_t_listheader,
wa_header type slis_listheader.

wa_header-typ = 'H'.
wa_header-info = xhead.
append wa_header to t_header.
clear wa_header.

concatenate sy-datum+6(2) sy-datum+4(2) sy-datum+0(4) into xhead1
separated by '.'.

wa_header-typ = 'H'.
wa_header-info = xhead1.
append wa_header to t_header.
clear wa_header.

* append t_header.

*append t_header.

call function 'REUSE_ALV_COMMENTARY_WRITE'
exporting
it_list_commentary = t_header.
* i_logo = 'Z_LOGO'.
endform. "top-of-page

May it helps you.

Regards.

DS