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 with -ve Sign for Amount and Quantity fields

Former Member
0 Likes
1,707

Hi,

in my programming, my amount and quantity fields are showing -VE values like this .. 43.56-. but i want-43.56. I tried several ways. I didn't get any clue. i don't want to change my field technical attributes(i need these for further processing .i.e. amount and quanity. we can achieve this for Character fields). if any body help me out from this.

Thanks in Advance.

Please guide me.

Regards,

Nagesh.

Hi,

in my programming, my amount and quantity fields are showing -VE values like this .. 43.56-. but i want-43.56. I tried several ways. I didn't get any clue. i don't want to change my field technical attributes(i need these for further processing .i.e. amount and quanity. we can achieve this for Character fields). if any body help me out from this.

Thanks in Advance.

Please guide me.

Regards,

Nagesh.

12 REPLIES 12
Read only

suresh_datti
Active Contributor
0 Likes
1,509

Hi Nagesh,

I don't think you can do it without moving it to a CHAR field.. SAP does it the same way in the function module CLOI_PUT_SIGN_IN_FRONT.

Regards,

Suresh Datti

Read only

Former Member
0 Likes
1,509
data : l_amt(15) value '435.46-'. 

 CALL FUNCTION 'CLOI_PUT_SIGN_IN_FRONT'
       CHANGING
            VALUE = l_amt.

write : l_amt.

Message was edited by: Sekhar

Read only

0 Likes
1,509

no i don't want to change the Data Type.

Read only

andreas_mann3
Active Contributor
0 Likes
1,509

hi,

use:

1) abs( f )

2 f = f * -1.

Andreas

Read only

0 Likes
1,509

Hi Mann,

i tried this(ABS), concatenate option.. still.. i'm getting the above mentioed result.

Nagesh.

Message was edited by: Nagesh Ganisetti

Read only

Former Member
0 Likes
1,509

Hi,

if ur problem is summing up for that field , try changing it string instead of char and try summation

Read only

Former Member
0 Likes
1,509

u said u want that field for further processing. so in this case put ur variable into another field of type char n display it.. and use ur original field for processing...

Regards,

Bikash

Read only

0 Likes
1,509

i need Amounts and Quantity data type for next process. Even if i change it to char data type into new variable i can't use that. That value i need to download into XL file. from there another System will pickup that...

Thanks in advance.

Nagesh.

Message was edited by: Nagesh Ganisetti

Read only

0 Likes
1,509

Hi Nagesh,

Move it to the char field & do the concatenation just before writing on to the screen.

Read only

0 Likes
1,509

is it possible for u to do ur next process first and then put the negative sign in front by changing it to char or string

Read only

0 Likes
1,509

i tried thse codes...

data: amount like vbap-netwr value'34.45',

text(18) type c.

amount = abs(amount) * -1.

next one:

move amount to text.

concatenate '-' text."-34.45'

if i do move here to amount..

move text to amount "34.45-"

any suggetions? i need to download this data to XL file. from there back ground job will pick that job?

I think there is no option..

Thanks a lot guys spending time on issue.. i think SAP won't support that...

Nagesh.

Read only

Former Member
0 Likes
1,509

Try:


DATA: amt LIKE bseg-wrbtr VALUE '-123.45'.

WRITE /001 amt USING EDIT MASK 'RRV_________.__'.

Rob