cancel
Showing results for 
Search instead for 
Did you mean: 

alv column text wraping whis CONCATENATE

Former Member
0 Kudos

Hi,

i got a special Problem here.

In my ALV Table i got a Colum name 'ZUSTIMMUNG'. In each field of this Colum i want to concatenate 6 data fields.
The Result schould be look like this:

a) blah

b) blubb

c) xyz

My Codings für the concatinate fields ist like this


DATA: zustimmung_conc TYPE char45,
           a(3) type c VALUE ' a)'.
     CLEAR zustimmung_conc.
     IF wa_zberufuverf-zustimmen_a IS NOT INITIAL.
       CONCATENATE a wa_zberufuverf-zustimmen_a INTO zustimmung_conc.
     ENDIF.
     IF wa_zberufuverf-zustimmen_b IS NOT INITIAL.
       CONCATENATE zustimmung_conc ' b]' wa_zberufuverf-zustimmen_b INTO zustimmung_conc.
     ENDIF.
     IF wa_zberufuverf-zustimmen_c IS NOT INITIAL.
       CONCATENATE zustimmung_conc ' c]' wa_zberufuverf-zustimmen_c INTO zustimmung_conc.
     ENDIF.

     wa_bv_uebersicht-zustimmung = zustimmung_conc.

Later in my coding i set the column wrapper to true


l_column = alv_config_table->if_salv_wd_column_settings~get_column( 'ZUSTIMMUNG' ).
create OBJECT column_set_text.
column_set_text->set_text_fieldname( 'ZUSTIMMUNG' ).
column_set_text->set_wrapping( ABAP_TRUE ).
l_column->set_cell_editor( column_set_text ).

The result in my ALV-Table is this

a)

blah

b)

blubb

c)

xyz

this is the result of the wrapping, i know, but without the wrapping i get

a) blah b) blubb c) xyz

it thougt the Concatenate would be helpfull but in combination with the wrapping i got a linebreak after each variable.

Is there a solution for me? to get what i whant?

kr

tobi

Accepted Solutions (0)

Answers (1)

Answers (1)

ramakrishnappa
Active Contributor
0 Kudos

Hi Tobias,

I don't think there is way to achieve your requirement in alv.

We cannot have cell editor like TEXT EDIT or formatted text edit ui elements in alv like we do it in table ui element.

Only wrapping functionality we are having with Text view element.

Regards,

Rama

Former Member
0 Kudos

Hi Rama,

thanks for your Answer, mh..maybe there is a way to put something like a lineberake in my variable

but something like

cl_abap_char_utilities=>newline

or

cl_abap_char_utilities=>cr_lf

did not wok because the alv interprets this as ## or #

damit..

ramakrishnappa
Active Contributor
0 Kudos

Hi Tobias,

The newline characters cannot be interpreted in alv but if we have textEdit ui element we can get new line breaks.

Regards,

Rama

Former Member
0 Kudos

Hi Rama,

but it is not possiple to use textEdit ui in alv...

or am i wrong

ramakrishnappa
Active Contributor
0 Kudos

Yes you are right that we cannot have text edit in alv ,


I already mentioned in my previous reply that,

We cannot have cell editor like TEXT EDIT or formatted text edit ui elements in alv like we do it in table ui element.