The present invention relates to the purposes that AVE0010 is used to manufacture the drug for treating diabetes B. Specifically, the present invention relates to the purposes that lixisenatide (Lixisenatide) or/and its pharmaceutically acceptable salt are used to manufacture drug, and the drug is for treating diabetes B, the weight loss for inducing type 2 diabetic patient or/and the weight gain for preventing type 2 diabetic patient.