‎2009 Jun 15 10:52 AM
Hi,
I have developed a program to update standard table. I am using dynamic internal table creation concept. But my dynamic internal table is having width only 1200 bytes. But many standard tables have more than that width. Do you have any input create dynamic internal table with more than 1200 bytes width..
Have a look at the error.
[http://3.bp.blogspot.com/_O5f8iAlgdNQ/SjYXTBpO92I/AAAAAAAAErI/Fs996_APHbE/s1600-h/error-792463.JPG|http://3.bp.blogspot.com/_O5f8iAlgdNQ/SjYXTBpO92I/AAAAAAAAErI/Fs996_APHbE/s1600-h/error-792463.JPG]
Expecting reply
Thanks
Venkat
‎2009 Jun 15 11:20 AM
Create dynamic internal table as follows.
Data: gv_tabname TYPE w_tabname.
Data: gv_dref TYPE REF TO data.
gv_tabname = 'required table name may be u can take this value from selection screen or any other method'.
FIELD-SYMBOLS: <gf_itab> TYPE STANDARD TABLE,
<wa> type any
CREATE DATA gv_dref TYPE TABLE OF (gv_tabname).
ASSIGN gv_dref->* TO <gf_itab>.
select * from (gv_tabname) into table <gf_itab>
where condition.
looo at <gf_itab> assigning to <wa>.
endloop.
may be this will help you.
‎2009 Jun 15 11:20 AM
Create dynamic internal table as follows.
Data: gv_tabname TYPE w_tabname.
Data: gv_dref TYPE REF TO data.
gv_tabname = 'required table name may be u can take this value from selection screen or any other method'.
FIELD-SYMBOLS: <gf_itab> TYPE STANDARD TABLE,
<wa> type any
CREATE DATA gv_dref TYPE TABLE OF (gv_tabname).
ASSIGN gv_dref->* TO <gf_itab>.
select * from (gv_tabname) into table <gf_itab>
where condition.
looo at <gf_itab> assigning to <wa>.
endloop.
may be this will help you.
‎2009 Jun 15 11:21 AM
Hi,
DATA: IT_TABSTRUC TYPE STANDARD TABLE OF DFIES INITIAL SIZE 0,
V_REF TYPE REF TO DATA,
V_I_AVL_CAT TYPE TABLE OF LVC_S_FCAT.
FIELD-SYMBOLS : <F_FS_DATA> TYPE STANDARD TABLE.
SELECTION-SCREEN:BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001
NO INTERVALS.
PARAMETERS: P_TABNAM TYPE X_TABNAME.
SELECTION-SCREEN:END OF BLOCK B1.
CALL FUNCTION 'DDIF_FIELDINFO_GET'
EXPORTING
TABNAME = p_tabnam
LANGU = SY-LANGU
TABLES
DFIES_TAB = IT_TABSTRUC
EXCEPTIONS
NOT_FOUND = 1
INTERNAL_ERROR = 2
OTHERS = 3.
LOOP AT IT_TABSTRUC .
V_LS_AVL_CAT-FIELDNAME = IT_TABSTRUC -FIELDNAME.
V_LS_AVL_CAT-REF_TABLE = P_TABNAM.
V_LS_AVL_CAT-REF_FIELD = IT_TABSTRUC -FIELDNAME.
APPEND V_LS_AVL_CAT TO V_I_AVL_CAT.
ENDLOOP.
CALL METHOD CL_ALV_TABLE_CREATE=>CREATE_DYNAMIC_TABLE
EXPORTING
IT_FIELDCATALOG = V_I_AVL_CAT
IMPORTING
EP_TABLE = V_REF.
ASSIGN V_REF->* TO <F_FS_DATA>.
FREE V_REF.
SELECT * FROM (P_TABNAM) INTO CORRESPONDING
FIELDS OF TABLE <F_FS_DATA> .
Hope this resolves ur probs....
‎2009 Jun 16 8:38 AM