Ansicht
Dokumentation
/NAM/RJH_CONVERT_CONO_BASE - Convert Contract Number to Number Range Object Number and Vice Versa
CPI1466 during Backup General Data in Customer MasterThis documentation is copyright by SAP AG.
Purpose
This report is a conversion report. It converts a value that is in alphanumeric format to a number that is in decimal format. This report also converts a decimal number into an alphanumeric value.
There is a default offset with value 'A00000'.
If the conversion is from decimal to alphanumeric, then this default has to be added.
If the conversion is from alphanumeric to decimal, then this default offset has to be subtracted.
Integration
Prerequisites
Features
Selection
Standard Variants
Output
Activities
Example
For numbers:
CHARACTER,,0,,1,,2,,3,,4,,5,,6,,7,,8,,9,,
WEIGHT,,0,,1,,2,,3,,4,,5,,6,,7,,8,,9,,
For Upper Case Alphabets:
CHARACTER,,A,,B,,C,,D,,E,,F,,G,,H,,I,,J,,K,,L,,M,,N,,O,,P,,Q,,R,,S,,T,,
WEIGHT,,10,,11,,12,,13,,14,,15,,16,,17,,18,,19,,20,,21,,22,,23,,24,,25,, 26,,27,,28,,29,,
CHARACTER,,U,,V,,W,,X,,Y,,Z,,
WEIGHT,,30,,31,,32,,33,,34,,35,,
For Lower Case Alphabets:
CHARACTER,,a,,b,,c,,d,,e,,f,,g,,h,,i,,j,,k,,l,,m,,n,,o,,p,,q,,r,,s,,t,,
WEIGHT,,36,,37,,38,,39,,40,,41,,42,,43,,44,,45,,46,,47,,48,,49,,50,,51,, 52,,53,,54,,55,,
CHARACTER,,u,,v,,w,,x,,y,,z,,
WEIGHT,,56,,57,,58,,59,,60,,61,,
Suppose the Base10 number to be converted to the corresponding Base62 is 1234567890
Convert A00000 to decimal system:
= A * 62^5 + 0 * 62^4 + 0 * 62^3 + 0 * 62^2 + 0 * 62^1+ 0 * 62^0
= A * 916132832
= 10 * 916132832
= 9161328320
Add the converted number to LV_NUMBER:
LV_NUMBER = 9161328320 + 1234567890
,, = 10395896210
STEP-1:
LV_NUMBER = 10395896210
10395896210 MOD 62 = 20 -> The character assigned to weight 20 from lookup table is: K
10395896210 REM 62 = 167675745 (Input for the next step)
STEP-2:
LV_NUMBER = 167675745
167675745 MOD 62 = 31,,-> The character assigned to weight 31 from lookup table is: V
167675745 REM 62 = 2704447 (Input for the next step)
STEP-3:
LV_NUMBER = 2704447
2704447 MOD 62 = 7-> The character assigned to weight 7 from lookup table is: 7
2704447 REM 62 = 43620 (Input for the next step)
STEP-4:
LV_NUMBER = 43620
43620 MOD 62 = 34-> The character assigned to weight 34 from lookup table is: Y
43620 REM 62 = 703 (Input for the next step)
STEP-5:
LV_NUMBER = 703
703 MOD 62 = 21-> The character assigned to weight 21 from lookup table is: L
703 REM 62 = 11 (Input for the next step)
From STEP 5 the remainder is 11, which is less than 62.
So the character to the weight 11 from the lookup table is: B
From the above calculations, the number generated is: BLY7VK
General Material Data ROGBILLS - Synchronize billing plans
This documentation is copyright by SAP AG.
Length: 3564 Date: 20240419 Time: 214241 sap01-206 ( 50 ms )