How will you add colour in a row using ALV ?

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the different kinds of lock modes?

568


Explain the use of table maintenance allowed?

544


What is the purpose of at first and at last?

598


What is a collect statement?

575


What does the ‘suppress dialog’ do?

869






What are the aggregate objects in the data dictionary? : abap data dictionary

1048


What are the parameters in bdc_insert? : abap bdc

814


What does an EXEC SQL stmt do in ABAP? What is the disadvantage of using it?

750


What is the function of the correction system?

574


What is search help exit? : sap abap data dictionary

723


How can we send data to external programs?

621


Select query optimisation

898


ALV Report that will show the details of order like order no, order date, customer, product code & description, order quantity and value along with the details of dispatch of those orders like invoice no, invoice date, invoice quantity and pending order quantity. plz mention the detail coding Tahnks, Rahul

2172


Search help exit details.

930


dear friends, do you know how to configure web dynpro and adobe into ECC6.0 IDES?

2551