cancel
Showing results for 
Search instead for 
Did you mean: 

Help needed to display character vaiable in currency format

Former Member
0 Kudos

Hi Friends

In a SAP Script I am passing a currency field to the subroutine as an i/p parameter and since it gets converted to character format in subroutine because of 'itcsy' , ihave deleted the trailing zeroes and decimal points from the field and performed calculations on the field, now i need to pass this char field back to SAP script but i need to display that field in currency format with commas and decimal points in the script...how do i do that???

Thanks

Vishal.

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Thanks

Former Member
0 Kudos

Hi Vishal,

When you pass the currency amount into the perform, no need to remove the trailing zeros and the decimal point.

Only thing you need to remove is the comma seperator as it gives a runtime error during calculation.

To convert it back to the format with comma, write the below command:

WRITE v_Item_total currency '2' to v_item_char.

CONDENSE v_item_char.

Here v_item_total is a number which is converted to comma seperated number and passed to char variable.

This char variable is then passed to the SCRIPT.

regards,

Gaurav.

Former Member
0 Kudos

Hi,

ihave deleted the trailing zeroes and decimal points from the field and performed calculations on the field

I dont think you need to delete trailing zeroes and decimals from the fields.

just check without that.

regards

padma

Former Member
0 Kudos

use write statment to move the character value back to currency field and pass currecny field to SCRIPT

write wf_char to wf_curr.