my logic is like this with material document number i need to increse the sequence number. my doc will be having same mat number as well different mat numbers.
i did the coding like this below
data: wcount(6) type n.
data: wrecord(6) type n VALUE '000000'.
describe table t_z4b2 lines wrecord.
read table t_z4b2 index wrecord.
write t_z4b2-wseqno+5(6) to wrecord.
wrecord = wrecord + 1.
describe table 4b2tbl lines wcount.
if wcount > 0.
loop at 4b2tbl.
at new wmblnr. wrecord = wrecord + 1. endat.
concatenate preatsg wrecord into 4b2tbl-wseqno.
move-corresponding 4b2tbl to t_z4b2.
modify z4b2 from table t_z4b2.