Hi Karthick,
It is supposed to be GT_COLUMN_DESCRIPTION only but no need of assign table to GT_COLUMN_DESCRIPTION this value.
Just add the loop code alone,
Loop at P_COLUMN_DEFINITIONS into ls_column
WHERE COLUMNNAME = 'DOC_DESC' " you can give your custom attribute column name
OR COLUMNNAME = 'DOC_ID'
ls_column-sort = 'X'.
modify p_column_definitions from ls_column index sy-tabix transporting sort.
endloop.
For the table name, keep break point in that method and check the parameter p_tableviewid only.
Regardsm
Dharmakasi.