In reply to YMNKY:
It would have helped to show the error message. I believe you need to write the constraint as
`uvm_do_with(sub_seq1, {sub_seq1.data.size == local::data.size;
foreach(sub_seq1.data[i]) sub_seq1.data[i] == local::data[i];})