cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamic binding for table column

Former Member
0 Kudos

Hi,

I am using standard application and in a table (not ALV) i want to chnage the name of a column. Already a OTR is placed in it so am planning to do a dynamic bind for the text in the header. Kindly suggest ways.

Thanks,

Koushik

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hai,

Check this code..

data tc1 type ref to cl_wd_table_column. " column

data tv type ref to cl_wd_text_view. " text view (column property)

root ?= view->get_element( 'ROOTUIELEMENTCONTAINER' ).

tv = cl_wd_textview=>new_text_view( bind_text = 'itab-id' ). " column text

tc1 = cl_wd_table_column=>new_table_column().

table->add_column( tc1 ).

root->add_child( table ).

Former Member
0 Kudos

DATA:

l_caption TYPE string,

l_title TYPE string.

data lr_caption type ref to cl_wd_caption.

*---Get OTR Text for Value Description

CALL METHOD cl_wd_utilities=>get_otr_text_by_alias

EXPORTING

alias = 'ZPERF_MGMT_DEV/RATING'

  • language =

RECEIVING

alias_text = l_title.

lr_caption ?= view->get_element( 'TBL_VAL_HELP_DESCRIPTION_HEADER' ).

lr_caption->set_text( value = l_title ).

Answers (2)

Answers (2)

Former Member
0 Kudos

solved

Former Member
0 Kudos

Dear Koushik,

You can define binding for the text property of Column header.

Please elaborate as its not clear what you want.

Warm regards,

Upendra Agrawal