08-04-2006 12:15 AM
I would like to pass the DREF variable as parameter to the class method. How should I define the parameter ?
Would the TYPING METHOD be 'DREF' and Associated type 'DATA'?
08-04-2006 12:22 AM
08-04-2006 12:33 AM
For example, when creating a dynamic internal table.
report zrich_0002.
field-symbols: <dyn_table> type standard table,
<dyn_wa>.
data: new_table type ref to data.
data: it_fldcat type lvc_t_fcat,
wa_it_fldcat type lvc_s_fcat.
data: index(2) type c.
do 10 times.
index = sy-index.
clear wa_it_fldcat.
concatenate 'Field' index into
wa_it_fldcat-fieldname .
condense wa_it_fldcat-fieldname no-gaps.
wa_it_fldcat-datatype = 'CHAR'.
wa_it_fldcat-intlen = 5.
append wa_it_fldcat to it_fldcat .
enddo.
* Create dynamic internal table and assign to FS
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>.
check sy-subrc = 0.
Regards,
Rich Heilman