04-25-2006 9:43 AM
hi,
I create a internal table like:
FIELD-SYMBOLS: <dyntable> TYPE standard table.
CALL METHOD cl_alv_table_create=>create_dynamic_table
EXPORTING
it_fieldcatalog = lt
IMPORTING
ep_table = t_data
EXCEPTIONS
generate_subpool_dir_full = 1
OTHERS = 2.
IF sy-subrc <> 0.
ENDIF.
assign t_data->* to <dyntable>.
The result of the method is a standard table. Now I need a sorted table.
Is it possible to convert the internal table from a standard to a sorted table?
thanks
markus
04-25-2006 9:52 AM
Hi,
Basically the method inside calls the FM : ALV_TABLE_CREATE, which actually constructs the syntax of declaring an internal table and then generates this code within a form routine of the program that was called.
This is done using syntax :
generate subroutine pool lt_source name l_name
message l_message line l_line word l_word.
So you can copy the FM ALV_TABLE_CREATE make the required modifications in the declaration of statements.
04-25-2006 9:56 AM
if you are on WAS6.40 you can create dynamic internal table of different type (standard , sorted, etc) using class
CL_ABAP_TABLEDESCR
method
CREATE
do let me know if you need code sample on this.
Regards
Raja
(i dont know a way to achieve this using cl_alv_table_create)