Application Development 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: 

Color in ALV

Former Member
0 Kudos

Hi ! I have made a ALV report. On the output screen, whenever the user clicks on the material name then, ME1P alike my custom report comes up with material purchase history report.

Now, in this report the requirement iis :-

1). The respective P.O. No. for the material name clicked upon should come in red colour. (Entire row)

2). All the same vendors in the report should come in yellow color.(Entire row)

Please help.

5 REPLIES 5

Former Member
0 Kudos

HI,

You can able to acheive the colored for all the field which is diaplyed in the entire row.

Please follow the below procedure.

Where you have declared the entire row structure in the data declartion just add the tihis field too in the structure.

cell type slis_t_specialcol_alv,

below kind of procedure to be followed for the colored display

cell-fieldname = FiledName''.

cell-color-col = 7. (cell-color-col = 7 for pink color. you can red for 3 or 4. I am not sure eact one )

cell-nokeycol = 'X'.

append cell to w_final-cell. (w_fial should be work area for final internal table )

append w_final to itab_final.

clear: cell.

Like above you can fill all the fields with and finally append to final table.

in the layout structure you need to define below the way

lf_layout-info_fieldname = 'COLOR'.

lf_layout-coltab_fieldname = 'CELL'.

the below one for ALV parametrs to be enabled.

  • I_GRID_SETTINGS =

is_layout = lf_layout

Please check and come back to me if u have any issues

0 Kudos

Thank you very much. Could you please tell me how can I color all the same vendors in a yellow color & when the user clicks on the material name then the respective PO should get highlighted in red color?

0 Kudos

if you want to display all the same vendor should be in RED color

acheive through

at end of vendor

paste the

cell code not Layout code.

endat.

when the user clicks on the material name then the respective PO should get highlighted in red color?

this will be acheived through

at user command

RS_SELFILED - MATNR = cliecked Material

and do the cell colored code here.

Former Member
0 Kudos

hi,

1. declare

color TYPE lvc_t_scol,

in your final internal table as last field.

2. use in layout structure.

wa_layout-ctab_fname = 'COLOR'.

while filling this final internal table, put your vendor selection logic.

3. then fill final internal table as

w_color-fname = 'EAN11'.

w_color-color-col = '6'.

w_color-color-int = '1'.

w_color-color-inv = '1'.

APPEND w_color TO wa_output-color.

MODIFY it_output FROM wa_output INDEX tabix

TRANSPORTING color.

Regards,

Narendra

Edited by: Narendra GSTIT on May 25, 2010 11:31 AM

0 Kudos

Dear All,

Please give provide me the logic to give color to same vendors and the respective P.O..

Please....