Is in the string variable numeric value? If yes, convert it first to numeric and then add 1 to it.
If is it for example as 'XXXX002' and you want to convert it, use right function for last 3 digits, convert to numeric and add 1. For example
'XXX' + cstr(clng(right('XXXX002', 3)) + 1)
Edited by: Petr Verner on Jun 30, 2008 4:28 PM
Please don't mark your posts as urgent. It is against the forum rules and your post can be removed. Everyone's questions are considered equal. The people on this forum are always helpful and will try to give an answer within a reasonable time period so there is no need to say that you need an immediate answer. If you do have an urgent issue then you should log it with SAP support.
It really depends how the string code is built. In the case of the string "INV20001A" you can get the numeric part first. Example:
Mid$("INV20001A", 4, 5)
Then parse that string to integer add 1 and parse it back to the string and add the string part to the code.