Skip to Main Content

Oracle Forms

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Loop through multiple records

2975834Sep 9 2015 — edited Sep 15 2015

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

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 13 2015
Added on Sep 9 2015
8 comments
1,668 views