Application Development 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: 

Regarding Dynamic Internal Table

former_member248447
Participant
0 Kudos

Hi All,

Can any body explain how to create a dynamic internal table with deep structure.

I am using GRID Display for the output based upon the entries in the Dynamic Internal Table.

I have 10 rows fixed in my output, but where as the coloumns get changed dynamically, Now i have to display the 5th row and the 10th row in Bold in the output.

For this I need to use the stucute lvc_s_Styl , but i am not able to create the dynamic internal table for this by passing the lvc_s_styl into the dynamic fieldcat structure lvc_s_fcat.

Can anyone help me in this..?

Thanks,

Rajesh

4 REPLIES 4

naimesh_patel
Active Contributor
0 Kudos

You can check this post on how to create Dynamic Internal Table:

http://help-abap.blogspot.com/2008/09/dynamic-internal-table-creation.html

It also shows how to use the CL_SALV_TABLE to generate the output.

Regards,

Naimesh Patel

0 Kudos

Hi ,

this is fine, but my requirement is to create a dynamic internal table with coloumn as

deep strucuture table type lvc_t_styl.

0 Kudos

Ok.. I didn't get that before.

To create a table with a table type LVC_T_STYL you have to:

Get the table description

Create a field with that table description


  DATA:  lo_tab TYPE REF TO cl_abap_tabledescr.

  lo_tab ?= cl_abap_typedescr=>describe_by_name( 'LVC_T_STYL' ).

* Field name
  la_comp-name = 'STYLE_TAB'.
*
* Field type
  la_comp-type = lo_tab.

*   Filling the component table
  APPEND la_comp TO lt_tot_comp.
  CLEAR: la_comp.

In the continuation to the example given in the previous post, you can enter this piece of code after the DO .. ENDDO and before the step 3: Create a new Type.

Regards,

Naimesh Patel

0 Kudos

thanks Naimesh