Sequence number is not increasing in document code and is created with the same document code. This happens when ProjectWise is used with Oracle database. If there is a document in ProjectWise that has attribute from document code in lowercase (e.g. ABC-mm-001) and user creates new document where the same attribute is in uppercase (e.g. ABC-MM-001) it will generate sequence number 001 and will allow to create this document code.
So using Oracle database with ProjectWise document code is case sensitive.
To avoid this situation it would be the best to have document code attributes in lowercase or in uppercase. And if there are many documents with lowercase and uppercase attributes mixed up already then you should run some scripts in Oracle to equalize lower/uppercase or use ProjectWise Export / Import tool and change attributes for the documents in Excel file.