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: 

REUSE_ALV_GRID_DISPLAY - single line editable - Fieldsymbols

Former Member
0 Kudos
199

Hi all,

I have written a transaction where you can select a table and this table is then editable (not the key fields) in an alv grid.

But now I have the functionality to add new rows and the key fields are still inactve that the user cannot input some data to the key fields.

Now I have found that I need to add a structure called lvc_t_styl.

So I create my dynamic field symbol table this way:

  • create dynamic table

CREATE DATA lt_table TYPE STANDARD TABLE OF (table).

ASSIGN lt_table->* TO <fs_table>.

How can I add the following structure additional to my field symbol table?

DATA: celltab type LVC_T_STYL.

-


In the normal way I would do it this way:

DATA: BEGIN OF gt_outtab occurs 0. "with header line

include structure sflight.

DATA: celltab type LVC_T_STYL.

DATA: END OF gt_outtab.

How can I reach this with my field symbols?

regards

2 REPLIES 2

former_member218674
Contributor
0 Kudos
153

Hello,

Try this way:

You can call following static method from cl_alv_table_create:

call method cl_alv_table_create=>create_dynamic_table

exporting

it_fieldcatalog = fieldcatalog_tab

importing

ep_table = table.

Now fieldcatalog_tab contains all the fields you want in table. internal table reference will be returned in table

and that you can use to assign it to field symbol.

ASSIGN table->* to <itab>.

Hope this helps!

Thanks,

Augustin.

0 Kudos
153

Hi,

thanks.

Can you give me an example how I insert a table into the fieldcatalog?

I think I can just add single fields to the fieldcatalog?

regards