Forum Post: Re: Is There An Issue In Progress 11.5 To Use Prompt For And Update Statement

Status
Not open for further replies.
E

Ezaz War

Guest
This is the block where we are updating the records in the database and we are getting above error on "c", "C" of br-lead-dist in frame f-lead-dist do: message "inside" view-as alert-box. vr-recid = recid(lead-dist). find lead-dist exclusive-lock where recid(lead-dist) = vr-recid. message transaction view-as alert-box. display vc-vendor-display + " " + vc-vendor-name @ vc-vendor-display format "x(20)" lead-dist.vend-addr-bk-no lead-dist.dist-no lead-dist.effective-date with frame f-change. /*prompt-for lead-dist.effective-date with frame f-change. */ message "prompt---bfr" "vr-recid" vr-recid skip "avail" available(lead-dist) skip locked(lead-dist) view-as alert-box. if can-find(b-lead-dist no-lock where b-lead-dist.dist-no = lead-dist.dist-no and b-lead-dist.vend-addr-bk-no = lead-dist.vend-addr-bk-no and b-lead-dist.effective-date = input lead-dist.effective-date and recid(b-lead-dist) <> vr-recid) then do: message color update "Record already exists for the dist/vendor/date entered" view-as alert-box information. undo, retry. end. message "Locked : " locked(lead-dist) view-as alert-box. assign lead-dist.effective-date = 01/01/2009 /*input lead-dist.effective-date*/ . message "Date : " lead-dist.effective-date view-as alert-box. vc-region = "Not Found". find dist where dist.dist-no = lead-dist.dist-no no-lock no-error. if available dist then do: find region where region.reg-no = dist.reg-no no-lock no-error. if available region then vc-region = region.reg-name. end. display vc-region with frame f-change. vd-prior-value = lead-dist.prem-gross-rate. update lead-dist.bill-threshold-wgt lead-dist.pay-threshold-wgt lead-dist.prem-gross-rate with frame f-change. message "-------------------1-------------------------------" view-as alert-box. if vd-prior-value <> lead-dist.prem-gross-rate then lead-dist.prem-lead-rate = round(lead-dist.prem-gross-rate / .53, 4). vd-prior-value = lead-dist.mkt-gross-rate. update lead-dist.prem-lead-rate lead-dist.mkt-gross-rate with frame f-change. if vd-prior-value <> lead-dist.mkt-gross-rate then lead-dist.mkt-lead-rate = round(lead-dist.mkt-gross-rate / .53, 4). vd-prior-value = lead-dist.gross-price. update lead-dist .mkt-lead-rate lead-dist.ar-due-days lead-dist.ap-due-days lead-dist.gross-price with frame f-change. if vd-prior-value <> lead-dist.gross-price then lead-dist.lead-price = round(lead-dist.gross-price / .53, 4). update lead-dist.lead-price lead-dist.receipt-opt lead-dist.participant lead-dist.prem-opp with frame f-change. hide frame f-change. run ip-open-query. end. PROCEDURE ip-open-query. frame f-lead-dist:title = if not vl-current-only then " DISTRIBUTOR LEAD FILE - All Records Fitting Qualify Criteria " else " DISTRIBUTOR LEAD FILE - Currently Active Fitting Qualify Criteria ". open query q-lead-dist for each lead-dist no-lock. enable all with frame f-lead-dist. END.

Continue reading...
 
Status
Not open for further replies.
Top