IBAN Data Type
Below is a demo that you can try in your browser: An IBAN input field takes any arbitrary text from the user and validates it. Unless the input is a valid German IBAN, an error will be shown. You can play with it by hitting the Result tab in the JSFiddle below and entering valid and invalid IBANs. At blogs.sap.com there is an extended introduction to Custom Data Types in SAPUI5.
Computing an IBAN Checksum
An IBAN consist of three parts: country code (two characters), checksum (two digits), and the remaining digits. In order to compute the checksum, conduct the following steps:
- Convert both country characters into digits. An “A” corresponds to 10, “B” to 11 and so forth. This gives two numbers $c_1$ and $c_2$. The IBAN body, i.e. the long number starting at the fifth place, is called $b$.
- Create a temporary number $t$ by computing
- Retrieve the checksum $s$ with