Hello Sumit,
how does the structure of your internal table lt_materialid and the structure of the db table (identified by c_tab_name) look like? Do the columns for which you wanna insert data match?
Did you you check the error messages in the possible raised exception (using method GET_TEXT, GET_LONG_TEXT)? The exception should be normally of type CX_SQL_EXCEPTION.
Regards,
Florian