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: 

cl_salv_tooltip error ?

former_member194669
Active Contributor
0 Kudos
104

Hi,

I am using SALV TREE and make tooltip for tree nodes , but i am getting a syntax error invalid parameter.



method set_color_for_tooltips.
  data: settings type ref to cl_salv_tree_settings,
  tooltips type ref to cl_salv_tooltips, 
  value type lvc_value.
  settings = gr_tree->get_tree_settings( ).
  tooltips = settings->get_tooltips( ).
  value = if_salv_c_tree_style=>emphasized_negative.
try.
  tooltips->add_tooltip(
  type = cl_salv_tooltip=>cl_type_tree_style
  value = value
  tooltip = text-100 ).
  catch cx_salv_existing.
endtry.
  value = if_salv_c_tree_style=>emphasized_positive.
try.
  tooltips->add_tooltip(
  type = cl_salv_tooltip=>cl_type_tree_style 
  value = value
  tooltip = text-101 ). "<<<<<< Error pointing to this
  catch cx_salv_existing.
endtry.
endmethod.

1 ACCEPTED SOLUTION

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos
47

Try moving the text-101 to a variable with the same type as the importing parameter of the method.

Regards,

RIch Heilman

2 REPLIES 2

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos
48

Try moving the text-101 to a variable with the same type as the importing parameter of the method.

Regards,

RIch Heilman

0 Kudos
47

Rich,

Thanks. That solved my problem