For that you can either use LSMW or iDocs. But if the data is coming from a legacy system then i would recommend you using LSMW.
Check the following links for more details :
**************** - Migrating Customers along with relationships (CRM)
LSMW for Functional Consultants in simple step-by-step way
Hope this helps.
Regards,
Taaseen