cancel
Showing results for 
Search instead for 
Did you mean: 

How to remove horizontal lines in ALV_LIST

Former Member
0 Kudos

I want to remove horizontal lines from the list. But cannot please help.

gc_true = 'X'.

gs_layout_list-no_hline = gc_true.

gs_layout_list-no_vline = gc_true.

CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'

EXPORTING

I_CALLBACK_PROGRAM = g_repid

I_CALLBACK_PF_STATUS_SET = 'SET_PF_STATUS'

I_STRUCTURE_NAME = gc_structure

IT_FIELDCAT = gt_fieldcat_list

I_SAVE = gc_save

IS_VARIANT = gs_variant

IT_EVENTS = gt_eventtab_list

IS_LAYOUT = gs_layout_list

IT_SORT = gt_sort

is_print = gs_print

TABLES

T_OUTTAB = gt_output_value

EXCEPTIONS

PROGRAM_ERROR = 1

OTHERS = 2.

Accepted Solutions (1)

Accepted Solutions (1)

hymavathi_oruganti
Active Contributor
0 Kudos

just check whether in gt_sort if u have mentioned

gs_sort-group = 'UL'

Answers (4)

Answers (4)

former_member219162
Contributor
0 Kudos

Hi,

There is no field like "NO_HLINE" in the layout. You have only "NO_VLINE". If you set NO_VLINE = 'X', then the vertical line is removed in the output. But to remove the Horizontal Line you need to do that in the output itself.

Goto "CHANGE LAYOUT"-->DISPLAY-->then select "without Horizontal Gridline".

I beleive programatically this is not achievable,since u dont have the field as HLINE to set.

Regards,

Anirban

Former Member
0 Kudos

Indeed there is NO_HLINE!!!

But only in SAP R/3 5.0

Message was edited by: Fuat Ulugay

Former Member
0 Kudos

Hi,

Please go through the following code and make necessary changes in your program.

-


*LAYOUT STRUCTURE

LAYOUT TYPE LVC_S_LAYO.

-


*ASSIGNING VALUES TO LAYOUT STRUCTURE

LAYOUT-ZEBRA = 'X'.

LAYOUT-GRID_TITLE = 'Flights' .

LAYOUT-CWIDTH_OPT = 'X'.

LAYOUT-SMALLTITLE = 'X'.

LAYOUT-NO_HGRIDLN = 'X'.

-


CALL METHOD alv_grid->set_table_for_first_display

EXPORTING

  • I_BUFFER_ACTIVE =

  • I_BYPASSING_BUFFER =

  • I_CONSISTENCY_CHECK =

I_STRUCTURE_NAME = 'SFLIGHT'

  • IS_VARIANT =

  • I_SAVE =

  • I_DEFAULT = 'X'

IS_LAYOUT = LAYOUT

  • IS_PRINT =

  • IT_SPECIAL_GROUPS =

  • IT_TOOLBAR_EXCLUDING =

  • IT_HYPERLINK =

  • IT_ALV_GRAPHICS =

  • IT_EXCEPT_QINFO =

-


Former Member
0 Kudos

Use

gs_layout_list-no_uline_hs = gc_true instead of

gs_layout_list-no_hline = gc_true

Former Member
0 Kudos

Hi fuat,

1. In a normal alv list,

there are no horizontal lines.

2. the THIN yellow line,

is nothing but , minor space

which is required to distinghish.

(its not a line)

3. However,

u can remove the vertica line with

gs_layout_list-no_vline = 'X'.

regards,

amit m.