I used the method CL_ALV_TABLE_CREATE=>CREATE_DYNAMIC_TABLE.
to create an internal table by passing the field catalog.
I got the output with the structure where the field length of the fields is 10 for all the fields.
ie. For Matnr length = 10 instead of 18.
Could you please let me know how can get the correct length