Application Development 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: 

Formatting the field

Former Member
0 Kudos

Hi folks,

Iam facing some problem with the formatting of a field used in the Print program of a SAP script.

I have a floating point number 1.6785E2. I want to convert it to the form 167.85 including the commas. i.e. for example the value is 1.234567E5, then i want the output as '12,345.67'. Any FM or means to acheive this ?

Thanks and Regards,

Vijay

3 REPLIES 3

Former Member
0 Kudos

Hi vijay,

1. in the sapscript layout,

use

&MYNUMBER(E3)&

2. from help.

Syntax

&symbol(EN)&

If you specify an exponent of 0, then the number is displayed without using the exponent representation. This has the same effect as completely omitting the specification of an exponent: &symbol(E0)& has the same effect as &symbol(E)&

In this example, the PLMK-SOLLWERT field is assumed to have the value 123456.78 and to be of data type FLTP.

&PLMK-SOLLWERT& -> 1.23456780000000E05

&PLMK-SOLLWERT(E3)& -> 123.456780000000E03

&PLMK-SOLLWERT(E6)& -> 0.12345678000000E06

&PLMK-SOLLWERT(E0)& -> +123456.780000000

&PLMK-SOLLWERT(E)& -> +123456.780000000

regards,

amit m.

Former Member
0 Kudos

Hi Vijay,

Just check on to this thread just before 2 days this was closed.This should solve ur problem.

Regards,

Nagarajan.

0 Kudos

Hi Amit and Nagarajan,

Thanks for the prompt replies. I shall try them out and get back to you.

Warm Regards,

Vijay