Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Sapscript values Conversion

Former Member
0 Likes
572

Generally script output for amount values consist of comma and fullstop.

for total amount value is 1,500,000.00

Now suppose you want to do some manipulation on it then you have to write subroutine in script and pass this value and in that case if you have do some manipulations then first you have to remove comma and fullstop

by using conversion routine or REPLACE OR TRANSLATE keyword.

i had used that one and done the manipulation also.

Upto here fine and now when i am passing this value back to sapscript it is coming as it is.

For eg now value is coming sapscript print preview is

11500220

I want to add comma and fullstop in this value.

How to do that i am not getting .

i am not getting any conversion routine for this thing also.

if i change the char value to numeric value and passed to script then it is not displaying in the output.

Please give me the solution.

2 REPLIES 2
Read only

Former Member
0 Likes
472

In the routine, pass this character value to any Amount type variable and then move it back to CHAR field. You will be able to see the commas and fullstop.

Read only

Former Member
0 Likes
472

Hi,

you can use 'write to'.

For example:

data: a type menge_d value '1234'.

data: b(10).

then.

write a to b.

now, b is 1,234.000, u can use b in your smart forms .