09-26-2006 5:07 PM
Any way to display an ALV grid in different sections?
Meaning, The top half of the report lines up columns differently then the bottom half of the report.
For instance, The first two columns are always the same for all fields, but becuse the rest of the fields are not related to one another in any way the report breaks and displays te columns differently at a certain point in the output of the display?
Thank -You
09-26-2006 5:11 PM
In the field catalog give the <b>emphasize</b>.
For first 2 columns:
ls_fcat-emphasize = 'C310'.
For all other columns:
ls_fcat-emphasize = 'C400'.
These make the ALV columns in different colors.
In case if u want to color a particular row or particular cell, do the below things:
Assign a variable celltab TYPE lvc_t_styl, in the internal table which u dispaly the data.
In the layout give, wa_layout-stylefname = 'CELLTAB'.
Modify the final internal table like this sample code:
DATA : lt_celltab TYPE lvc_t_styl,
ls_celltab TYPE lvc_s_styl.
READ TABLE i_final_data INTO wa_final_data INDEX 1.
ls_celltab-fieldname = 'LNG_TYPES'.
ls_celltab-style = '00000060'.
INSERT ls_celltab INTO TABLE lt_celltab.
CLEAR ls_celltab.
ls_celltab-fieldname = 'LNG_QUANTITY'.
ls_celltab-style = '00003060'.
INSERT ls_celltab INTO TABLE lt_celltab.
CLEAR ls_celltab.
ls_celltab-fieldname = 'NG_TYPES'.
ls_celltab-style = '00000666'.
INSERT ls_celltab INTO TABLE lt_celltab.
CLEAR ls_celltab.
ls_celltab-fieldname = 'NG_QUANTITY'.
ls_celltab-style = '00000066'.
INSERT ls_celltab INTO TABLE lt_celltab.
CLEAR ls_celltab.
wa_final_data-celltab[] = lt_celltab[].
MODIFY i_final_data FROM wa_final_data INDEX 1.
CLEAR: ls_celltab, lt_celltab, wa_final_data.
Here ls_celltab-style = '00003060' will make that particular cell in different color.
Regards,
Prakash.
Message was edited by: Prakash Ramu
09-26-2006 5:11 PM
In the field catalog give the <b>emphasize</b>.
For first 2 columns:
ls_fcat-emphasize = 'C310'.
For all other columns:
ls_fcat-emphasize = 'C400'.
These make the ALV columns in different colors.
In case if u want to color a particular row or particular cell, do the below things:
Assign a variable celltab TYPE lvc_t_styl, in the internal table which u dispaly the data.
In the layout give, wa_layout-stylefname = 'CELLTAB'.
Modify the final internal table like this sample code:
DATA : lt_celltab TYPE lvc_t_styl,
ls_celltab TYPE lvc_s_styl.
READ TABLE i_final_data INTO wa_final_data INDEX 1.
ls_celltab-fieldname = 'LNG_TYPES'.
ls_celltab-style = '00000060'.
INSERT ls_celltab INTO TABLE lt_celltab.
CLEAR ls_celltab.
ls_celltab-fieldname = 'LNG_QUANTITY'.
ls_celltab-style = '00003060'.
INSERT ls_celltab INTO TABLE lt_celltab.
CLEAR ls_celltab.
ls_celltab-fieldname = 'NG_TYPES'.
ls_celltab-style = '00000666'.
INSERT ls_celltab INTO TABLE lt_celltab.
CLEAR ls_celltab.
ls_celltab-fieldname = 'NG_QUANTITY'.
ls_celltab-style = '00000066'.
INSERT ls_celltab INTO TABLE lt_celltab.
CLEAR ls_celltab.
wa_final_data-celltab[] = lt_celltab[].
MODIFY i_final_data FROM wa_final_data INDEX 1.
CLEAR: ls_celltab, lt_celltab, wa_final_data.
Here ls_celltab-style = '00003060' will make that particular cell in different color.
Regards,
Prakash.
Message was edited by: Prakash Ramu
09-26-2006 5:38 PM
Highlighted rows using "emphasis" will work just fine....Thank-You.
09-26-2006 5:23 PM
hi,
Emphasize (highlight columns in color): As name suggests, this field parameter is used to highlight certain field with chosen colors.
Value set: SPACE, 'X' or 'Cxyz' (x:'1'-'9'; y,z: '0'=off ,'1'=on).
'X' = column is colored with the default column highlight color.
'Cxyz' = column is colored with a coded color:
- C: Color (coding must begin with C)
- X: color number
- Y: bold
- Z: inverse
Regards,
Sailaja.
09-26-2006 5:33 PM
I have an ALV report with 2 different internal tables displayed in 2 separate ALV grids. Is that what you're trying to do? If so, I can share how I got it to work.
-Beth