How about: PP * 1000000000 + XX*10.
The final zero won't make any difference to the mod10 result.
Two ways to mod10 it: use TO_CHAR to convert it to a string then loop over the string converting each character into a number, add 'em all up and repeatedly subtract 10 until the result <10.
Another way: get the last digit by subtracting 10*(result/10) from result. Add that to a variable V and divide result by 10. Repeat until result is zero. Then subtract 10*(V/10) from V and that gives you the final digit.
Then just add the checksum to whatever variable the initial PP * 1000000000 + XX*10 result is kept in.
> what needs to be done if the intial digits(PPP) required is 100 apart from 10,11,12.
I've no idea what that means. It can't be 100 because PP is two digits. If it can be 100 then it must be 12 digits distributed as PPPxxxxxxxxM.