Help: Find First/Last failed

apple

New Member
what could possibly be the reason for this?
How can this be solved?

here's my code:
Code:
find first planmst_f where planmst_f.prodcode=subsmst_f.prodcode and
                                   planmst_f.plancode=subsmst_f.plancode and
                                   planmst_f.arfscode=tbmtdtrn.fscode.
             if not available planmst_f then
             do:
                display tbmtdtrn.fscode
                        subsmst_f.prodcode
                        subsmst_f.plancode
                        with frame frm1.
                        down with frame frm1.
                        
                message 'Problem Found! Fix?' view-as alert-box question buttons yes-no update choice as logical.
                case choice:
                  when true then
                    assign tbmtdtrn.fscode=planmst_f.arfscode.
                  when false then
                    message 'Not Fixed!'.
                end.
             end.
 
The FIND statement always throws an error when it can't find a record either because it doesn't exist or maybe it's not unique. To catch the error you can either use the NO-ERROR option in the statement in conjunction with the AVAILABLE function on the buffer or use the structured error handling - but as you don't talk about the version of Progress/OpenEdge it might very well be the case that you are running a version before the structured error handling was introduced into the product. If that's the case you can only use option 1.


HTH, RealHeavyDude.
 
Back
Top