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

Code for Expand selation

Former Member
0 Likes
523

Hi gurus this is my present  ALV output ... my client need to see  once the report will execute they what to see  defaultly  Expand Selection As i shown in the image 2,(when i click image1 o/p  bottom eExpand selation  it will become as i shown in  image2)  so can any one pls tell me  hw  to make  a default Expand selation. when i run the report.

Pls  give me  a  code..

i tried this 

  ls_layout-EXPAND_FIELDNAME  = 'EXPAND'.

it does n't work

IMAGE 1.
Inline image 1

IMAGE2. This  what i need  defaultly

Inline image 2

1 ACCEPTED SOLUTION
Read only

Sivakumar_Subramaniam
Product and Topic Expert
Product and Topic Expert
0 Likes
476

Hi Srithar,

If u have used SALV , the following code will do the trick.

data lo_columns TYPE REF TO cl_salv_columns_hierseq.

lo_columns = alv->get_columns( 1 ).

lo_columns->set_expand_column( 'EXPAND' ).

Thanks,

Sivakumar

1 REPLY 1
Read only

Sivakumar_Subramaniam
Product and Topic Expert
Product and Topic Expert
0 Likes
477

Hi Srithar,

If u have used SALV , the following code will do the trick.

data lo_columns TYPE REF TO cl_salv_columns_hierseq.

lo_columns = alv->get_columns( 1 ).

lo_columns->set_expand_column( 'EXPAND' ).

Thanks,

Sivakumar