The RECHTCH entry point is used to intervene right after reading the exchange rate in the exchange rate table (TABCHANGE).
There are numerous calls to currency conversion programs for all the modules.
The conversion sub-programs are: CONVERT(), CONVERT2(), CONVERT3(), CONVERT_TAB(), CONVERT2_TAB(), CONVERT3_TAB() and COURSITE
Parameters common to all the sub-programs.
Variables | Definition |
Value Char DEVORG | Original currency |
Value Char DEVDES | Destination currency |
Value Char DEVSOC | Company currency |
Value Integer TYPCOURS | Exchange rate type |
Value Date DATCOURS | Exchange rate date |
Value Decimal MTORG | Original amount |
Value Decimal MTDES | Destination amount |
Variable integer STAT | Return status |
Additional setup for the CONVERT3 and CONVERT3_TAB sub-programs
Variable | Definition |
Value Integer ARODEC | Rounding |
Parameters in the COURSITE program
Variables | Definition |
Value Char DEVORG | Original currency |
Value Char SITE | Site |
Value Integer TYPCOURS | Exchange rate type |
Value Date DATCOURS | Exchange rate date |
Variable Integer STAT | Return status |
Local Char DEVDES | Destination currency This is the company currency. |
Upon reading the currency table
Variables | Definitions |
Local Char DEV1 (GLONCUR) | Currency filtering the CURDEN field of the TABCHANGE table |
Local Char DEV2 (GLONCUR) | Currency filtering the CUR field of the TABCHANGE table |
Local Decimal COURS | Currency exchange rate |