Application Development 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: 

From text-t01 to character

former_member2492
Active Participant
0 Kudos

Hello,

I am using Alv cl_salv_table and I want to use my text elements as columns names:

data:   lv_col_l(40),
lv_col_m(20),
lv_col_s(10)
write TEXT-t01 to lv_col_s.
write TEXT-t01 to lv_col_m.
write TEXT-t01 to lv_col_l.
      column = columns->get_column( 'MENGE' ).
column->set_short_text( lv_col_s ).
column->set_medium_text( lv_col_m ).
column->set_long_text( lv_col_l ).
I have tried everything lv_col_s are empty,and I dont know how to fill them.Please help!
5 REPLIES 5

FredericGirod
Active Contributor

what do you have in text-t01 ?

FredericGirod
Active Contributor
0 Kudos

Could you try :

     column = columns->get_column( 'MENGE' ).
column->set_short_text( conv #( text-t01 ) ).

DominikTylczyn
Active Contributor
0 Kudos

Have you defined the text symbol t01? What's its value? You may check the following first:

data:   lv_col_l(40),
        lv_col_m(20),
        lv_col_s(10)
      write 'TEXT-t01' to lv_col_s.
      write 'TEXT-t01' to lv_col_m.
      write 'TEXT-t01' to lv_col_l.<br>

former_member2492
Active Participant
0 Kudos

Hi frdric.girod in text-t01 is a text:"this column",I tried with conv #( text-t01 ) it does not work.please try it yourself can you populate the variables with the text?

former_member2492
Active Participant
0 Kudos

waittt it works ,I just had the texts in another language!