Dear All
I have master form having item Mstr.inv_qty
detail tabular form having item dtls.part_no,dtls.ch_no dtls.ch_qty,dtls.desp_qty.
when I enter mstr.inv_qty it populates dtls.part_no,dtls.ch_no dtls.ch_qty,
I want loop through dtls.ch_qty records & put vallues in dtls.desp_qty like following
mstr.inv_qty=1000
part_no Ch_no ch_qty desp_qty
A 1 50 50 here ch_qty<mstr.Inv_qty so desp_qty=50
A 2 700 700 here (mstr.Inv_qty-ch_qty)<mstr.Inv_qty so desp_qty=700
A 3 600 250 here (mstr.Inv_qty-(ch_qty50+ch_qty700))>mstr.Inv_qty so desp_qty=250 i.e total desp_qty=mstr.invqty(1000)
B 4 100 100 here part no change & ch_qty<mstr.Inv_qty so desp_qty=100
B 5 350 350 here (mstr.Inv_qty-ch_qty)<mstr.Inv_qty so desp_qty=350
B 6 700 650 here (mstr.Inv_qty-(ch_qty50+ch_qty700))>mstr.Inv_qty so desp_qty=650 i.e total desp_qty=mstr.invqty(1000)
So how to achive using loop
Sample code will be highly appreciated.
Regards,
Suhas