Hi Siva,
when you add 10 for zsub restriction, both AB1 and CD1 will be restricted (even though you only see as AB1 as added). If there are other entries having zsub as 10 with a different zmain code, then you can follow the procedure which I have described in one of my documents : Restricting a Characteristic With Its Compounding Characteristic.
Hope it gives an idea.
Regards
Yasemin...