Hi Happy,
It this your complete code??
You are getting the error when checking the syntax for the program(CTRL + F2).
Please check the below link. It might be helpful
http://wiki.sdn.sap.com/wiki/display/Snippets/BDC+Program+to+Upload+Material+Master+Data+%28MM01%29