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

alv report colour display

hi

i have a requirment in my alv report ,i need to show values of material description i.e only gsm values in different colour i. 296 GSM and corresponding below values 285 GSM,.below show is sample output onf my alv report.

materialno material deccription

GB CPB HWC 296 GSM 055.000 X 092.000

GB CPB HWC 296 GSM 082.000 X 117.000

GB CPB HWC 285 GSM 045.200 X 070.500

GB CPB HWC 285 GSM 045.200 X 070.500

GBCPB HWC 285 GSM 045.200 X 070.500

GB CPB HWC 285 GSM 045.200 X 070.500

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Sep 20, 2007 at 06:12 AM
    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 20, 2007 at 06:22 AM

    hi,

    while defining the fieldcatalog for the GSM values plz write below command.

    <WA>-FIELDNAME-emphasize = 'C111'.

    thanks,

    maheedhar

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 20, 2007 at 06:27 AM

    Hi

    i am sending you a code where i had colored one field

    you can refer this program and you can understand very well where exactly what we have to do for colors

    reward if usefull

    REPORT zalv_with_colored_fields .

    TYPE-POOLS : slis.

    DATA : BEGIN OF it_final1 OCCURS 0,

    carrid TYPE spfli-carrid,

    connid TYPE spfli-connid,

    cityfrom TYPE spfli-cityfrom,

    cityto TYPE spfli-cityto,

    cellcolors TYPE lvc_t_scol,

    END OF it_final1 .

    DATA : BEGIN OF it_final OCCURS 0,

    carrid TYPE spfli-carrid,

    connid TYPE spfli-connid,

    cityfrom TYPE spfli-cityfrom,

    cityto TYPE spfli-cityto,

    END OF it_final .

    DATA : git_cellcolors TYPE TABLE OF lvc_s_scol,

    gwa_color TYPE lvc_s_scol,

    layout TYPE slis_layout_alv.

    DATA : it_fieldcat TYPE slis_t_fieldcat_alv,

    wa_fieldcat LIKE LINE OF it_fieldcat.

    START-OF-SELECTION .

    SELECT carrid connid cityfrom cityto FROM spfli INTO TABLE it_final .

    wa_fieldcat-col_pos = '0'.

    wa_fieldcat-tabname = 'IT_FINAL' .

    wa_fieldcat-fieldname = 'CARRID' .

    wa_fieldcat-seltext_m = 'Carrier ID'(001) .

    APPEND wa_fieldcat TO it_fieldcat .

    wa_fieldcat-col_pos = '1'.

    wa_fieldcat-tabname = 'IT_FINAL' .

    wa_fieldcat-fieldname = 'CONNID' .

    wa_fieldcat-seltext_m = 'Flight Connection Number'(002) .

    APPEND wa_fieldcat TO it_fieldcat .

    wa_fieldcat-col_pos = '2'.

    wa_fieldcat-tabname = 'IT_FINAL' .

    wa_fieldcat-fieldname = 'CITYFROM' .

    wa_fieldcat-seltext_m = 'City from'(003) .

    APPEND wa_fieldcat TO it_fieldcat .

    wa_fieldcat-col_pos = '3'.

    wa_fieldcat-tabname = 'IT_FINAL' .

    wa_fieldcat-fieldname = 'CITYTO' .

    wa_fieldcat-seltext_m = 'City to'(004) .

    APPEND wa_fieldcat TO it_fieldcat .

    LOOP AT it_final .

    it_final1-carrid = it_final-carrid.

    it_final1-connid = it_final-connid.

    it_final1-cityfrom = it_final-cityfrom.

    it_final1-cityto = it_final-cityto.

    CLEAR gwa_color.

    <b> IF it_final-carrid = 'AA' .

    gwa_color-fname = 'CARRID'.

    gwa_color-nokeycol = '1'.

    gwa_color-color-col = '6'.

    gwa_color-color-int = '1'.</b>

    APPEND gwa_color TO git_cellcolors.

    it_final1-cellcolors = git_cellcolors.

    ENDIF.

    IF it_final-carrid = 'AZ' .

    gwa_color-fname = 'CARRID'.

    gwa_color-nokeycol = '1'.

    gwa_color-color-col = '5'.

    gwa_color-color-int = '1'.

    APPEND gwa_color TO git_cellcolors.

    it_final1-cellcolors = git_cellcolors.

    ENDIF.</b>

    REFRESH git_cellcolors.

    APPEND it_final1.

    CLEAR : it_final , it_final1 .

    ENDLOOP.

    layout-coltab_fieldname = 'CELLCOLORS'.

    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

    EXPORTING

    is_layout = layout

    it_fieldcat = it_fieldcat

    TABLES

    t_outtab = it_final1.

    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.