Very good video. I just learned to develop ALV using OOPs and was wondering how I could make colors of rows and columns. The way you taught is excellent. Please tell me if you have developed any videos on SAP enhancements or you know any good content available on youtube that may help in developing in skills in SAP enhancement. Thanks.
Have a look at line 24 in my example in the video. Above the code "color-col = 6" type the cell name you want to color like: "fname = 'PLANETYPE'". After that, only the cell planetype is colored. see the example code: -color = VALUE #( ( fname = 'PLANETYPE' color-col = 6 color-int = 0 color-inv = 1 ) ). 😀
Define color column: DATA: color TYPE lvc_s_scol. then set the color column in the alv ->set_color_column( 'COLOR' ). Then set the Color info to a field: color-fname = 'USRID'. color-color-col = 6. color-color-int = 0. color-color-inv = 0. 🤗
Have a look at line 24 in my example in the video. Above the code "color-col = 6" type the cell name you want to color like: "fname = 'PLANETYPE'". After that, only the cell planetype is colored. see the example code: -color = VALUE #( ( fname = 'PLANETYPE' color-col = 6 color-int = 0 color-inv = 1 ) ).
I Love this, helped me out so much it regrew lost hair. Thanks
hehehe😄 I'm glad you liked it. And thank you for watching! 🤗
Great video
Thank you and thank you for watching! 🤗
Thanks a lot for this
You are very welcome, and thank you for watching and commenting! 🤗
How to remove the primary key background color(blue) in alv display? Can you suggest a way to remove the background color of keys in alv display
In my system in class cl_salv_column_table method get_column in not existing what should I do?
Very good video. I just learned to develop ALV using OOPs and was wondering how I could make colors of rows and columns. The way you taught is excellent. Please tell me if you have developed any videos on SAP enhancements or you know any good content available on youtube that may help in developing in skills in SAP enhancement. Thanks.
Thanks for your kind feedback! 😀 At the moment I haven't any videos regarding enhancements in SAP. I have to check this out 😉
Hey is there a way to sort final table by the color? so the colored lines would be the first that display?
Color is a column, so yes you can sort the entries. Example: sort lt_sflight by color. 🤗
Great job, do a video about how to color a specific cell in a dynamic ALV, thanks in advance.
Thanks, ok I will check how to do that 😀
Have a look at line 24 in my example in the video. Above the code "color-col = 6" type the cell name you want to color like: "fname = 'PLANETYPE'". After that, only the cell planetype is colored.
see the example code:
-color = VALUE #( ( fname = 'PLANETYPE'
color-col = 6
color-int = 0
color-inv = 1
)
).
😀
what if want to color the row based in a condition (parameter for example)@@CustAndCode
I want to colour some cells of 2 column how can i achieve that.
Thanks
Define color column:
DATA: color TYPE lvc_s_scol.
then set the color column in the alv
->set_color_column( 'COLOR' ).
Then set the Color info to a field:
color-fname = 'USRID'.
color-color-col = 6.
color-color-int = 0.
color-color-inv = 0.
🤗
how to color a specific value only like if CARRID is LH just color the CARRID yellow? not the whole row.
Have a look at line 24 in my example in the video. Above the code "color-col = 6" type the cell name you want to color like: "fname = 'PLANETYPE'". After that, only the cell planetype is colored.
see the example code:
-color = VALUE #( ( fname = 'PLANETYPE'
color-col = 6
color-int = 0
color-inv = 1
)
).
May ask where is the first place of object cl_salv_table. be delared?
Line Nr.: 43 is the declaration. This object o_salv I use in the method call in line 38. 🤗
How to implement this using dynamic table
Color column is not dynamic, but everything else? 🤔
servus, du rettest mich echt mit deinen erklärungen, diese sap press bücher sind nichts für mich :D
hehe das freut mich! 😀 Man lernt echt immer am besten mit richtigen Aufgaben aus der Praxis. 🤗🤩
Why you declare "type table of" instead "type standard table of" ? Is it matters?
There is not much difference from my point of view, the addition STANDARD for standard tables is optional. 🤗