Oracle Message DRG-50916 - last document string is less than first document

ERRORlast document string is less than first document
CAUSEinvalid last document number
ACTIONfix query