cancel
Showing results for 
Search instead for 
Did you mean: 

Different colors for progress indicator in Web Dynpro ALV based on the other field data?

former_member206479
Participant
0 Kudos

Hi All,

i need urgent help, i got a requirement to display a field in web Dynpro ALV as progressive indicator(and its done) with different colors based on status field content like approve, reject ....etc in the same table.

kindly help me out.

Regards

Venkat

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Venkat,

ProgessIndicator UI element has a property ' barColor' use that to change color.

Please check this

http://help.sap.com/saphelp_nw70ehp1/helpdata/en/81/e8884118aa1709e10000000a155106/content.htm

Cheers,

Kris.

former_member206479
Participant
0 Kudos

Hi Krishna,

I able to provide any one of the color in my ALV column, but my requirement is to assign the different colors(in alv progress indicator) based on other field data like status indications. Hope you understand my requirement.

Regards

Venkat

amy_king
Active Contributor
0 Kudos

Hi Venkat,

You could do something like...

case status_indicator.

     when value_one.

         barcolor = cl_wd_progress_indicator=>e_bar_color-neutral.

     when value_two.

         barcolor = cl_wd_progress_indicator=>e_bar_color-positive.

     when value_three.

         barcolor = cl_wd_progress_indicator=>e_bar_color-critical.

     when value_four.

         barcolor = cl_wd_progress_indicator=>e_bar_color-negative.

     etc.

endcase.

Cheers,

Amy

former_member206479
Participant
0 Kudos

Hi Amy,

I got the same thought, but where we write this code for ALV in WDA. I mean at the time of ALV initialization or where.....(i added one field for color in internal table and i modified internal table with specific color type... etc, at this it's filling the entire cell, i don't want entire cell i want to fill the different color in side indicator only ).

If you got my requirement can you give me the process(cycle) to do it.

Regards

Venkat

former_member210266
Active Participant
0 Kudos

Hi Venkat

You need to add one technical column for bar colour in the ALV.

In the ALV configuration method, for the progress indicator object, use the method

SET_BAR_COLOR_FIELDNAME( 'NAME_OF_THE_TECHNICAL_COLUMN' ).

Hide the technical column by using

  lo_alv->if_salv_wd_column_settings~delete_column( id = ls_column-id ).

Then set the value of the technical column at the initialization or at cell action event of ALV

Regards

Swati

Answers (0)