Ansicht
Dokumentation

IDFB_COMPUTE_CHECKNUM_NO_002 - Generate Payment Reference Number (Norway, Modulus 11)

IDFB_COMPUTE_CHECKNUM_NO_002 - Generate Payment Reference Number (Norway, Modulus 11)

RFUMSV00 - Advance Return for Tax on Sales/Purchases   Addresses (Business Address Services)  
This documentation is copyright by SAP AG.
SAP E-Book

Functionality

This function module generates the payment reference number in a format suitable for use in Norway, using the modulus 11 algorithm.

The payment reference number can be up to 25 digits long, including the check digit.

To calculate the payment reference number, the system uses the billing document number as the basis, to which it adds a check digit as follows:

  1. It multiplies the last digit in the billing document number by 2, then the second-last digit by 3, the third-last by 4, and so on, until it gets to the sixth-last digit, which it multiplies by 7.
Then it starts again, multiplying the seventh-last digit by 2, the eighth-last by 3, and so on, until it has multiplied all of the digits in the billing document number by 2, 3, 4, 5, 6, or 7.
  1. It adds up all the numbers.
  2. It subtracts this number from the nearest multiple of 11; this is the check digit.
If the check digit is 10, the system changes it to a dash (-). So once you apply the check digit to the number 12345667, it would be 12345667-.

Example

Assume the system wants to generate a payment reference number for the billing document number 12345678:

  1. It multiplies each digit in the document number by 2, 3, 4, 5, 6, or 7, starting from the end of the document number:
8 × 2 = 16
7 × 3 = 21
6 × 4 = 24
5 × 5 = 25
4 × 6 = 24
3 × 7 = 21
2 × 2 = 4
1 × 3 = 3
  1. It adds all of the numbers together: 16 + 21 + 24 + 25 + 24 + 21 + 4 + 3 = 138
  2. Then it subtracts this number from the next multiple of 11: 143 - 138 = 5

The check digit is therefore 5, and the payment reference number is 123456785.

Notes

This method only processes numerical values and does not specify any special characters.

Further information





Parameters

C_VALUE
I_CHECK_CORRECT

Exceptions

NUMBER_NOT_CORRECT
NUMBER_NOT_VALID
NUMBER_TOO_LONG
NUMBER_TOO_SHORT
REMAINDER_10

Function Group

IDFB

RFUMSV00 - Advance Return for Tax on Sales/Purchases   BAL Application Log Documentation  
This documentation is copyright by SAP AG.

Length: 2375 Date: 20240523 Time: 065240     sap01-206 ( 41 ms )