10-16-2008 9:06 AM
Hi,
I made an ALV using SLIS.
How can I bold a line of this ALV ? Is it posible using slis ?
Thank you !
10-16-2008 9:20 AM
10-16-2008 9:20 AM
10-16-2008 1:33 PM
hi,
not possible , but to highlight a row u can color the cell or row...
10-16-2008 2:19 PM
Hi,
It is not possible using slis but u can do it with the help of lvc .
e.g:
first create a new column in ur internal resultant table
CELLCOLORS TYPE lvc_t_scol,
Now create a subroutine
Form set_specific_field_attributes .
DATA ls_cellcolor TYPE lvc_s_scol.
*Populate field with color attributes
LOOP AT TAB_ETAB INTO wa_etab.
if wa_etab-MATNR = 'AII_MAT'.
ls_cellcolor-FNAME = 'MATNR' .
ls_cellcolor-COLOR-COL = '5' .
ls_cellcolor-COLOR-INT = '1'.
ls_cellcolor-COLOR-INV = '0'.
APPEND ls_cellcolor TO wa_etab-CELLCOLORS .
MODIFY TAB_ETAB from wa_etab.
ENDIF.
endloop.
now call this subrutine before creating fieldcatalogue.
Also dont forget to define this column in building layout .
form build_layout.
gd_layout-COLTAB_FIELDNAME = 'CELLCOLORS'.
endform.
endform.
Hope this will help u.
10-16-2008 3:18 PM
U can do this by using FM REUSE_ALV_GRID_DISPLAY_LVC
Pl. check this sample prog.
&----
*& Report Z_DEMO_ALV_JG *
&----
*&----
REPORT z_demo_alv_jg .
Include for all style values
INCLUDE <cl_alv_control>.
Internal table for final output data
DATA: i_flight TYPE STANDARD TABLE OF sflight.
Internal table for field catalog info
DATA: i_fields TYPE lvc_t_fcat.
Field symbol for field catalog
FIELD-SYMBOLS: <wa_fields> TYPE lvc_s_fcat.
Select data
SELECT * FROM sflight
INTO TABLE i_flight
UP TO 100 ROWS.
IF sy-subrc = 0.
Get field catalog
CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
EXPORTING
i_structure_name = 'SFLIGHT'
CHANGING
ct_fieldcat = i_fields
EXCEPTIONS
inconsistent_interface = 1
program_error = 2
OTHERS = 3
.
IF sy-subrc = 0.
Changing the style of field catalog
LOOP AT i_fields ASSIGNING <wa_fields>.
IF sy-tabix > 4.
<wa_fields>-style = ALV_STYLE_FONT_ITALIC.
ELSE.
<wa_fields>-style = ALV_STYLE_FONT_BOLD.
ENDIF.
ENDLOOP.
ENDIF.
Calling the FM to display ALV report
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY_LVC'
EXPORTING
i_structure_name = 'SFLIGHT'
i_grid_title = 'Style demo'(001)
it_fieldcat_lvc = i_fields
TABLES
t_outtab = i_flight
EXCEPTIONS
program_error = 1
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDIF.