on 06-30-2008 3:22 PM
Dear Sap Guru's
i have a problem that i don't able to increment the string value by 1...
plijjj sent me code for this problem immidiatly..
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
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.
Kind Regards,
Owen
Here.
Dim s As String = "00000076"
Dim i As Integer
i = Integer.Parse(s) + 1
s = i.ToString("00000000")
Console.Write(i)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
108 | |
12 | |
11 | |
6 | |
5 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.