Information générale
Catégorie:
Codage, syntaxe et commandes
Titre:
Do level exceeded error
Can someone offer any suggestions on how to clean up this code? My problem is that the customer number can have more than the allowed do nesting level occurrances of a specific sales order number. Below is the code for my DO WHILE. Note that the code is in a function called l_upddtl, and this code is calling that function, so there is a recursive call to that function within itself. HELP!!!
*-- Scan through all item in sales order
DO WHILE a_tmpf1->sono + a_tmpf1->custno = lc_cmpsono + lc_cmpcust AND ;
NOT Cl_CmpDone
*-- Update record number in array
la_shipcmp[Cn_CurRec] = RECNO()
*-- Update gets and set validation flags
= w_browse()
*-- Validate item
IF l_upddtl(.t.)
*-- Record is valid and has been saved
SKIP
*-- Store new position to ship complete array
la_shipcmp[Cn_CurRec] = RECNO()
IF EOF("a_tmpf1")
*-- End of file, complete shipment is done
la_shipcmp[Cn_Done] = .t.
ll_return = .t.
*-- Skip back one to position on last item of Sales Order
SKIP -1
ELSE
*-- Check if complete shipment is done
IF la_shipcmp[Cn_SavSono] <> a_tmpf1->sono
*-- We are are on a different sales order, complete is done
la_shipcmp[Cn_Done] = .t.
ll_return = .t.
*-- Skip back one to position on last item of Sales Order
SKIP -1
ENDIF
ENDIF
ELSE
ll_return = .f.
*-- Exit, so we can correct invalid get
EXIT
ENDIF
ENDDO
Thanks!
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement