cancel
Showing results for 
Search instead for 
Did you mean: 

currency field problem

Former Member
0 Kudos

hi there

am working on smartforms cheque printing am displaying xblnr beside to tht sgtxt next regup-dmbtr in the footer am displaying the sum of dmbtr

after tht am taking tht dmbtr and using spell amount am converting it to words and displaying it beside tht i had to display the amount in cheque like ***12,12,000.99

so am using this piece of code

data : num type i.

data : v_char1(15) VALUE 'XXXXXXXXXXXXX'.

v_char = g_dmbtr.

num = strlen( v_char ).

num = 15 - num.

CONCATENATE : v_char1+0(num) v_char into v_char.

its working but the problem is in my total its displaying as

12,12,000.99 but in the cheque its displaying as

1212000.99

the seperators are missing because of the conversion

how to handle it plase let me know in detail

cheers

uday

Accepted Solutions (1)

Accepted Solutions (1)

raymond_giuseppi
Active Contributor
0 Kudos

Don't use

v_char = g_dmbtr.

instead use a

WRITE g_dmbtr CURRENCY g_waers to v_char.

Regards

Answers (2)

Answers (2)

Former Member
0 Kudos

hi raymond and rudra

first i tried raymonds answear and i got it ,

thanks a lot to both of u for u r timely responce

cheers

uday

former_member195383
Active Contributor
0 Kudos

declare a variable of type currency

data : wf_cu like konc-kwert.

wf_cu = v_char.

then use wf_cu for showing the amount....

U will get the separators....

Reward points if useful...