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

problem wiyh number

Former Member
0 Likes
1,566

i have number in se38 and i want to take him to sapscript.

the number is decimal 2.

1.when i declare decimal 2 is not appear and when i declare

char is apper.

2.i want him to be postive all the time withou minus

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,529

SE38 declar a number for example as

<b>data w_dec type p decimal 2.</b>

and in Script use the offset address as

<b>&w_dec(10.1)&</b>

Cheers,

Thomas.

Please reward points if helpful.

i have number in se38 and i want to take him to sapscript.

the number is decimal 2.

1.when i declare decimal 2 is not appear and when i declare

char is apper.

2.i want him to be postive all the time withou minus

12 REPLIES 12
Read only

Former Member
0 Likes
1,530

SE38 declar a number for example as

<b>data w_dec type p decimal 2.</b>

and in Script use the offset address as

<b>&w_dec(10.1)&</b>

Cheers,

Thomas.

Please reward points if helpful.

Read only

0 Likes
1,529

thomas its not work

Read only

0 Likes
1,529
      data: deci type p decimals 2,
            char(10).

      deci = '1.00'.
      deci = deci * -1.
    write deci to char.
    replace '-' in char with '' .
    condense char.
    write char.

use this char in script. that will work..., with out sign(+ve always).

Regards

vijay

Read only

0 Likes
1,529

<b>&var(10.2).

it's work only for data types DEC, QUAN and FLTP</b>

declare it as quan data type in programm than it will work...

A program symbol of one of the data types DEC, QUAN and FLTP can

contain decimal place data. This option overrides the Dictionary

definition for the number of decimal places to format this symbol

(c.2)

not work just remove c than it may be work same problem face by me..:-)

Read only

0 Likes
1,529

i explain again

i send from se38 value zxxx(15).

in sapscript i wrote &zxxx(c13.2)

or (c.2)

and it not work

Read only

0 Likes
1,529

how i declare quan?

i declare type p deci,al and it's not work

Read only

0 Likes
1,529

data:var like ekpo-menge.

(c.2)

not work just remove c than it may be work same problem face by me..:-)

write

&var(.2)&

Read only

Former Member
0 Likes
1,529

hi

to omit leading sign

use <b>&value(S)&</b>

chk this out

Number of decimals

A program symbol of one of the data types DEC, QUAN and FLTP can contain decimal place data. This option is used to override the Dictionary definition for the number of decimal places for the formatting of this symbol value.

Syntax:

<b>&symbol(.n)&</b>

<b>Example:

The EKPO-MENGE field contains the value 1234.56. The Dictionary definition specifies 3 decimal places and an output length of 17.

&EKPO-MENGE& 1,234.560

&EKPO-MENGE(.1)& 1,234.6

&EKPO-MENGE(.4)& 1,234.5600

&EKPO-MENGE(.0)& 1,235</b>

Message was edited by: Ganesh Mynampati

Read only

Former Member
0 Likes
1,529

hi

hav u checked my post !

u hav to use

<b>&value(.n)&</b>

The EKPO-MENGE field contains the value 1234.56. The Dictionary definition specifies 3 decimal places and an output length of 17.

&EKPO-MENGE& 1,234.560

&EKPO-MENGE(.1)& 1,234.6

&EKPO-MENGE(.4)& 1,234.5600

&EKPO-MENGE(.0)& 1,235

& to omit leading zeros

<b>&value(S)&</b>

Read only

0 Likes
1,529

yes i treid it....

Read only

0 Likes
1,529

i declare

ZP_SUM TYPE p DECIMALS 2.

and in layout

&ZP_SUM(.2)&

and it's not work

Read only

0 Likes
1,529

hi again

i've tried here & itz working fine ..

may b some problem with ur paragraph format !! juz try with default paragraph once ...if it works u need to change the paragraph format