Skip to Content
avatar image
Former Member

Hierarchical ALV in Webdynpro Tree

Hi Experts,

ALV Table records are coming originally like this:

I have applied below code to achieve hierarchical functionality:

** Start Code for Hierarchical Column
* * Get ALV Component
lo_cmp_usage = WD_THIS->WD_CPUSE_ALV_comp( ).
IF lo_cmp_usage->has_active_component( ) IS INITIAL.
lo_cmp_usage->create_component( ).
ENDIF.

* Get References for ALV
lr_comp_if_alv = wd_this->wd_cpifc_alv_comp( ). " get component

lr_config = lr_comp_if_alv->get_model( ). " get cofig model
*lr_column_settings ?= lr_config. "get column settings

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

data lr_col type ref to CL_SALV_WD_COLUMN.

lr_col = lr_config->IF_SALV_WD_COLUMN_SETTINGS~GET_COLUMN( 'REQNO' )." Enable HIERARCHY for the col. specified
lr_col->IF_SALV_WD_COLUMN_HIERARCHY~SET_HIERARCHY_COLUMN( ABAP_TRUE ).
** End Of Code For Hierarchical Column Functionality

After This code Output is like below fashion:

But I want my result like below (Sub Node) not like wrapping up entire column in single one like above.

Please help me! Please mention code blocks with proper screen shots.

Thanks,

Saquib


aq6ff.png (140.6 kB)
wnq3m.png (15.5 kB)
pyk4v.png (14.3 kB)
4bwsx.png (115.2 kB)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

0 Answers