Ansicht
Dokumentation
/NAM/CONVERT_BASE10_TO_BASE62 - Get Number with Base62
BAL_S_LOG - Application Log: Log header data Addresses (Business Address Services)This documentation is copyright by SAP AG.
Functionality
This function module takes a decimal number as input.
This decimal number is converted into an alphanumeric value.
The output is the alphanumeric value.
Example
Lookup table
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 next number received from the Function Module: LV_NUMBER = 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.
Therefore, the character to the weight 11 from the lookup table is: B
From the above calculations, the number generated is: BLY7VK
Thus, the final value will be BLY7VK, which will be passed to the BADI changing parameter.
Notes
Further information
Parameters
PV_INPUTPV_OUTPUT
Exceptions
ALLOWED_RANGE_EXCEEDEDFunction Group
/SAPLBASE_CONVERSIONAddresses (Business Address Services) Fill RESBD Structure from EBP Component Structure
This documentation is copyright by SAP AG.
Length: 3331 Date: 20240427 Time: 025332 sap01-206 ( 45 ms )