Skip to Content
0
Former Member
Oct 18, 2006 at 07:59 AM

mat do with seq number

28 Views

HI

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.

clear t_z4b2.

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.

modify 4b2tbl.

move-corresponding 4b2tbl to t_z4b2.

append t_z4b2.

endloop.

modify z4b2 from table t_z4b2.

endif.

endform. "GetSeqNo