How will you add colour in a row using ALV ?
Answers were Sorted based on User's Feedback
Answer / sunil kumar gautam
In final internal add a field
line_color(4) type C.
Insert value like 'C710’ according to your color choice in this field.
Define a Layout
Data: gd_layout type slis_layout_alv,
Define Routine
Form disp_layout.
gd_layout-info_fieldname ='LINE_COLOR'
endform.
Call this routine before display the grid.
Is This Answer Correct ? | 2 Yes | 0 No |
Answer / venkaiah chowdary rudrapati
1.Add non data base column to the final internal table of the length four characters
2.Declare the work area of the type slis_layout_alv this structure contains the one of the field info_fieldname.
3.set a loop to final internal table
4.populate color code as per requirement
5.pass the color_ffield to the info_fieldname
coding:
types:begin of typ_vbak,
vbeln type vbak-vbeln,
f1,
f2,
'
'
row_color(4) type c,
end of typ_vbak.
data:it_vbak type table of typ_vbak.
field-symbols:<fs_vbak> type typ_vbak.
data:gs_layout type slis_layout_alv.
select vbeln
f1
f2
from vbak
into table it_vbak up to 200 rows.
data:lv_col type n value 1.
if not it_vbak is initial.
loop at it_vbak assigning <fs_vbak>.
concatenate 'C' LV_COL 1 1 into <fs_vbak>-row_color.
if lv_col lt 7
lv_col = lv_col + 1.
else.
lv_col = 1.
endif.
endloop.
gs_layout-info_fieldname = 'ROW_COLOR'.
endif.
Is This Answer Correct ? | 1 Yes | 0 No |
Answer / vivek
Using Emphasize keyword with a structure slis_t_fieldcat_alv
you can color a row
Is This Answer Correct ? | 1 Yes | 6 No |
How to raise an exception in Function Module?
Can we set page headers to details lists?
What are different ways in which data upload can be done using LSMW?
what is set cursor and get cursor command in module pool
What is the exact difference between RFC and BAPI ?
What is the difference of update types in call transaction method ? : abap bdc
While doing bdc exp va01 transaction sometime in the item level data shows only 4 items and other times it will show 6 line items, how will you maintain this kind of screen resolutions scenerio? : abap bdc
In table control how to maintain 10 records in first page, other 10 records in ohter page?
I created a field and entered the field type, when I double clicked the field type to define the domain; it is asking for an ACCESS KEY, I am not changing any SAP defined tables, working on a user defined table.
What is lock objects? : sap abap data dictionary
can we create views in bdc
What are text elements in smartforms ?