Barcelona full-back Dani Alves is facing up to three weeks on the sidelines after suffering a hamstring strain.