Hi Friends,
I'm using the below method.
SELECT SINGLE *
FROM dd03l
INTO gw_data_ele
WHERE rollname = 'FILELEN' AND
fieldname = 'FILELEN'.
IF sy-subrc IS INITIAL.
MOVE-CORRESPONDING gw_data_ele TO gw_fieldcat.
APPEND gw_fieldcat TO gt_fieldcat.
CLEAR gw_fieldcat.
ENDIF.
gw_fcat-bukrs = pbukrs.
gw_fcat-zfieldname = 'FILELEN'.
gw_fcat-znumsep = 15.
*ZCOMMENT
*ZTAB_STRU
APPEND gw_fcat TO gt_fcat.
* Create a new Table
CALL METHOD cl_alv_table_create=>create_dynamic_table
EXPORTING
it_fieldcatalog = gt_fieldcat
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>.
In the "new_table" given, the fileld lengths are different for two different clients.
For example.
In DEV client, the field length is N(10).
In QA, the field length is N(20).
Thanks in Advance.
Vallamuthu M