I have a employee, product and product odometer tables which looks like below

Each employee has a unique emp_code depending on the product he has access to.
Each product will have a unique prefix to its identifier.
I need to generate a unique alphanumeric identifiers per product and assign it to the employee.
This product identifier is going to be 9 characters long including the prefix.
Odometer table will store the last emp_code assigned to employees in that particular product.
How do I write a stored procedure to generate these alphanumeric emp_codes based on product for each new employee being added in the system?
Please help.
EDIT 1:
Just a small correction in the odometer table, we may not need to store the odometer as A00000001. Instead we could only store 00000001 and then append the prefix.
EDIT 2:
This is what I have do so far.
create or replace PROCEDURE SP_GEN_NEXT_DUMMY_DB_PRISM_ID
(
in_product_id number,
db_prism_id out varchar2
)
AS
BEGIN
UPDATE BI_DB_PRISM_ID_ODOMETER
SET DB_PRISM_ID = DB_PRISM_ID + 1
WHERE
PRODUCT_ID = in_product_id;
SELECT to_char(db_prism_id, 'FM00000000') into db_prism_id FROM BI_DB_PRISM_ID_ODOMETER WHERE PRODUCT_ID = in_product_id;
END;
But how can I make sure that it runs in a transaction and also how do I append the product prefix to the number generated.