you can loop on your ztable having these fields and use assign component to refer to fields of table A and table B and assign the values.
for ex:
Loop at itab into wa.
Assign component (wa-col1) OF structure WA_TABLEA assigning <FS_A>.
Assign component (wa-col2) OF structure WA_TABLEB assigning <FS_B>.
<FS_B> = <FS_A>.
A rough outline of what you can do, can you build your logic around this? I'm not able to see the need for dynamic internal table, may be u can elaborate?