‎2008 Jan 07 2:38 AM
Hi,
How to create a dynamic internal table ??
How to generate the columns of the internal table at run time??
Thanks.
‎2008 Jan 07 2:53 AM
HI ,
DATA: new_table TYPE REF TO data,
new_line TYPE REF TO data,
IS_LVC_CAT type LVC_S_FCAT,
IT_LVC_CAT type LVC_T_FCAT,
IS_FIELDCAT type SLIS_FIELDCAT_ALV.
FIELD-SYMBOLS: <l_table> TYPE TABLE,
<l_line> TYPE ANY,
<l_field> TYPE ANY.
Create a new Table
CALL METHOD cl_alv_table_create=>create_dynamic_table
EXPORTING
it_fieldcatalog = IT_LVC_CAT
IMPORTING
ep_table = new_table.
Create a new Line with the same structure of the table.
ASSIGN new_table->* TO <l_table>.
CREATE DATA new_line LIKE LINE OF <l_table>.
ASSIGN new_line->* TO <l_line>.
See this may be it will help full for u i think
THX
‎2008 Jan 07 2:57 AM
HI ,,
Check this example..
If you give the input as 3...IT will create 3 columns..
PARAMETERS: p_input TYPE i OBLIGATORY.
START-OF-SELECTION.
DATA: v_fieldname TYPE char30.
DATA: v_char TYPE numc4.
DATA: it_fldcat TYPE lvc_t_fcat.
DATA: wa_it_fldcat LIKE LINE OF it_fldcat.
DATA: gp_table TYPE REF TO data.
FIELD-SYMBOLS: <gt_table> TYPE table.
DO p_input TIMES.
v_fieldname = 'COL'.
v_char = sy-index.
CONCATENATE v_fieldname v_char INTO v_fieldname.
CONDENSE v_fieldname.
CLEAR wa_it_fldcat.
wa_it_fldcat-fieldname = v_fieldname.
wa_it_fldcat-datatype = 'CHAR'.
wa_it_fldcat-outputlen = 5.
wa_it_fldcat-intlen = 5.
APPEND wa_it_fldcat TO it_fldcat .
ENDDO.
Internal table creation..
CALL METHOD cl_alv_table_create=>create_dynamic_table
EXPORTING it_fieldcatalog = it_fldcat
IMPORTING ep_table = gp_table.
ASSIGN gp_table->* TO <gt_table>.
CHECK sy-subrc = 0.
DATA: WA TYPE REF TO DATA.
Work area for the dynamic internal table.
CREATE DATA WA LIKE LINE OF <gt_table>.
WRITE: / 'Dynamic internal table created'.
‎2008 Jan 07 2:58 AM
Check this webblog of Dynamic Internal Table
/people/rich.heilman2/blog/2005/07/27/dynamic-internal-tables-and-structures--abap
Regards
Gopi
‎2008 Jan 07 3:34 AM
Renu ,
Pls. check the below links.
/people/subramanian.venkateswaran2/blog/2004/11/19/dynamic-internal-table
http://www.sap-img.com/ab030.htm
Don't forget to reward if useful.....
‎2008 Jan 07 4:04 AM
Hi Renu,
This is another method that you can use
*&---------------------------------------------------------------------*
*& Report ZKRIS_CREATE_DYNAMIC_PROG_ITAB
*&
*&---------------------------------------------------------------------*
*&
*&
*&---------------------------------------------------------------------*
REPORT ZKRIS_CREATE_DYNAMIC_PROG_ITAB.
* Example: how to create a dynamic internal table
selection-screen begin of block b1 with frame title f1_ttl.
parameters: p_f1name(8) default 'field1' lower case.
parameters: p_f2name(8) default 'field2' lower case.
parameters: p_f3name(8) default 'field3' lower case.
selection-screen end of block b1.
initialization.
f1_ttl = 'Dynamic field names'.
start-of-selection.
* The dynamic internal table stucture
DATA: BEGIN OF struct OCCURS 10,
fildname(8) TYPE c,
abptype TYPE c,
length TYPE i,
END OF struct.
* The dynamic program source table
DATA: BEGIN OF inctabl OCCURS 10,
line(72),
END OF inctabl.
DATA: lng TYPE i, typesrting(6).
* Sample dynamic internal table stucture
struct-fildname = p_f1name. struct-abptype = 'c'. struct-length = '6'.
APPEND struct. CLEAR struct.
struct-fildname = p_f2name. struct-abptype = 'd'.
APPEND struct. CLEAR struct.
struct-fildname = p_f3name. struct-abptype = 'i'.
APPEND struct. CLEAR struct.
* Create the dynamic internal table definition in the dyn. program
inctabl-line = 'program zdynpro.'. APPEND inctabl.
inctabl-line = 'data: begin of dyntab occurs 10,'. APPEND inctabl.
LOOP AT struct.
inctabl-line = struct-fildname.
lng = STRLEN( struct-fildname ).
IF NOT struct-length IS INITIAL .
typesrting(1) = '('.
typesrting+1 = struct-length.
typesrting+5 = ')'.
CONDENSE typesrting NO-GAPS.
inctabl-line+lng = typesrting.
ENDIF.
inctabl-line+15 = 'type '.
inctabl-line+21 = struct-abptype.
inctabl-line+22 = ','.
APPEND inctabl.
ENDLOOP.
inctabl-line = 'end of dyntab. '.
APPEND inctabl.
* Create the code processes the dynamic internal table
inctabl-line = ' '. APPEND inctabl.
concatenate 'dyntab-' p_f1name ' = ''aaaaaa''.' into inctabl-line.
APPEND inctabl.
concatenate 'dyntab-' p_f2name ' = ''19970814''.' into inctabl-line.
APPEND inctabl.
concatenate 'dyntab-' p_f3name ' = 1.' into inctabl-line.
APPEND inctabl.
*inctabl-line = 'dyntab-field1 = ''aaaaaa''.'. APPEND inctabl.
*inctabl-line = 'dyntab-field2 = ''19970814''.'. APPEND inctabl.
*inctabl-line = 'dyntab-field3 = 1.'. APPEND inctabl.
inctabl-line = 'append dyntab.'. APPEND inctabl.
inctabl-line = ' '. APPEND inctabl.
inctabl-line = 'loop at dyntab.'. APPEND inctabl.
*inctabl-line = 'write: / dyntab-field1, dyntab-field2, dyntab-field3.'.
concatenate 'write:/ dyntab-' p_f1name ','
'dyntab-' p_f2name ','
'dyntab-' p_f3name '.'
into inctabl-line.
APPEND inctabl.
inctabl-line = 'endloop.'. APPEND inctabl.
* Create and run the dynamic program
INSERT REPORT 'ZDYNPRO' FROM inctabl.
IF sy-subrc = 0.
SUBMIT zdynpro.
ELSE.
WRITE : / 'error'.
ENDIF.
‎2008 Jan 07 5:25 AM
Hi,
please have a look on below code....
Local Work Area Declaration
DATA : lwa_dynamic TYPE REF TO data,
lwa_aufktmp TYPE t_aufk_vafiloa.
Local Field Symbol Declaration
FIELD-SYMBOLS : <lfs_dynamic> TYPE ANY,
<lf_swerk> TYPE ANY,
<lf_name1> TYPE ANY,
<lf_auart> TYPE ANY,
<lf_percent> TYPE ANY,
<lf_tot_ord> TYPE ANY.
Local Variable Declaration
DATA : lv_counter TYPE i,
lv_percent TYPE p DECIMALS 2,
lv_field_name(30) TYPE c.
Create work area for Dynamic Table
CREATE DATA lwa_dynamic LIKE LINE OF <i_outab>.
ASSIGN lwa_dynamic->* TO <lfs_dynamic>.
Initiate Loop Construct at List of Work Order types
LOOP AT i_aufk INTO wa_aufk.
lwa_aufktmp = wa_aufk.
For Every new Work Order Type
AT NEW auart.
CLEAR lv_counter.
ENDAT.
Get the Work order Type
CLEAR lv_field_name.
lv_field_name = wa_aufk-auart.
ASSIGN COMPONENT lv_field_name OF STRUCTURE <lfs_dynamic> TO
<lf_auart>.
*Count the Work order type
IF <lf_auart> IS ASSIGNED.
lv_counter = lv_counter + 1.
<lf_auart> = lv_counter.
ELSE.
<lf_auart> = 0.
ENDIF.
For Every Mainternance Plant.
AT END OF swerk.
Populate the Maintenance plant
ASSIGN COMPONENT 'SWERK' OF STRUCTURE <lfs_dynamic> TO <lf_swerk>.
IF <lf_swerk> IS ASSIGNED.
<lf_swerk> = lwa_aufktmp-swerk.
ENDIF.
CLEAR wa_t001w.
READ TABLE i_t001w INTO wa_t001w WITH KEY
werks = lwa_aufktmp-swerk
BINARY SEARCH.
IF sy-subrc = 0.
Populate the Maintenance Plant Description
ASSIGN COMPONENT 'NAME1' OF STRUCTURE <lfs_dynamic> TO
<lf_name1>.
IF <lf_name1> IS ASSIGNED.
<lf_name1> = wa_t001w-name1.
ENDIF.
ENDIF.
Populate the Total Work Order for given type in selection.
ASSIGN COMPONENT 'TOT_ORD' OF STRUCTURE <lfs_dynamic> TO
<lf_tot_ord>
.
IF <lf_tot_ord> IS ASSIGNED.
<lf_tot_ord> = v_tot_ord.
ENDIF.
LOOP AT i_auart INTO wa_auart.
CONCATENATE wa_auart-auart 'PER' INTO lv_field_name.
Populate the %
ASSIGN COMPONENT lv_field_name OF STRUCTURE <lfs_dynamic>
TO <lf_percent>.
IF <lf_percent> IS ASSIGNED.
ASSIGN COMPONENT wa_auart-auart OF STRUCTURE
<lfs_dynamic> TO <lf_auart>.
For Percentage of particular Order types.
IF <lf_auart> IS ASSIGNED.
IF v_tot_ord <> 0.
lv_percent = ( <lf_auart> / v_tot_ord ) * 100.
ENDIF.
<lf_percent> = lv_percent.
ENDIF.
ENDIF.
CLEAR wa_auart.
ENDLOOP.
APPEND <lfs_dynamic> TO <i_outab>.
CLEAR <lfs_dynamic>.
ENDAT.
ENDLOOP.
Thanks,
murali
‎2008 Jan 07 9:25 AM
Just an example.. Try this method.
REPORT zar_test1.
PARAMETERS: pa_cid TYPE c DEFAULT 'X' AS CHECKBOX,
pa_cname TYPE c AS CHECKBOX,
pa_curr TYPE c AS CHECKBOX,
pa_url TYPE c AS CHECKBOX.
DATA: it_scarr TYPE REF TO data,
wa_scarr TYPE REF TO data,
cref TYPE REF TO cl_gui_custom_container,
alvobj TYPE REF TO cl_gui_alv_grid,
it_fcat TYPE lvc_t_fcat,
wa_fcat TYPE lvc_s_fcat.
FIELD-SYMBOLS: <fs_t_scarr> TYPE REF TO data,
<fs_it> TYPE ANY TABLE,
<fs_wa> TYPE ANY.
AT SELECTION-SCREEN.
IF pa_cid = 'X'.
wa_fcat-fieldname = 'CARRID'.
wa_fcat-inttype = 'C'.
APPEND wa_fcat TO it_fcat.
ENDIF.
IF pa_cname = 'X'.
wa_fcat-fieldname = 'CARRNAME'.
wa_fcat-inttype = 'C'.
APPEND wa_fcat TO it_fcat.
ENDIF.
IF pa_curr = 'X'.
wa_fcat-fieldname = 'CURRCODE'.
wa_fcat-inttype = 'C'.
APPEND wa_fcat TO it_fcat.
ENDIF.
IF pa_url = 'X'.
wa_fcat-fieldname = 'URL'.
wa_fcat-inttype = 'C'.
APPEND wa_fcat TO it_fcat.
ENDIF.
START-OF-SELECTION.
ASSIGN it_scarr TO <fs_t_scarr>.
CALL METHOD cl_alv_table_create=>create_dynamic_table
EXPORTING
it_fieldcatalog = it_fcat
IMPORTING
ep_table = it_scarr
EXCEPTIONS
generate_subpool_dir_full = 1
OTHERS = 2
.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ASSIGN <fs_t_scarr>->* TO <fs_it>.
CREATE DATA wa_scarr LIKE LINE OF <fs_it>.
ASSIGN wa_scarr->* TO <fs_wa>.
SELECT carrid carrname currcode url FROM scarr
INTO CORRESPONDING FIELDS OF
TABLE <fs_it>.
LOOP AT <fs_it> ASSIGNING <fs_wa>.
WRITE: / <fs_wa>.
ENDLOOP.
‎2008 Jan 07 9:35 AM
hi raj,
First we have to check the no. of columns are there .
after checking the coulumn creat the field catalog for the dyanmic column.
example
data y_i_fcat TYPE lvc_t_fcat,
. y_wa_fcat TYPE lvc_s_fcat,
y_i_fieldcat TYPE slis_t_fieldcat_alv,
FIELD-SYMBOLS : <y_fld> TYPE ANY.
FIELD-SYMBOLS: <dyn_table> TYPE STANDARD TABLE,
<dyn_wa>.
DO y_lv_cntr_max TIMES.
y_v_charno = y_v_charno + 1.
y_wa_fcat-ref_field = 'OBJNAME'.
y_wa_fcat-ref_table = 'COMM_CFGOCLASS'.
CONCATENATE 'CLASS' '-'
y_v_charno
INTO y_wa_fcat-fieldname.
CONCATENATE text-d13
y_v_charno
INTO y_wa_fcat-scrtext_l .
APPEND y_wa_fcat TO y_i_fcat.
CLEAR y_wa_fcat.
enddo.
after thsi keep the loop to y_i_fcat.
and move the
MOVE: y_wa_fcat-fieldname TO y_wa_fieldcat-fieldname,
y_wa_fcat-tabname TO y_wa_fieldcat-tabname,
y_wa_fcat-col_pos TO y_wa_fieldcat-col_pos,
y_wa_fcat-scrtext_l TO y_wa_fieldcat-seltext_l,
y_wa_fcat-datatype TO y_wa_fieldcat-datatype,
y_wa_fcat-intlen TO y_wa_fieldcat-intlen.
APPEND y_wa_fieldcat TO y_i_fieldcat.
endloop.
after this u the funciton module
CALL METHOD cl_alv_table_create=>create_dynamic_table
EXPORTING
it_fieldcatalog = y_i_fcat
IMPORTING
ep_table = dy_table.
ASSIGN dy_table->* TO <dyn_table>.
create dynamic work area and assign to fs
CREATE DATA dy_line LIKE LINE OF <dyn_table>.
ASSIGN dy_line->* TO <dyn_wa>.
loop the internal table which have data.
ASSIGN COMPONENT y_lv_comp OF STRUCTURE <dyn_wa> TO <y_fld>.
<y_fld> = work area-fieldname.
endloop.
if help full regard points
‎2008 Feb 14 6:17 AM
Hi,
pls go through this program.
report z_dynamic.
type-pools : abap.
field-symbols: <dyn_table> type standard table,
<dyn_wa>,
<dyn_field>.
data: dy_table type ref to data,
dy_line type ref to data,
xfc type lvc_s_fcat,
ifc type lvc_t_fcat.
selection-screen begin of block b1 with frame.
parameters: p_table(30) type c default 'T001'.
selection-screen end of block b1.
start-of-selection.
perform get_structure.
perform create_dynamic_itab.
perform get_data.
perform write_out.
form create_dynamic_itab.
Create dynamic internal table and assign to FS
call method cl_alv_table_create=>create_dynamic_table
exporting
it_fieldcatalog = ifc
importing
ep_table = dy_table.
assign dy_table->* to <dyn_table>.
Create dynamic work area and assign to FS
create data dy_line like line of <dyn_table>.
assign dy_line->* to <dyn_wa>.
endform.
Regards,
Gowri sankar
if it is usful reward points
‎2008 Feb 14 6:21 AM
Hi,
I have posted a code for dynamic internal table the concept it...when record is greater than 5 append the values to other internal table( Perform 200_FILE_SPLIT ) ....
I have used field symbols for this....paste this code and check out in debugger i think this would help you...
REPORT ZDYNAMIC_INTERNAL_TABLE.
TYPE-POOLS : ABAP.
FIELD-SYMBOLS : <DYN_TABLE1> TYPE STANDARD TABLE,
<DYN_TABLE2> TYPE STANDARD TABLE,
<DYN_TABLE3> TYPE STANDARD TABLE,
<DYN_WA>.
DATA : DY_TABLE1 TYPE REF TO DATA,
DY_TABLE2 TYPE REF TO DATA,
DY_TABLE3 TYPE REF TO DATA,
DY_LINE TYPE REF TO DATA,
XFC TYPE LVC_S_FCAT,
IFC TYPE LVC_T_FCAT,
DY_TABLE TYPE REF TO data.
DATA : BEGIN OF I_MARA OCCURS 0,
MATNR LIKE MARA-MATNR,
END OF I_MARA.
DATA : IDETAILS TYPE ABAP_COMPDESCR_TAB,
XDETAILS TYPE ABAP_COMPDESCR.
DATA : REF_TABLE_DES TYPE REF TO CL_ABAP_STRUCTDESCR.
DATA : INT TYPE I VALUE 1,
INT1 TYPE I,
INT3 TYPE I.
SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME.
PARAMETERS : P_FILE LIKE RLGRAP-FILENAME.
SELECTION-SCREEN END OF BLOCK B1.
&----
*& AT SELECTION-SCREEN
&----
AT SELECTION-SCREEN
ON VALUE-REQUEST FOR P_FILE.
PERFORM GET_FILE USING P_FILE.
&----
*& START OF SELECTION
&----
START-OF-SELECTION.
PERFORM 100_UPLOAD_INTERAL.
PERFORM 150_GET_STRUCTURE.
PERFORM 200_FILE_SPLIT.
&----
*& Form GET_FILE
&----
GETTING FILE NAME FROM THE USER
-
form GET_FILE using p_p_file.
CALL FUNCTION 'WS_FILENAME_GET'
EXPORTING
MASK = ',All Files,..'
IMPORTING
FILENAME = P_FILE
RC =
EXCEPTIONS
INV_WINSYS = 1
NO_BATCH = 2
SELECTION_CANCEL = 3
SELECTION_ERROR = 4
OTHERS = 5
.
IF sy-subrc 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO.
ENDIF.
endform. " GET_FILE
&----
*& Form 100_UPLOAD_INTERAL
&----
UPLOADING TO THE INTERNAL TABLE
-
form 100_UPLOAD_INTERAL .
CALL FUNCTION 'WS_UPLOAD'
EXPORTING
FILENAME = P_FILE
FILETYPE = 'DAT'
TABLES
data_tab = I_MARA
EXCEPTIONS
CONVERSION_ERROR = 1
FILE_OPEN_ERROR = 2
FILE_READ_ERROR = 3
INVALID_TYPE = 4
NO_BATCH = 5
UNKNOWN_ERROR = 6
INVALID_TABLE_WIDTH = 7
GUI_REFUSE_FILETRANSFER = 8
CUSTOMER_ERROR = 9
NO_AUTHORITY = 10
OTHERS = 11
.
IF sy-subrc 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO.
ENDIF.
endform. " 100_UPLOAD_INTERAL
&----
*& Form 200_FILE_SPLIT
&----
SPLITING UP THE INTERNAL TABLE DEPENDING ON THE
FILE SIZE AND LOADING TO NEW DYNAMIC INTERNAL TABLE
-
form 200_FILE_SPLIT .
DESCRIBE TABLE I_MARA.
IF SY-SUBRC = 0.
INT = SY-TFILL.
IF INT > 5.
INT1 = INT - 5.
IF INT1 > 5 AND INT1 < 10.
CREATE <SYN_TABLE2> AND <SYN_TABLE3>
PERFORM 300_DYNAMIC_TABLE.
PERFORM 300_DYNAMIC_TABLE2.
PERFORM 300_DYNAMIC_TABLE3.
ASSIGN DY_TABLE1->* TO <DYN_TABLE1>.
ASSIGN DY_TABLE2->* TO <DYN_TABLE2>.
ASSIGN DY_TABLE3->* TO <DYN_TABLE3>.
CREATE DATA DY_LINE LIKE LINE OF <DYN_TABLE1>.
CREATE DATA DY_LINE LIKE LINE OF <DYN_TABLE2>.
CREATE DATA DY_LINE LIKE LINE OF <DYN_TABLE3>.
assign dy_line->* to <dyn_wa>.
LOOP AT I_MARA INTO <DYN_WA>.
IF SY-TABIX <= 5.
APPEND <DYN_WA> TO <DYN_TABLE1>.
ELSEIF SY-TABIX > 5 AND SY-TABIX <= 10.
APPEND <DYN_WA> TO <DYN_TABLE2>.
ELSEIF SY-TABIX > 10.
APPEND <DYN_WA> TO <DYN_TABLE3>.
ENDIF.
ENDLOOP.
ELSE.
CREATE <SYN_TABLE2>
PERFORM 300_DYNAMIC_TABLE.
PERFORM 300_DYNAMIC_TABLE2.
ASSIGN DY_TABLE1->* TO <DYN_TABLE1>.
ASSIGN DY_TABLE2->* TO <DYN_TABLE2>.
CREATE DATA DY_LINE LIKE LINE OF <DYN_TABLE1>.
CREATE DATA DY_LINE LIKE LINE OF <DYN_TABLE2>.
assign dy_line->* to <dyn_wa>.
LOOP AT I_MARA INTO <DYN_WA>.
IF SY-TABIX <= 5.
APPEND <DYN_WA> TO <DYN_TABLE1>.
ELSEIF SY-TABIX > 5 AND SY-TABIX <= 10.
APPEND <DYN_WA> TO <DYN_TABLE2>.
ENDIF.
ENDLOOP.
ENDIF.
ELSE.
INT1 = 5.
INT3 = 1.
perform 300_dynamic_table.
ASSIGN DY_TABLE1->* TO <DYN_TABLE1>.
CREATE DATA DY_LINE LIKE LINE OF <DYN_TABLE1>.
assign dy_line->* to <dyn_wa>.
LOOP AT I_MARA INTO <DYN_WA>.
APPEND <DYN_WA> TO <DYN_TABLE1>.
ENDLOOP.
ENDIF.
ELSE.
WRITE : 'FILE IS INVALID CHOOSE CORRECT FILE'.
ENDIF.
LOOP AT <DYN_TABLE1> INTO <DYN_WA>.
WRITE : <DYN_WA>.
ENDLOOP.
endform. " 200_FILE_SPLIT
&----
*& Form 150_GET_STRUCTURE
&----
GETTING STRUCTURE OF THE INTERNAL TABLE
-
form 150_GET_STRUCTURE .
REF_TABLE_DES ?=
CL_ABAP_TYPEDESCR=>DESCRIBE_BY_NAME( 'MARA' ).
IDETAILS] = REF_TABLE_DES->COMPONENTS[.
LOOP AT IDETAILS INTO XDETAILS where NAME = 'MATNR'.
CLEAR XFC.
XFC-FIELDNAME = XDETAILS-NAME.
XFC-DATATYPE = XDETAILS-TYPE_KIND.
XFC-INTTYPE = XDETAILS-TYPE_KIND.
XFC-INTLEN = XDETAILS-length.
XFC-DECIMALS = XDETAILS-DECIMALS.
APPEND XFC TO IFC.
ENDLOOP.
endform. " 150_GET_STRUCTURE
&----
*& Form 300_dynamic_table
&----
DYNAMIC TABLE STRUCTURE CREATION
-
form 300_dynamic_table .
CALL METHOD CL_ALV_TABLE_CREATE=>CREATE_DYNAMIC_TABLE
EXPORTING
IT_FIELDCATALOG = IFC
IMPORTING
EP_TABLE = DY_TABLE1.
endform. " 300_dynamic_table
&----
*& Form 300_DYNAMIC_TABLE2
&----
text
-
form 300_DYNAMIC_TABLE2 .
CALL METHOD CL_ALV_TABLE_CREATE=>CREATE_DYNAMIC_TABLE
EXPORTING
IT_FIELDCATALOG = IFC
IMPORTING
EP_TABLE = DY_TABLE2.
endform. " 300_DYNAMIC_TABLE2
&----
*& Form 300_DYNAMIC_TABLE3
&----
text
-
form 300_DYNAMIC_TABLE3 .
CALL METHOD CL_ALV_TABLE_CREATE=>CREATE_DYNAMIC_TABLE
EXPORTING
IT_FIELDCATALOG = IFC
IMPORTING
EP_TABLE = DY_TABLE3.
endform. " 300_DYNAMIC_TABLE3