The objective functions of traditional state estimation are to get the weighted least squares of the residual sum or the weighted least absolute value of the residual sum and so on, constrained by measurement function, thus could not identify topology error directly. In order to identify topology error and bad data at the same time, this paper extends the transfer power flow function as constraints, while taking account of the residual of transfer power flow as well as the measurement residual in the objective function. By improving the existing weighted least absolute value state estimation, a new state estimation model is proposed for identifying the topology error and bad data simultaneously. Its performances are highlighted via simulations performed on a real provincial power network.