cancel
Showing results for 
Search instead for 
Did you mean: 

Link to action in ALV text color change after use(clicked).??

Former Member
0 Kudos

HI Experts,

  As we see on normal website when we use the Hyperlink the page shows different color text in hyperlink(Usually other than Blue).

Can we incorporate the same in our ABAP Web Dynpro.??

i check the class CL_SALV_WD_COLUMN, here we can change the Cell Color but I didin't find one to change the text color after Link used in ALV.

Please advise.

Thank you,

KR

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

HI Nagarjun/Jr.

Thanks for your responses; I wanted to implement a typical web-browser property.

When Hyperlink shown on browser it is Bright Blue color when you use the link it turns into dull red(orange) depending on the web-site settings.

I want to implement this on our ALV screen with link to action.

I found no way to do it in existing properties of ALV column.

@Jr: Yes it is possible to change the cell color.

here is the link for sample code.

http://wiki.sdn.sap.com/wiki/display/Snippets/ABAP+Web+Dynpro+ALV+-+Change+Cell+Colour+based+on+Cont...

i've used above to change the cell color. Though this is not what i'm looking for.

To check possible colors. please check Class: CL_WD_TABLE_COLUMN=>E_CELL_DESIGN

constant values.

Thank you,

Kiran

nagarjun_kalletla
Participant
0 Kudos

HI Kiran Singh,

As far as I Know , When ever we create Link to Action . The color of text will be Blue  only as shown in Figure below.

A

Below Code Shows How Can we create Input field , Button , Link to Action in ALV

*& Create Input field

data input type ref to cl_salv_wd_uie_input_field.

CREATE OBJECT input

   EXPORTING

     value_fieldname = 'ZEMPNAME'

     .

*& getthe column ref

data col type REF TO cl_salv_wd_column.

CALL METHOD lv_value->if_salv_wd_column_settings~get_column

   EXPORTING

     id     = 'ZEMPNAME'

   receiving

     value  = col.

*& set cell editor

CALL METHOD col->set_cell_editor

   EXPORTING

     value  = input

     .

*& created Button

data : button type ref to cl_salv_wd_uie_button.

CREATE OBJECT button.

CALL METHOD button->set_text_fieldname

   EXPORTING

     value  = 'ZSALARY'

     .

data col1 type REF TO cl_salv_wd_column.

CALL METHOD lv_value->if_salv_wd_column_settings~get_column

   EXPORTING

     id     = 'ZSALARY'

   receiving

     value  = col1.

CALL METHOD col1->set_cell_editor

   EXPORTING

     value  = button.

*& create Hyper link

data : lo_link type REF TO cl_salv_wd_uie_link_to_action.

CREATE OBJECT lo_link.

CALL METHOD lo_link->set_text_fieldname

   EXPORTING

     value  = 'ZLOCATION'

     .

data col2 type REF TO cl_salv_wd_column.

CALL METHOD lv_value->if_salv_wd_column_settings~get_column

   EXPORTING

     id     = 'ZLOCATION'

   receiving

     value  = col2.

CALL METHOD col2->set_cell_editor

   EXPORTING

     value  = lo_link.

*& set read only false

CALL METHOD lv_value->if_salv_wd_table_settings~set_read_only

   EXPORTING

     value  = ABAP_false

     .

If this is what you are not Looking at , Please Tell us your problem in Detail

Former Member
0 Kudos

As far as i know it is imposibble to change the link to action text color, but i would suggest you to use the property of design. when use clicked the link then the text can become standard to emphasized or vice versa. Or as  Yarru said you can use textview element but you cant bind any action to textview.

Former Member
0 Kudos

Hi Srini/Jr,

Thanks for your response, but i was trying to change the text color in ALV cell.

I didin't find any options here so

i think it is okay if i change the cell color to show difference in used or unused link.

Thank you,

Kiran

former_member219762
Contributor
0 Kudos

Hi,

   If you want change the color of text you should use TextView UI element otherwise we cannot change the color of text.

Check http://help.sap.com/saphelp_nw04s/helpdata/EN/9d/a6884121a41c09e10000000a155106/content.htm

Regards,

Sreenivas.