cancel
Showing results for 
Search instead for 
Did you mean: 

In reference to Adjusting the width of the column in ALV

Former Member
0 Kudos

Hi All,

This is in reference to the thread

Here LR_COL is of type what?

I did as follows.

data: lr_column type ref to cl_salv_wd_column.

create object lr_column.

I am getting an error saying "The obligatory parameter "ID" had no value assigned to it."

Can any one help me out.

Regards,

Yugesh

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

hi Yugesh ,

FYI , there are different methods to get and set the Width and Algnment in ALV

SET_WIDTH : Set width of column

GET_WIDTH : Get width of column

SET_H_ALIGN : Set horizontal alignment of elements

GET_H_ALIGN : Get horizontal alignment of elements

declare a variable of type reference cl_salv_wd_column , get the ref of the column and use the above 4 methods for width and alignment

Regards,

amit

Answers (1)

Answers (1)

Former Member
0 Kudos

hi,

***Declaration

DATA: lr_col TYPE REF TO cl_salv_wd_column.

      • Get ref to column whose width is to be set .

lr_col= l_value->if_salv_wd_column_settings~get_column( 'STATUS' ).

***Set width.

lr_col->SET_WIDTH( '80' ) .

I hope it is clear.