2009 Aug 05 7:13 AM
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
2009 Aug 05 8:14 AM
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.
2009 Aug 05 8:42 AM
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