Hi Jacob,
If you itab_old with data like this:
vender period
a 01 <--- which is need call smartforms
a 01
b 01 <---
b 02 <---
b 02
c 04 <---
To creat a new internal table,
DATA: BEGIN OF itab_new,
lifnr type lifnr, "Vendor
period(2) type c, "Period
...
END OF itab_new.
Make sure the lifnr and period is first two fields. then loop and move-coresspoding itab_old to itab_new.
loop at itab_new into st_itab_new1.
st_itab_new2 = st_itab_new1.
at new period.
call smartforms with st_itab_new2 data.
endat.
endloop.
regards,
Archer