Beniabdullah
15th February 2006, 11:53
Hi,

Anyone know how to convert a Nominal in words on the report script only.
eg. --- Amount USD 100
--- in words USD #one hundreed only#

ARijke
15th February 2006, 12:22
Use the functions available in tcmcs.dll0006.

Regards

en@frrom
15th February 2006, 13:03
Just in case you don't have the source and don't know how to use the function, hereby the function name with input/output parameters..


function extern tcmcs.dll0006.decode( domain tfgld.amnt amount,
domain tcbool decimals,
ref domain tcmcs.s130m decode0,
ref domain tcmcs.st65m decode1,
ref domain tcmcs.st65m decode2,
ref domain tcmcs.st20m decode3)
{
DLLUSAGE
Expl.:
Pre: -
Post: -
Input: amount to be decoded, maximum 11+2
decimals required (boolean)
Output:
- decode0 Decoded amount of 130 chrs.
- decode1 Same decoded amount in two strings of 65 chars
- decode2 "
- decode3 Decode of the decimals
ENDDLLUSAGE


Good luck,
En

Beniabdullah
20th February 2006, 04:41
Hi Gurus...

Thank's 4 u'r reply but can u explain to me what the following statement purpose:

Expl.:, pre:, post:.

Could u like to give me an example on a real case... (eg. for field tdpur401.oamt)..

Thank's in advance

en@frrom
20th February 2006, 10:44
The
Expl
Pre
Post
input
output

etc. are the dll (functional and technical) description, where for instance pre = the pre-required values, input = the required input values, and output = the values returned by the funtion.

The way to use the function, for instance on tdpur401.oamt is as follows:

domain tcmcs.s130m decode0
domain tcmcs.st65m decode1
domain tcmcs.st65m decode2
domain tcmcs.st20m decode3

tcmcs.dll0006.decode(tdpur401.oamt,
1,
decode0,
decode1,
decode2,
decode3)

explanation:
1st var: amount to be converted
2nd var: boolean set to true if decimals are reqired and to false if decimals are not required
3rd var: the converted string
4rd var: first 65 positions of 3rd var
5th var: second 65 positions of 3rd var
6th var: the decimal positions