cancel
Showing results for 
Search instead for 
Did you mean: 

ALV: change row color in a standard WD

Former Member
0 Kudos

Hello friends:

   I have seen many threads addressing the change of color in ALVs, but they all refer to completely Z webdynrpos. Do you think it would be possible to enhance standard webdynpro HRECM00_PLANNING_UI so that rows have a change of color based on certain conditions?

Thank you very much in advance!

Accepted Solutions (1)

Accepted Solutions (1)

ramakrishnappa
Active Contributor
0 Kudos

Hi,

Yes, its possible to enhance standard WD and make the necessary arrangements to set the color of alv.

  • If the context node is created using a structure
    • create a z structure and add a field CELLDESIGN in it
    • Now, append the z structure into the standard structure of node
    • update the node attributes by using structure attributes
  • if the context node is created without any structure
    • create an attribute CELLDESIGN
  • Enhance the view
  • Find out the method where the actual alv settings are done and use the POST EXIT of the same method to write the logic to set the color of alv
    • get the alv model
    • get the columns
    • set the cell design fieldname
  • While populating alv data into context, set the celldesign field value based on the requirement

Hope this helps you.

Regards,

Rama

Former Member
0 Kudos

Thank you so much Rama! Here is a snapshot of the view; looks like it does not use a structure right? Also, what should be the associated type of the attribute CELLDESING?

Thank you once again!

Federico.

ramakrishnappa
Active Contributor
0 Kudos

Hi Federico,

Actually you have to select node "DATAVIEWPARAMS" in component controller's context not in view context, because it is mapped from component controller. So, you can only do changes in component controller context and then update the mapping in VIEW controller.

Now, select "DATAVIEWPARAMS" node in component controller and check if it is used any structure.

The type of field CELLDESIGN is WDUI_TABLE_CELL_DESIGN.

Hope this helps you.

Regards,

Rama

Answers (0)