2008 May 02 9:11 AM
Hi,
i have five digit reference is and weighting numbers(1,2,5,3,6,4,8,7,10,9) is there.
Reference number :
3 2 5 4 6
Weighting 6 3 5 2 1
products (multiple the 18+ 6+ 25+ 8 + 6 = 63
63 divided by 11 yeilds a remainder 8, (11-8=3).there fore check digit is 3.
if the remainder is 0, this is the check digit.If the reamainder is 1, the check digit is 10 and is represendted by X.If the remainder falls between 2 and 10 it is substracted from 11, the difference is the check digit.
so i will display the check digit in the layout check number.
see below example
4478888 765555555 88893
what is logic?
above numbers)
Hi,
i have five digit reference is and weighting numbers(1,2,5,3,6,4,8,7,10,9) is there.
Reference number :
3 2 5 4 6
Weighting 6 3 5 2 1
products (multiple the 18+ 6+ 25+ 8 + 6 = 63
63 divided by 11 yeilds a remainder 8, (11-8=3).there fore check digit is 3.
if the remainder is 0, this is the check digit.If the reamainder is 1, the check digit is 10 and is represendted by X.If the remainder falls between 2 and 10 it is substracted from 11, the difference is the check digit.
so i will display the check digit in the layout check number.
see below example
4478888 765555555 88893
what is logic?
above numbers)
2008 May 02 9:22 AM
Hi Srihitha,
Check below logic,
l_len = strlen(ref num).
eg: ref num = 3 2 5 4 6
now l_len will be 5.
weight = 6 3 5 2 1
CLEAR l_sum.
DO l_len times.
l_tabix = sy-tabix.
l_sum = l_sum + (refnuml_tabix(1) * weightl_tabix(1)).
ENDDO.
Now l_sum has 63.
l_checkdigit = l_sum MOD 11.
If l_checkdigit EQ 0.
do some thing.
ELSEIF Check ur conditions here and populate data accordingly.
Hope this will be helpfull.
Thanks,
Vinod.
2008 May 02 9:29 AM
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |