‎2007 Jan 05 6:15 PM
How do you create a dynamic table with header line. The below CALL METHOD creates one without the header line.
How do you sort the dynamic table?
CALL METHOD cl_alv_table_create=>create_dynamic_table
EXPORTING
it_fieldcatalog = it_fldcat
IMPORTING
ep_table = new_table.
ASSIGN new_table->* TO <dyn_table>.
Create dynamic work area and assign to FS
CREATE DATA new_line LIKE LINE OF <dyn_table>.
ASSIGN new_line->* TO <dyn_wa>.
‎2007 Jan 06 11:37 AM
<i>How do you create a dynamic table with header line.</i>
you cannot create dynamic internal table with header line. moreover in the ABAP OO context itabs with header lines are not permitted and its a good practice to avoide itabs with header area.
Regards
Raja
‎2007 Jan 05 6:17 PM
Hi,
For sorting the dynamic internal table..
Try this..
DATA: T_FIELD(30) OCCURS 0 WITH HEADER LINE.
FIELD-SYMBOLS: <FS> TYPE TABLE.
T_FIELD = 'MATNR'.
APPEND T_FIELD.
SORT <FS> BY (T_FIELD).
Thanks,
Naren
‎2007 Jan 06 11:37 AM
<i>How do you create a dynamic table with header line.</i>
you cannot create dynamic internal table with header line. moreover in the ABAP OO context itabs with header lines are not permitted and its a good practice to avoide itabs with header area.
Regards
Raja