2014 Apr 15 10:30 AM
Hello guys,
i have a problem with my internal table.
i create a dynamical internal table with:
CREATE DATA lt_object1 TYPE STANDARD TABLE OF ('VBAK').
ASSIGN lt_object1->* TO <gt_object>.
This works fine. but after this statement i have a fixed structure of the table VBAK. i have to add an another column to my internal table, because i need the field input_style TYPE lvc_t_styl, for my ALV-GRID.
I tried also to create the dynamical table with the CALL METHOD cl_alv_table_create=>create_dynamic_table, but then i get a issue with the widht of my internal table, compared to the real table.
does anyone have a solution for this?
best regards
Hello guys,
i have a problem with my internal table.
i create a dynamical internal table with:
CREATE DATA lt_object1 TYPE STANDARD TABLE OF ('VBAK').
ASSIGN lt_object1->* TO <gt_object>.
This works fine. but after this statement i have a fixed structure of the table VBAK. i have to add an another column to my internal table, because i need the field input_style TYPE lvc_t_styl, for my ALV-GRID.
I tried also to create the dynamical table with the CALL METHOD cl_alv_table_create=>create_dynamic_table, but then i get a issue with the widht of my internal table, compared to the real table.
does anyone have a solution for this?
best regards
2014 Apr 15 10:44 AM
Hi,
for LVC_T_STYL is a table type and not a simple column I don't know, if this is possible for a dynamic internal table. Maybe this is not supported.
Regards,
Klaus
2014 Apr 15 10:48 AM
hi,
thanks i used LVC_T_STYL in a another programm. but there i had to handle this only for one fixed table not for more tables.
so i dont know how to expand my internal table.
2014 Apr 15 10:50 AM
Hi,
maybe class CL_ABAP_TABLEDESCR may solve your issue, but I have no experience with it.
Regards,
Klaus
2014 Apr 15 12:09 PM
Hi,
Please go through the below link, you may get an idea.
http://zevolving.com/2008/09/dynamic-internal-table-creation/
Dynamic Internal Table with Deep structure | ABAP Help Blog
Regards
Anand
2014 Apr 15 12:53 PM
Hello,
First-of-all a very unique name
Anyway the RTTS classes are very intuitive and you can think of creating the components of a runtime structure similar to creating a static structure.
The algorithm is as follows -
So you can try this code snippet
BR,
Suhas
PS - Please excuse me i can't stop loving ABAP 740
2023 Mar 22 3:55 PM
We have to have a small discussion about intuitive, but.... For me it worked out perfectly
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |