Coloring particular column of ALV table in Web Dynpro


Step 13 :  Provide Element ID and Type as ‘ViewContainerUIElement’. Press Enter


Step 14 :

1.     Double click on window name

2.     Select main->view( View Container UI Element )

3.     Rightclick it and select ‘Embed View’ to embed the ALV table


Step 15 :  Select ALV table from the pop up window  


Step 16 :  

1.     Double click on Main View

2.     Go to Methods tab

3.     Double click on method ‘WDDOINIT’


Step 17:

1.     Click ‘Web dynpro code wizard’

2.     Go to  ‘General’ tab

3.     Choose ‘Instantiate Used Component’ radio button

4.     Select ALV component from the F4 help window


Step 18 :

1.     Again click ‘Web dynpro code wizard’

2.     Choose ‘Method call in used controller’ radio button

3.     Select ALV component in the F4 help window


Step 19 : Give Method Name as ‘GET_MODEL’ and press Enter  


Step 20 :  Write the below code  

*Defining  column reference
data lr_column type ref to cl_salv_wd_column.
*Assigning column reference
call method lv_value->if_salv_wd_column_settings~get_column
id    = 'EBELN'
value = lr_column.
*Setting column color
call method lr_column->set_cell_design
value = 1.  


Below are the sample color codes that we can specify as export value of method ‘set_cell_design‘ in the above code  


Step 21 :   Activate the whole web dynpro component and create application by right clicking and selecting create->web dynpro application  


Step 22 :  Provide description for application, press Enter and Save  


Step 23 :  Right click the application and select ‘Test’ to the test the web dynpro application  




Please send us your feedback/suggestions at webmaster@SAPTechnical.COM 

HomeContribute About Us Privacy Terms Of Use • Disclaimer • SafeCompanies: Advertise on SAPTechnical.COM | Post JobContact Us  

Graphic Design by Round the Bend Wizards

footer image footer image