If you are doing this at the dex level, I would use Window_PullFocus() to take the focus away from the window, which will force the current line to be saved.
Then I would set a range on the SOP_LINE_WORK table and do your calculations by scrolling through the table. For example:
Window_PullFocus(window SOP_Entry of form SOP_Entry);
range clear table SOP_LINE_WORK;
clear table SOP_LINE_WORK;
'SOP Type' of table SOP_LINE_WORK = 'SOP Type' of window SOP_Entry of form SOP_Entry;
'SOP Number' of table SOP_LINE_WORK = 'SOP Number' of window SOP_Entry of form SOP_Entry;
range start table SOP_LINE_WORK by number 1;
fill table SOP_LINE_WORK;
'SOP Type' of table SOP_LINE_WORK = 'SOP Type' of window SOP_Entry of form SOP_Entry;
'SOP Number' of table SOP_LINE_WORK = 'SOP Number' of window SOP_Entry of form SOP_Entry;
range end table SOP_LINE_WORK by number 1;
get first table SOP_LINE_WORK by number 1;
while err() <> EOF do
{ Do Calculations Here }
get next table SOP_LINE_WORK by number 1;
end while;
range clear table SOP_LINE_WORK;
David Musgrave [MSFT]
Senior Development Consultant
Escalation Engineer
MBS Support - Asia Pacific
Microsoft Business Solutions
Any views contained within are my personal views and
not necessarily Microsoft Business Solutions policy.
This posting is provided "AS IS" with no warranties,
and confers no rights.