on 07-01-2009 9:35 AM
I am creating ALV report in this the field discretion is comming from data element but i wan to display my custom discretion in that can any body help me on this
thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
DATA: l_column_settings TYPE REF TO if_salv_wd_column_settings.
DATA: l_column_header TYPE REF TO cl_salv_wd_column_header .
DATA: lt_columns TYPE salv_wd_t_column_ref ,
ls_columns TYPE salv_wd_s_column_ref .
* Instantiate
DATA lo_cmp_usage TYPE REF TO if_wd_component_usage.
lo_cmp_usage = wd_this->wd_cpuse_usg_alv( ).
IF lo_cmp_usage->has_active_component( ) IS INITIAL.
lo_cmp_usage->create_component( ).
ENDIF.
* Get Model
DATA lo_interfacecontroller TYPE REF TO iwci_salv_wd_table .
lo_interfacecontroller = wd_this->wd_cpifc_usg_alv( ).
DATA lo_value TYPE REF TO cl_salv_wd_config_table.
lo_value = lo_interfacecontroller->get_model(
).
*---------- Column settings
l_column_settings ?= lo_value.
* Get columns
lt_columns = l_column_settings->get_columns( ) .
LOOP AT lt_columns INTO ls_columns .
CASE ls_columns-id .
WHEN 'COLUMN1' .
l_column_header = ls_columns-r_column->get_header( ) .
l_column_header->set_ddic_binding_field(
if_salv_wd_c_column_settings=>ddic_bind_none ) .
l_column_header->set_text( 'Quanity' ) . " column heading
WHEN 'COLUMN2'
......
ENDCASE.
ENDLOOP.
Regards,
Radhika.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HI
Use the ALV header and set text method
DATA: lr_column type ref to cl_salv_wd_column,
lr_alv_header type ref to cl_salv_wd_column_header,
lo_value type ref to cl_salv_wd_config_table.
lr_column = lo_value->if_salv_wd_colmun_settings->get_column( 'COL1' ).
CALL METHOD lr_column->get_header
RECEIVING
value = lr_alv_header.
lr_alv_header->set_ddic_binding_field(
if_salv_wd_c_ddic_binding=>ddic_bind_none ).
lv_name = 'Flight name'.
lr_alv_header->set_text( lv_name ).
Regards,
Lekha.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
9 | |
9 | |
9 | |
6 | |
6 | |
5 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.