cancel
Showing results for 
Search instead for 
Did you mean: 

Change Font style in ALV

prathamesh_gandhi
Participant
0 Kudos

Hi All,

i want to change the Font style to "STRIKEOUT" in ALV based on some condition. is it possible ?

Can you please share some sample code .

Thanks In Advance.

P$G.

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi,

Try this.. Hope it will be helpfull

You won't be able to control the font the same way in the WDA version of the ALV. 
You will need to create a custom cell editor for the column(s) in question. 
You can then bind context attributes to the properties of the cell editor.
You will need extra attributes in your bound context to control these settings on the row level.
Also you will be restricted by the changing the DESIGN property.
This means only the values allowed for the DESIGN of the particluar UI element.
For a TextView that wouldn't be the font directly (the font of course comes from the Theme).

  
DATA l_salv_wd_table TYPE REF TO iwci_salv_wd_table.  
l_salv_wd_table = wd_this->wd_cpifc_alv_adv( ). 
DATA l_table TYPE REF TO CL_SALV_WD_CONFIG_TABLE   l_table = l_salv_wd_table->get_model( ).
Data textview type ref to CL_SALV_WD_UIE_TEXT_VIEW.
l_column = l_table->if_salv_wd_column_settings~get_column( 'ADD_PARTICIPANTS' ). 
create object textview.   textview->SET_TEXT_FIELDNAME( 'ADD_PARTICIPANTS' ). 
textview->set_design_fieldname( 'ADD_DESIGN' ).
textview->set_wrapping( abap_true ). 
l_column->set_cell_editor( textview ).

guillaume-hrc
Active Contributor
0 Kudos

Hi,

You can have some formatting with UI control TextView: http://help.sap.com/saphelp_nw70ehp3/helpdata/EN/9d/a6884121a41c09e10000000a155106/content.htm

Otherwise, you will have to play with the WDA theme... Somme hints here: http://scn.sap.com/thread/1877659

Best regards,

Guillaume

Former Member
0 Kudos

You can refer the falowing link,  http://saptechnical.com/Tutorials/ALV/Font/change.htm