I need to display empty editable table in SAP (something like transaction SM30 when you want to insert new records). I know how to make editable table, but my problem is how to display empty table. I true with APPEND INITIAL LINE TO t_output
but is not working.
Asked
Active
Viewed 1,494 times
0

Sandra Rossi
- 11,934
- 5
- 22
- 48

usesser
- 191
- 3
- 21
-
By "editable table", do you mean an ALV? – greenPadawan Nov 07 '16 at 08:09
-
[What have you tried so far?](http://stackoverflow.com/help/how-to-ask) – vwegert Nov 07 '16 at 08:23
1 Answers
0
Ok, I found my problem This is my previous code.
DO 5 TIMES.
APPEND INITIAL LINE TO t_output.
ENDDO.
t_output_alv = t_output.
IF go_container IS INITIAL.
CREATE OBJECT go_container
EXPORTING
container_name = 'CONTAINER'.
CREATE OBJECT go_grid
EXPORTING
i_parent = go_container.
CALL METHOD go_grid->set_table_for_first_display
EXPORTING
is_layout = s_layout
is_variant = s_variant
CHANGING
it_fieldcatalog = t_fieldcat
it_outtab = t_output_alv.
ENDIF.
and this is my new code.
DO 5 TIMES.
APPEND INITIAL LINE TO t_output_alv.
ENDDO.
The difference here is that in the second code i'm appending to t_output_alv
not to t_output
.

usesser
- 191
- 3
- 21
-
This will only be the solution if you have declared `t_output` as table with header line, which is deprecated and should no be done any more. Otherwise the assignment would have taken care of this. – vwegert Nov 07 '16 at 09:04
-
I'm declaring like ` DATA s_output like vbak . DATA t_output like standard table of s_output.` – usesser Nov 07 '16 at 09:28
-
I'd suggest adding that to the question instead of the (basically un-format-able comments). – vwegert Nov 07 '16 at 09:29