cancel
Showing results for 
Search instead for 
Did you mean: 

Hierarchical ALV Report in webdynpro abap

Former Member
0 Kudos

Hi Experts,

I'm facing the trouble with requirement as below. Please help me to resolve this issue.

Output as:

Material Number                         Description               Created Date

- 10001(Header data)                      abc                         09-09-2013  

          1001 (item level data)            abc                         10-09-2013

          1002                                   xyz                          11-09-2013

          1003                                   xyz                          11-09-2013    

- 10002(Header data)                      abc                         09-09-2013  

          2001 (item level data)            abc                         10-09-2013

          2002                                   xyz                          11-09-2013

          2003                                   xyz                          11-09-2013    

- 10003(Header data)                      abc                         09-09-2013  

          3001 (item level data)            abc                         10-09-2013

          3002                                   xyz                          11-09-2013

          3003                                   xyz                          11-09-2013    

.... and so on...

- when I expand on header Materail number, it has to be display with item level data with   in alv report in webdynpro abap.

Looking forward your valuable comments.

Regards,

Venkat

Accepted Solutions (0)

Answers (1)

Answers (1)

harsha_jalakam
Active Contributor
0 Kudos

Hi Venkat,

We can achieve the  HIERARCHY through the following code.In this case I have used  CARRID as the drill down column.

data lo_cmp_usage type ref to if_wd_component_usage.

lo_cmp_usage =   wd_this->wd_cpuse_flight_tree( ).
if lo_cmp_usage->has_active_component( ) is initial.
   lo_cmp_usage->create_component( ).
endif.

DATA lo_INTERFACECONTROLLER TYPE REF TO IWCI_SALV_WD_TABLE .
lo_INTERFACECONTROLLER =   wd_this->wd_cpifc_flight_tree( ).

   DATA lv_value TYPE ref to cl_salv_wd_config_table.
   lv_value = lo_interfacecontroller->get_model(
   ).


lv_value->IF_SALV_WD_TABLE_SETTINGS~SET_DISPLAY_TYPE(  IF_SALV_WD_C_TABLE_SETTINGS=>DISPLAY_TYPE_HIERARCHY ).

"Enable HIERARCHY structure


data lr_col type ref to CL_SALV_WD_COLUMN.

lr_col = lv_value->IF_SALV_WD_COLUMN_SETTINGS~GET_COLUMN( 'CARRID' )." Enable HIERARCHY for the col. specified
lr_col->IF_SALV_WD_COLUMN_HIERARCHY~SET_HIERARCHY_COLUMN( ABAP_TRUE ).


Regards,

Harsha

Former Member
0 Kudos

This message was moderated.

Former Member
0 Kudos

Hi Harsha,

Thank you so much for given responses & its helpful to me. But my requirement is "I want to display the Header level Material number with Mateial description of Header material after that when I click/expand then expecting the item level details. But in this article I'm missing description.

Please help for this & waiting for the values reponses.

Regards,

Venkat

harsha_jalakam
Active Contributor
0 Kudos

Hi Venkat,

We can achieve the hierarchical tree structure as shown,but I think we can not add description data into the fields, as the data binded to ALV from the data node.

Regards,

Harsha,