cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamic Tool Tip

Former Member
0 Kudos

Hi All,

I have a requirement in a normal table control i m displaying green and red led icon each cell based on field content so i have to set tool tip dynamically

i m able to do dynamic biding of tool tip but now the issue is that should display in multiple lines with fixed size

for example: empid : XXXXXXXXXXX

Name : XXXXXXXXXXXXXXXXXXXXXXXX

Address : XXXXXXXXXXXXXXXXXXXXX

how can i achieve that..

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi Santhosh,

As suggested sana use cl_abap_char_utilities=>newline.

Try like this.. in coding . it is working fine..

data : lv1 TYPE string,
         lv2 TYPE string,
         lv3 TYPE string.

  lv1 = 'ID : 12345'.
  lv2 = 'Name : Santosh'.
  lv3 = 'India'.


  CONCATENATE lv1

   cl_abap_char_utilities=>newline  lv2    // use cl_abap_char_utilities=>newline   between two variables you get new line.
   cl_abap_char_utilities=>newline lv3 into lv_string .

* set single attribute
  lo_el_context->set_attribute(
    name =  `STRING` // your attribute which is bind to table column tooltip property
    value = lv_string ).

Cheers,

Kris.

Former Member
0 Kudos

Hi Kris and Srinivas,

Thanks for the replies with good answers...

Tool tip is coming in multiple lines as you said using cl_abap_char_utilities=>newline and also without doing that also its coming simply by concatinating space with each variable.. that ok fine i followed yours and implemented..

I will give you points...

tittle more information required now the tooltip alignment is chaging based on text chaning..

example:

Room Reservation by :XXXXXXX

E-mail Id :XXXXXXXXXXXXXXXXXX

Reserved from :XXXXXXXXXXXXXXXXXXXXXXXXXX

Reserved to : XXXXXXXXXXXXXXXXXXXX

it has to display like above but it displaying like bellow.

Room Reservation by :XXXXXXX

E-mail Id:XXXXXXXXXXXXXXXXXX

Reserved from :XXXXXXXXXXXXXXXXXXXXXXXXXX

Reserved to:XXXXXXXXXXXXXXXXXXXX

I did concatenating like this..

CONCATENATE 'Room Reservation by :' lwa_rooms_data1-responsiblename INTO lv_person.

CONCATENATE 'E-mail Id :' lv_email1 INTO lv_email1.

CONCATENATE 'Reserved from :' lv_datefrom1 '-' lv_timefrom1 INTO lv_fromdatetime.

CONCATENATE 'Reserved to :' lv_dateto1 '-' lv_timeto1 INTO lv_todatetime.

CONCATENATE lv_person

cl_abap_char_utilities=>newline lv_email1

cl_abap_char_utilities=>newline lv_fromdatetime

cl_abap_char_utilities=>newline lv_todatetime

INTO lv_tool_tip.

How can i adjust that alignment...

former_member199125
Active Contributor
0 Kudos

try by concatening the text.

data text type string.

concatenate 'emp id :' emp id variable cl_abap_char_utilities=>new_line into text separted by space.

Regards

Srinivas

Former Member
0 Kudos

Hi Srinivas,

Thanks for giving idea. it is working fine.

Cheers,

Kris.

Former Member
0 Kudos

Hi Santhosh,

for example: empid : XXXXXXXXXXX
Name : XXXXXXXXXXXXXXXXXXXXXXXX
Address : XXXXXXXXXXXXXXXXXXXXX

Above all is in tooltip.

You will get tooltip multiple lines. when ends first line.

deleted..

Cheers,

Kris.

Edited by: kissnas on Oct 10, 2011 8:36 AM