cancel
Showing results for 
Search instead for 
Did you mean: 

displaying amount field in smartform output

Former Member
0 Kudos

hi experts,

i am printing amount field in smartform output. like this 11,200.

but i need to display like this $11,200.

i need to print $ with amount field .

can u give me some idea?

Thanks

Accepted Solutions (0)

Answers (7)

Answers (7)

Former Member
0 Kudos

thanks

Former Member
0 Kudos

thanks

Former Member
0 Kudos

Hi Neeraj,

Take the amount field as chracter in ur structure so that u will not get any zeros. concatnate $ to the amount field in ur driver program and pass to the smart form.

Thanks

Rasheed

Former Member
0 Kudos

HI karthik,

thank u for ur valuable reply.i done as u said.but it was printing like this $ 11,200.but i want to print

as &11,200. i think by default amount fields right justified .so it is coming like that.i changed my styles to right justified agin it is coming like that only.

thanks

Former Member
0 Kudos

try like this;

&gv_amt_symbol(C)& &wa_itab-amount(CZ)&

This will remove any leading spaces and solve your problem.

Regards

Karthik D

Former Member
0 Kudos

&'&dollarsign&'tabname-fieldname& should do the trick

Former Member
0 Kudos

Use a separate Global variable for amount symbol (say gv_amt_symbol(2) type C), and populate it in the initialization section of Global parameters in the smartform based on your currency.

Use it before every amount field. This is more efficient that concatenating with each amount field value.

Hope this will be helpful.

Regards

Karthik D

Former Member
0 Kudos

Hi,

Try like this.

Data : v_amount type i value 11200,

v_final type string

If u r getting currency, then check the currency.

If Curr eq 'USD'

concatenate '$' v_amount into v_final separated by space.

endif.

Print V_FINAL where do u want.

Former Member
0 Kudos

Hi,

Try like this.

Data : v_amount type i value 11200,

v_final type string

If u r getting currency, then check the currency.

If Curr eq 'USD'

concatenate '$' v_amount into v_final separated by space.

endif.