Skip to Content
avatar image
Former Member

ALV: change row color in a standard WD

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!

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    Jun 27, 2014 at 02:56 AM

    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

    Add comment
    10|10000 characters needed characters exceeded

    • 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