Application Development and Automation 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: 
Read only

alv

Former Member
0 Likes
796

Hi

how to highlight the particular row in a output of alv list or grid.

thanks,

kiran.M

1 ACCEPTED SOLUTION
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
766

Not Relevant - Removed.

Regards,

Rich Heilman

Hi

how to highlight the particular row in a output of alv list or grid.

thanks,

kiran.M

7 REPLIES 7
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
767

Not Relevant - Removed.

Regards,

Rich Heilman

Read only

0 Likes
766

Hi rich

i want in the display output i want to select a particular row by default

thanks,

kiran.M

Read only

0 Likes
766

Oh, sorry. I thought you meant color.

Regards,

Rich Heilman

Read only

0 Likes
766

In this example, it is selecting rows 3 and 4.



report  zrich_0005.


data: it001w type table of t001w with header line.
data:   layout  type lvc_s_layo.

parameters: p_check type c.

start-of-selection.

at selection-screen output.

  data: dockingleft type ref to cl_gui_docking_container,
        alv_left     type ref to cl_gui_alv_grid,
        repid type syrepid.

  repid = sy-repid.

  select * into corresponding fields of table it001w
              from t001w.

  check dockingleft is initial.

  create object dockingleft
              exporting repid     = repid
                        dynnr     = sy-dynnr
                        side      = dockingleft->dock_at_left
                        extension = 1500.

  create object alv_left
                exporting i_parent = dockingleft.

* Set selection mode to "D"  --  Multiple Lines
  layout-sel_mode = 'D'.

  call method alv_left->set_table_for_first_display
     exporting
             is_layout              = layout
          i_structure_name       = 'T001W'
     changing
          it_outtab       = it001w[].


 <b>data: irows type lvc_t_roid.
  data: xrows like line of irows.

  xrows-row_id = '3'.
  append xrows to irows.
  xrows-row_id = '4'.
  append xrows to irows.

  call method alv_left->set_selected_rows
     exporting
       it_row_no     = irows.</b>

Read only

0 Likes
766

Hi Rich ,

thank you very much ,

i have 1 doubt what is the purpose of

side = dockingleft->dock_at_left

i mean " dock_at_left "

thanks and regards,

kiran.M

Read only

0 Likes
766

In this example, I have implemented the alv grid in a docking container rather than a dynpro custom container. The reason is simply, that it provides a cut/paste example, just copy and paste code in SE38, and you can run it without having to create the dynpro. The DOCK_AT_LEFT simply means that the docking container will be hanging on the left side of the screen, you can also docking at TOP, BOTTOM, and RIGHT.

If you change the extension, you will see the docking container a little better. Change to like 500. I have it set at 1500, so that it is full screen.

extension = 500

Regards,

Rich Heilman

Read only

Former Member
0 Likes
766

HI Kiran,

Just check

Check out the section C.4 of the ALV Grid Control tutorial published on SDN You may find something to help you there.

Regards

Laxmi

Message was edited by: Laxmi