We have seen how we can use Run Time Type Services (RTTS) to create a dynamic internal table in the post: Dynamic Internal Table Creation. On the other day, after publishing the post SALV Table 9 - Apply Colors, I was thinking how I can apply these color settings when I have a Dynamic Internal Table. As we have seen into that post, we require an internal table for Color in our Output table means a dynamic internal table with deep structure.
Dyanmic internal table with deep structure is specially useful when we have to create an ALV with Colors or Style etc. Since we have CL_ABAP_TABLEDESCR class from RTTS, it is also possible to create a dynamic internal table with the deep structure. To create an internal table with deep structure, we need to first get the object definition of the table type. Than we have to add that as a component of our table definition and that's it.
This code snippet is in the continuation with the code given in the post Dynamic Internal Table Creation. You can put this code just after the DO..ENDO and before 3. Create a New Type.
Code Snippet to add the deep component in Dynamic Itab |
|
0 comments
Post a Comment