Skip to Content
author's profile photo Former Member
Former Member

Highlighting a particular row in a ALV GRID display...

Hi,

I am using the FM : 'REUSE_ALV_GRID_DISPLAY' to show a ALV list.

I want to highlight a particular row in the display..

Plz help..

Sample code appreciated....

Thanks

Akash

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

5 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Oct 23, 2008 at 09:17 AM

    Hi,

    Please Check

    Might Prove Useful

    REPORT zalv_styles.*Include for ALV styles

    INCLUDE <cl_alv_control>.*Type ppols for alv

    TYPE-POOLS : slis.*structure for t582a tbale

    TYPES : BEGIN OF ty_table,

    infty TYPE infty,

    pnnnn TYPE pnnnn_d,

    zrmkz TYPE dzrmkz,

    zeitb TYPE dzeitb,

    dname TYPE dianm,

    edynr TYPE edynp,

    ldynr TYPE ldynp,

    stypt TYPE stypt,

    sytxt TYPE sytxt,

    davo TYPE davo,

    davoe TYPE davoe,

    END OF ty_table.*Structure for infotype text

    TYPES : BEGIN OF ty_itext,

    infty TYPE infty,

    itext TYPE intxt,

    sprsl TYPE sprsl,

    END OF ty_itext.*Structure for output display

    TYPES : BEGIN OF ty_output,

    infty TYPE infty,

    itext TYPE intxt,

    pnnnn TYPE pnnnn_d,

    zrmkz TYPE dzrmkz,

    zeitb TYPE dzeitb,

    dname TYPE dianm,

    edynr TYPE edynp,

    ldynr TYPE ldynp,

    stypt TYPE stypt,

    sytxt TYPE sytxt,

    davo TYPE davo,

    davoe TYPE davoe,

    text(6) TYPE c,

    sradio(6) TYPE c,

    scheck(6) TYPE c,

    END OF ty_output.*internal table and work area declarations

    DATA : it_table TYPE STANDARD TABLE OF ty_table INITIAL SIZE 0,

    it_output TYPE STANDARD TABLE OF ty_output INITIAL SIZE 0,

    it_ittext TYPE STANDARD TABLE OF ty_itext INITIAL SIZE 0,

    wa_table TYPE ty_table,

    wa_output TYPE ty_output,

    wa_ittext TYPE ty_itext.*Data declarations for ALV

    DATA: c_ccont TYPE REF TO cl_gui_custom_container, "Custom container

    c_alvgd TYPE REF TO cl_gui_alv_grid, "ALV grid object

    it_fcat TYPE lvc_t_fcat, "Field catalogue

    it_layout TYPE lvc_s_layo. "Layout

    Field symbols declarations for styleFIELD-SYMBOLS : <wa_fcat> TYPE lvc_s_fcat.initialization eventINITIALIZATION.*start of selection event

    START-OF-SELECTION.*select the infotypes maintained

    SELECT infty

    pnnnn

    zrmkz

    zeitb

    dname

    edynr

    ldynr

    stypt

    sytxt

    davo

    davoe

    FROM t582a UP TO 25 ROWS

    INTO CORRESPONDING FIELDS OF TABLE it_table.* *Select the infotype texts

    IF it_table[] IS NOT INITIAL.

    SELECT itext

    infty

    sprsl

    FROM t582s

    INTO CORRESPONDING FIELDS OF TABLE it_ittext

    FOR ALL ENTRIES IN it_table

    WHERE infty = it_table-infty

    AND sprsl = 'E'.

    ENDIF.*Apppending the data to the internal table of ALV output

    LOOP AT it_table INTO wa_table. wa_output-infty = wa_table-infty.

    wa_output-pnnnn = wa_table-pnnnn.

    wa_output-zrmkz = wa_table-zrmkz.

    wa_output-zeitb = wa_table-zeitb.

    wa_output-dname = wa_table-dname.

    wa_output-edynr = wa_table-edynr.

    wa_output-ldynr = wa_table-ldynr.

    wa_output-stypt = wa_table-stypt.

    wa_output-sytxt = wa_table-sytxt.

    wa_output-davo = wa_table-davo.

    wa_output-davoe = wa_table-davoe.* For texts READ TABLE it_ittext INTO wa_ittext WITH KEY infty = wa_table-infty.

    wa_output-itext = wa_ittext-itext.

    wa_output-text = wa_ittext-sprsl. APPEND wa_output TO it_output.

    CLEAR wa_output. ENDLOOP.* Calling the ALV screen with custom container CALL SCREEN 0600.On this statement double click it takes you to the screen painter SE51.Enter the attributes

    *Create a Custom container and name it CC_CONT and OK code as OK_CODE.

    *Save check and Activate the screen painter.

    Now a normal screen with number 600 is created which holds the ALV grid. PBO of the actual screen ,

    • Here we can give a title and customized menus

    &----


    *& Module STATUS_0600 OUTPUT

    &----


    • text

    ----


    MODULE status_0600 OUTPUT.

    • SET PF-STATUS 'xxxxxxxx'.

    • SET TITLEBAR 'xxx'.

    ENDMODULE. " STATUS_0600 OUTPUT* calling the PBO module ALV_GRID.

    &----


    *& Module ALV_GRID OUTPUT

    &----


    • text

    ----


    MODULE alv_grid OUTPUT.

    CREATE OBJECT c_ccont

    EXPORTING

    container_name = 'CC_CONT'.

    CREATE OBJECT c_alvgd

    EXPORTING

    i_parent = c_ccont.* SET field for ALV

    PERFORM alv_build_fieldcat.* Setting the styles for the ALV grid control

    • using field-symbols LOOP AT it_fcat ASSIGNING <wa_fcat>.*For Each and every line of the fieldcat

    CASE sy-tabix.*Color Styles

    *Background/Font/Group/positive/negative

    WHEN '1'.

    <wa_fcat>-style = alv_style_color_inv_positive.

    WHEN '2'.

    <wa_fcat>-style = alv_style_color_int_negative.

    WHEN '3'.

    <wa_fcat>-style = alv_style_color_inv_negative.

    WHEN '4'.

    <wa_fcat>-style = alv_style_color_int_positive.

    WHEN '5'.

    <wa_fcat>-style = alv_style_color_background.

    <wa_fcat>-style = alv_style_color_inv_background.

    WHEN '6'.

    <wa_fcat>-style = alv_style_color_group.

    <wa_fcat>-style = alv_style_color_int_background.*Style for F4

    WHEN '7'.

    <wa_fcat>-style = alv_style_f4.*Style for Alignment(others are also possible)

    WHEN '8'.

    <wa_fcat>-style = alv_style_align_left_bottom.*Style for Font Underlined/Bold and Italic are possible

    WHEN '9'.

    <wa_fcat>-style = alv_style_font_underlined.*Style for button type

    WHEN '10'.

    <wa_fcat>-style = alv_style_button.*Style for Font Symbol

    WHEN '11'.

    <wa_fcat>-style = alv_style_font_symbol.*Style for Radiobutton

    WHEN '12'.

    <wa_fcat>-style = alv_style_radio_checked.*Style for checkbox

    WHEN '13'.

    <wa_fcat>-style = alv_style_checkbox_checked.*Style for column style characteristics(highlighting the col)

    WHEN '14'.

    <wa_fcat>-style = alv_col_style_characteristic.*Styles for Enabling the column

    WHEN '15'.

    <wa_fcat>-style = alv_style_enabled. ENDCASE. ENDLOOP.* Set ALV attributes FOR LAYOUT

    PERFORM alv_report_layout. CHECK NOT c_alvgd IS INITIAL.* Call ALV GRID CALL METHOD c_alvgd->set_table_for_first_display

    EXPORTING

    is_layout = it_layout

    CHANGING

    it_outtab = it_output

    it_fieldcatalog = it_fcat

    EXCEPTIONS

    invalid_parameter_combination = 1

    program_error = 2

    too_many_lines = 3

    OTHERS = 4.

    IF sy-subrc <> 0.

    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno

    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

    ENDIF.ENDMODULE. " ALV_GRID OUTPUT&----


    *& Form alv_build_fieldcat

    &----


    • text

    ----


    • <--P_IT_FCAT text

    ----


    *subroutine to build fieldcatFORM alv_build_fieldcat. DATA lv_fldcat TYPE lvc_s_fcat.

    CLEAR lv_fldcat. lv_fldcat-row_pos = '1'.

    lv_fldcat-col_pos = '1'.

    lv_fldcat-fieldname = 'INFTY'.

    lv_fldcat-tabname = 'IT_OUTPUT'.

    lv_fldcat-outputlen = 8.

    lv_fldcat-scrtext_m = 'Infotype'.

    lv_fldcat-icon = 'X'.

    APPEND lv_fldcat TO it_fcat.

    CLEAR lv_fldcat. lv_fldcat-row_pos = '1'.

    lv_fldcat-col_pos = '2'.

    lv_fldcat-fieldname = 'PNNNN'.

    lv_fldcat-tabname = 'IT_OUTPUT'.

    lv_fldcat-outputlen = 15.

    lv_fldcat-scrtext_m = 'Structure'.

    lv_fldcat-icon = ''.

    APPEND lv_fldcat TO it_fcat.

    CLEAR lv_fldcat. lv_fldcat-row_pos = '1'.

    lv_fldcat-col_pos = '3'.

    lv_fldcat-fieldname = 'ITEXT'.

    lv_fldcat-tabname = 'IT_OUTPUT'.

    lv_fldcat-outputlen = 60.

    lv_fldcat-scrtext_m = 'Description'.

    lv_fldcat-icon = ''.

    APPEND lv_fldcat TO it_fcat.

    CLEAR lv_fldcat.

    lv_fldcat-row_pos = '1'.

    lv_fldcat-col_pos = '4'.

    lv_fldcat-fieldname = 'TEXT'.

    lv_fldcat-tabname = 'IT_OUTPUT'.

    lv_fldcat-outputlen = 5.

    lv_fldcat-scrtext_m = 'General'.

    lv_fldcat-icon = ''.

    APPEND lv_fldcat TO it_fcat.

    CLEAR lv_fldcat.

    lv_fldcat-row_pos = '1'.

    lv_fldcat-col_pos = '5'.

    lv_fldcat-fieldname = 'ZRMKZ'.

    lv_fldcat-tabname = 'IT_OUTPUT'.

    lv_fldcat-outputlen = 1.

    lv_fldcat-scrtext_m = 'PERIOD'.

    lv_fldcat-icon = ''.

    APPEND lv_fldcat TO it_fcat.

    CLEAR lv_fldcat. lv_fldcat-row_pos = '1'.

    lv_fldcat-col_pos = '6'.

    lv_fldcat-fieldname = 'ZEITB'.

    lv_fldcat-tabname = 'IT_OUTPUT'.

    lv_fldcat-outputlen = 60.

    lv_fldcat-scrtext_m = 'Time constraint'.

    lv_fldcat-icon = ''.

    APPEND lv_fldcat TO it_fcat.

    CLEAR lv_fldcat. lv_fldcat-row_pos = '1'.

    lv_fldcat-col_pos = '7'.

    lv_fldcat-fieldname = 'DNAME'.

    lv_fldcat-tabname = 'IT_OUTPUT'.

    lv_fldcat-outputlen = 15.

    lv_fldcat-scrtext_m = 'Dialogmodule'.

    lv_fldcat-icon = ''.

    APPEND lv_fldcat TO it_fcat.

    CLEAR lv_fldcat. lv_fldcat-row_pos = '1'.

    lv_fldcat-col_pos = '8'.

    lv_fldcat-fieldname = 'EDYNR'.

    lv_fldcat-tabname = 'IT_OUTPUT'.

    lv_fldcat-outputlen = 10.

    lv_fldcat-scrtext_m = 'Single screenno'.

    lv_fldcat-icon = ''.

    APPEND lv_fldcat TO it_fcat.

    CLEAR lv_fldcat. lv_fldcat-row_pos = '1'.

    lv_fldcat-col_pos = '9'.

    lv_fldcat-fieldname = 'LDYNR'.

    lv_fldcat-tabname = 'IT_OUTPUT'.

    lv_fldcat-outputlen = 10.

    lv_fldcat-scrtext_m = 'List screenno'.

    lv_fldcat-icon = ''.

    APPEND lv_fldcat TO it_fcat.

    CLEAR lv_fldcat.

    lv_fldcat-row_pos = '1'.

    lv_fldcat-col_pos = '10'.

    lv_fldcat-fieldname = 'STYPT'.

    lv_fldcat-tabname = 'IT_OUTPUT'.

    lv_fldcat-outputlen = 10.

    lv_fldcat-scrtext_m = 'SubtypeTable'.

    lv_fldcat-icon = ''.

    APPEND lv_fldcat TO it_fcat.

    CLEAR lv_fldcat. lv_fldcat-row_pos = '1'.

    lv_fldcat-col_pos = '11'.

    lv_fldcat-fieldname = 'SYTXT'.

    lv_fldcat-tabname = 'IT_OUTPUT'.

    lv_fldcat-outputlen = 10.

    lv_fldcat-scrtext_m = 'Font Symbol'.

    lv_fldcat-icon = ''.

    APPEND lv_fldcat TO it_fcat.

    CLEAR lv_fldcat.

    lv_fldcat-row_pos = '1'.

    lv_fldcat-col_pos = '12'.

    lv_fldcat-fieldname = 'SRADIO'.

    lv_fldcat-tabname = 'IT_OUTPUT'.

    lv_fldcat-outputlen = 10.

    lv_fldcat-scrtext_m = 'RADIO'.

    lv_fldcat-icon = ''.

    APPEND lv_fldcat TO it_fcat.

    CLEAR lv_fldcat. lv_fldcat-row_pos = '1'.

    lv_fldcat-col_pos = '13'.

    lv_fldcat-fieldname = 'SCHECK'.

    lv_fldcat-tabname = 'IT_OUTPUT'.

    lv_fldcat-outputlen = 10.

    lv_fldcat-scrtext_m = 'CHECK'.

    lv_fldcat-icon = ''.

    APPEND lv_fldcat TO it_fcat.

    CLEAR lv_fldcat. lv_fldcat-row_pos = '1'.

    lv_fldcat-col_pos = '14'.

    lv_fldcat-fieldname = 'DAVO'.

    lv_fldcat-tabname = 'IT_OUTPUT'.

    lv_fldcat-outputlen = 10.

    lv_fldcat-scrtext_m = 'Start Date'.

    lv_fldcat-icon = ''.

    APPEND lv_fldcat TO it_fcat.

    CLEAR lv_fldcat. lv_fldcat-row_pos = '1'.

    lv_fldcat-col_pos = '15'.

    lv_fldcat-fieldname = 'DAVOE'.

    lv_fldcat-tabname = 'IT_OUTPUT'.

    lv_fldcat-outputlen = 10.

    lv_fldcat-scrtext_m = 'End date'.

    lv_fldcat-icon = ''.

    APPEND lv_fldcat TO it_fcat.

    CLEAR lv_fldcat.ENDFORM. " alv_build_fieldcat

    &----


    *& Form alv_report_layout

    &----


    • text

    ----


    • <--P_IT_LAYOUT text

    ----


    *Subroutine for setting alv layout

    FORM alv_report_layout.

    it_layout-cwidth_opt = 'X'.

    it_layout-zebra = 'X'.

    it_layout-col_opt = 'X'.

    ENDFORM. " alv_report_layout

    • PAI module of the screen created. In case we use an interactive ALV or

    *for additional functionalities we can create OK codes

    *and based on the user command we can do the coding.

    &----


    *& Module USER_COMMAND_0600 INPUT

    &----


    • text

    ----


    MODULE user_command_0600 INPUT.ENDMODULE. " USER_COMMAND_0600 INPUT

    Thanks & regards

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Oct 23, 2008 at 09:18 AM

    hi akashdeep,

    refer to this link:

    http://www.saptechnical.com/Tutorials/ALV/ColorSALV/Demo.htm

    http://www.saptechnical.com/Tutorials/ALV/cell/highlight.htm

    or refer to this code:

    &----


    *& Report ZDEMO_ALVGRID *

    *& *

    &----


    *& *

    *& Example of a simple ALV Grid Report *

    *& ................................... *

    *& *

    *& The basic ALV grid, Enhanced to display each row in a different *

    *& colour *

    &----


    REPORT zdemo_alvgrid .

    TABLES: ekko.

    type-pools: slis. "ALV Declarations

    *Data Declaration

    *----


    TYPES: BEGIN OF t_ekko,

    ebeln TYPE ekpo-ebeln,

    ebelp TYPE ekpo-ebelp,

    statu TYPE ekpo-statu,

    aedat TYPE ekpo-aedat,

    matnr TYPE ekpo-matnr,

    menge TYPE ekpo-menge,

    meins TYPE ekpo-meins,

    netpr TYPE ekpo-netpr,

    peinh TYPE ekpo-peinh,

    line_color(4) type c, "Used to store row color attributes

    END OF t_ekko.

    DATA: it_ekko TYPE STANDARD TABLE OF t_ekko INITIAL SIZE 0,

    wa_ekko TYPE t_ekko.

    *ALV data declarations

    data: fieldcatalog type slis_t_fieldcat_alv with header line,

    gd_tab_group type slis_t_sp_group_alv,

    gd_layout type slis_layout_alv,

    gd_repid like sy-repid.

    ************************************************************************

    *Start-of-selection.

    START-OF-SELECTION.

    perform data_retrieval.

    perform build_fieldcatalog.

    perform build_layout.

    perform display_alv_report.

    &----


    *& Form BUILD_FIELDCATALOG

    &----


    • Build Fieldcatalog for ALV Report

    ----


    form build_fieldcatalog.

    • There are a number of ways to create a fieldcat.

    • For the purpose of this example i will build the fieldcatalog manualy

    • by populating the internal table fields individually and then

    • appending the rows. This method can be the most time consuming but can

    • also allow you more control of the final product.

    • Beware though, you need to ensure that all fields required are

    • populated. When using some of functionality available via ALV, such as

    • total. You may need to provide more information than if you were

    • simply displaying the result

    • I.e. Field type may be required in-order for

    • the 'TOTAL' function to work.

    fieldcatalog-fieldname = 'EBELN'.

    fieldcatalog-seltext_m = 'Purchase Order'.

    fieldcatalog-col_pos = 0.

    fieldcatalog-outputlen = 10.

    fieldcatalog-emphasize = 'X'.

    fieldcatalog-key = 'X'.

    • fieldcatalog-do_sum = 'X'.

    • fieldcatalog-no_zero = 'X'.

    append fieldcatalog to fieldcatalog.

    clear fieldcatalog.

    fieldcatalog-fieldname = 'EBELP'.

    fieldcatalog-seltext_m = 'PO Item'.

    fieldcatalog-col_pos = 1.

    append fieldcatalog to fieldcatalog.

    clear fieldcatalog.

    fieldcatalog-fieldname = 'STATU'.

    fieldcatalog-seltext_m = 'Status'.

    fieldcatalog-col_pos = 2.

    append fieldcatalog to fieldcatalog.

    clear fieldcatalog.

    fieldcatalog-fieldname = 'AEDAT'.

    fieldcatalog-seltext_m = 'Item change date'.

    fieldcatalog-col_pos = 3.

    append fieldcatalog to fieldcatalog.

    clear fieldcatalog.

    fieldcatalog-fieldname = 'MATNR'.

    fieldcatalog-seltext_m = 'Material Number'.

    fieldcatalog-col_pos = 4.

    append fieldcatalog to fieldcatalog.

    clear fieldcatalog.

    fieldcatalog-fieldname = 'MENGE'.

    fieldcatalog-seltext_m = 'PO quantity'.

    fieldcatalog-col_pos = 5.

    append fieldcatalog to fieldcatalog.

    clear fieldcatalog.

    fieldcatalog-fieldname = 'MEINS'.

    fieldcatalog-seltext_m = 'Order Unit'.

    fieldcatalog-col_pos = 6.

    append fieldcatalog to fieldcatalog.

    clear fieldcatalog.

    fieldcatalog-fieldname = 'NETPR'.

    fieldcatalog-seltext_m = 'Net Price'.

    fieldcatalog-col_pos = 7.

    fieldcatalog-outputlen = 15.

    fieldcatalog-datatype = 'CURR'.

    append fieldcatalog to fieldcatalog.

    clear fieldcatalog.

    fieldcatalog-fieldname = 'PEINH'.

    fieldcatalog-seltext_m = 'Price Unit'.

    fieldcatalog-col_pos = 8.

    append fieldcatalog to fieldcatalog.

    clear fieldcatalog.

    endform. " BUILD_FIELDCATALOG

    &----


    *& Form BUILD_LAYOUT

    &----


    • Build layout for ALV grid report

    ----


    form build_layout.

    gd_layout-no_input = 'X'.

    gd_layout-colwidth_optimize = 'X'.

    gd_layout-totals_text = 'Totals'(201).

    • Set layout field for row attributes(i.e. color)

    gd_layout-info_fieldname = 'LINE_COLOR'.

    • gd_layout-totals_only = 'X'.

    • gd_layout-f2code = 'DISP'. "Sets fcode for when double

    • "click(press f2)

    • gd_layout-zebra = 'X'.

    • gd_layout-group_change_edit = 'X'.

    • gd_layout-header_text = 'helllllo'.

    endform. " BUILD_LAYOUT

    &----


    *& Form DISPLAY_ALV_REPORT

    &----


    • Display report using ALV grid

    ----


    form display_alv_report.

    gd_repid = sy-repid.

    call function 'REUSE_ALV_GRID_DISPLAY'

    exporting

    i_callback_program = gd_repid

    • i_callback_top_of_page = 'TOP-OF-PAGE' "see FORM

    • i_callback_user_command = 'USER_COMMAND'

    • i_grid_title = outtext

    is_layout = gd_layout

    it_fieldcat = fieldcatalog[]

    • it_special_groups = gd_tabgroup

    • IT_EVENTS = GT_XEVENTS

    i_save = 'X'

    • is_variant = z_template

    tables

    t_outtab = it_ekko

    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.

    endform. " DISPLAY_ALV_REPORT

    &----


    *& Form DATA_RETRIEVAL

    &----


    • Retrieve data form EKPO table and populate itab it_ekko

    ----


    form data_retrieval.

    data: ld_color(1) type c.

    select ebeln ebelp statu aedat matnr menge meins netpr peinh

    up to 10 rows

    from ekpo

    into table it_ekko.

    *Populate field with color attributes

    loop at it_ekko into wa_ekko.

    • Populate color variable with colour properties

    • Char 1 = C (This is a color property)

    • Char 2 = 3 (Color codes: 1 - 7)

    • Char 3 = Intensified on/off ( 1 or 0 )

    • Char 4 = Inverse display on/off ( 1 or 0 )

    • i.e. wa_ekko-line_color = 'C410'

    ld_color = ld_color + 1.

    • Only 7 colours so need to reset color value

    if ld_color = 8.

    ld_color = 1.

    endif.

    concatenate 'C' ld_color '10' into wa_ekko-line_color.

    • wa_ekko-line_color = 'C410'.

    modify it_ekko from wa_ekko.

    endloop.

    endform. " DATA_RETRIEVAL

    Edited by: arjun on Oct 23, 2008 11:19 AM

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Oct 23, 2008 at 09:20 AM

    hello,

    You can use COLOR : 1,2,3,etc.....(blue, red...)

    TYPES: BEGIN OF slis_color,

    col TYPE i,

    int TYPE i,

    inv TYPE i,

    END OF slis_color.

    DATA: color_tab TYPE slis_t_specialcol_alv,

    color TYPE slis_specialcol_alv.

    begin of t_alv occurs 0,

    matnr like marc-matnr,

    maktx like makt-maktx,

    color TYPE slis_t_specialcol_alv,

    end of t_alv

    **********************************************************

    program...

    ***********************************************************

    • **first step : define the table COLOR per fields

    CLEAR color_tab.

    REFRESH color_tab.

    • MATNR

    color-fieldname = 'MATNR'.

    color-color-col = 3.

    color-color-int = 0.

    color-color-inv = 0.

    APPEND color TO color_tab .

    • MAKT

    color-fieldname = 'MAKT'.

    color-color-col = 8.

    color-color-int = 0.

    color-color-inv = 0.

    APPEND color TO color_tab .

    *

    • second step : fill table in t_alv

    t_alv-matnr = marc-matnr.

    t_alv_maktx = makt-maktx.

    t_alv-color[] = color_tab[].

    APPEND t_alv.

    I hope that It will help you.

    best regards

    g.lacroix

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 23, 2008 at 09:24 AM

    Hi,

    Please follow the following link to get your problem resolved. It may help you.

    is-it-possible-to-color-a-text-in-alv-grid

    Thanks

    Nitesh

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Nov 03, 2008 at 10:06 AM

    follow this link...

    setting-cell-color-in-alv

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.