Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

deep structure in internal table

Former Member
0 Likes
683

Hi abapers

i am creating a dynamic internal table. now i have the requirement to color the individual

cells of internal table. which is possible only by declaring the deep structure for this dynamic

internal table. the problem is i am not getting any idea about, how to declare a deep structure

for the dynamic internal table.

the display of this dynamic internal table is in ALV.

so please help me and give the idea for,

how to declare a deep sturcture for a dynamic internal table.

thanks in advance

points assured

1 REPLY 1
Read only

Former Member
0 Likes
347

Hi Sami,

You can declare a Dynamic Internal table in the Table Type in SE11. You can also create a deep structure in it also.

You have to create a deep structure by Include Statement. You can look at the link below to have a good understanding of the same.

To read a deep structure

You achive the color coding scheme through ALV. Below is the code for color usage. For complete documentation use the following link:

http://help.sap.com/saphelp_47x200/helpdata/en/0a/b552f7d30911d2b467006094192fe3/frameset.htm

For color code of the ALV you can use the following code:

Add a component COLOR_TYPE type LVC_T_SCOL to your structure.

data: it_color type type table of lvc_s_scol.

data: wa_color type lvc_s_scol.

if condition.

set color to green

move '5' to wa_color-color-col.

move '0' to wa_color-color-int.

move '0' to wa_color-color-inv.

or set to yellow

move '3' to wa_color-color-col.

move '1' to wa_color-color-int.

move '0' to wa_color-color-inv.

or set to red

move '6' to wa_color-color-col.

move '0' to wa_color-color-int.

move '0' to wa_color-color-inv.

append wa_color to it_color.

wa_alv_data-color_cell] = it_color[.

clear wa_color.

endif.

Thanks,

Samantak.

Rewards points for useful answers.