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: 

TOP_OF_PAGE icon not displayed - for SALV

former_member194669
Active Contributor
0 Kudos

Hi,

I am using OO model for ALV. I am displaying an ALV of incomplete orders , in the top of page i need to display a incomplete icon, for user easy verification.

My problem is top of page is displaying but icon is not displayed. why?

Here is the code :


data: gr_table   type ref to cl_salv_table.
data: l_top_element type ref to cl_salv_form_layout_grid.
data: l_icon type ref to cl_salv_form_icon.

create object l_top_element
   EXPORTING
     COLUMNS = 2.

create object l_icon
    exporting
      icon   = '@02@'      " Incomplete
      tooltip = text-100.  " Incomplete Orders

   
 gr_table->set_top_of_list( l_top_element ).

1 ACCEPTED SOLUTION

RichHeilman
Developer Advocate
Developer Advocate

For example, take a quick look at example program SALV_DEMO_TABLE_LAYOUT, at the bottom. You will see this coding, notice that you have to call the SET_ELEMENT from your form object and pass the icon object to it. In this example, there is an grid object between the icon and the the top element object




  create object lr_icon
    exporting
      icon   = '@0A@'     "#EC NOTEXT
      tooltip = 'Air'.     "#EC NOTEXT

  call method lr_grid->set_element
    exporting
      row       = 3
      column    = 1
      r_element = lr_icon.

 gr_table->set_top_of_list( lr_top_element ).


Regards,

Rich Heilman

4 REPLIES 4

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos

I can't see where you are adding the l_icon to l_top_element object.

This is probably your issue.

Regards,

Rich Heilman

Edited by: Rich Heilman on Jan 4, 2008 2:51 PM

0 Kudos

Rich,

Here top-of-page header displayed


---------------------------------------
No of incomplete orders : XXXX
No of partial orders    : XXXX

XXX <-- Here icon to be displayed " But not displayed

" The top texts are displaying

---------------------------------------

RichHeilman
Developer Advocate
Developer Advocate

For example, take a quick look at example program SALV_DEMO_TABLE_LAYOUT, at the bottom. You will see this coding, notice that you have to call the SET_ELEMENT from your form object and pass the icon object to it. In this example, there is an grid object between the icon and the the top element object




  create object lr_icon
    exporting
      icon   = '@0A@'     "#EC NOTEXT
      tooltip = 'Air'.     "#EC NOTEXT

  call method lr_grid->set_element
    exporting
      row       = 3
      column    = 1
      r_element = lr_icon.

 gr_table->set_top_of_list( lr_top_element ).


Regards,

Rich Heilman

0 Kudos

Thanks Rich,

I forget to set element


call method l_grid->set_element
    exporting
      row       = 3
      column    = 1
      r_element = l_icon.

Problem solved