Dear ABAP experts
how to calculate below requirement...
ENGLISH NAME
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Eg. If Employee Name is RALPH MARSHALL KING
Then R M K will be decoded and calculated as follows.
(812) +(311) +(1*10) = 139
ARABIC NAME
For Arabic name , we have different method for arriving at the decoded values. In this case also we will be dealing with the 1st , 16th and 31st characters of the name. The decoded values for each of the three characters are derived as follows.
Step 1 . Get the ASCII (three digit number ) value for the individual character.
Step 2 . Get the MOD(ASCII , 10) i.e. the remainder of of the ASCII value after dividing by 10 .
Step 3 . Use the value of step 2 for calculating PART-C.
Eg. If Employee Name is يم عبدالله عبدالرØÙ…Ù† الخضير
Then the name will be decoded and calculated as follows.
Step 1 - The Ascii value for each of the three characters are obtained as follows.
Ascii u2013(1st) = 238
Ascii - (16th ) = 243
Ascii - (31st) = 032
Step 2 - The MOD(Ascii value,10) for each of the three characters are obtained as follows.
MOD(238,10 ) = 8
MOD(243,10 ) = 3
MOD (032,10 ) = 2
Step 3 - The PART-C is calculated as follows.
(812) +(311) +(2*10) = 149
Thanks in advance