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

abap

Former Member
0 Likes
496

how to get the minus sign( - ) preceding the number in the output. Is there any syntax for that?

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
468

Hi,

chk this:

data num type p decimals 2 value -673.

data: v type p decimals 2 value 10.

data: ch(10), ch1(10).

ch = num.

write ch.

skip 2.

call function 'CLOI_PUT_SIGN_IN_FRONT'

changing

value = ch.

write ch.

regards,

keerthi

4 REPLIES 4
Read only

Former Member
0 Likes
468

Hi Priyanka,

Use FM - CLOI_PUT_SIGN_IN_FRONT

OR

If in screen input/output field with -ve sign -

->Simply put an uppercase V at the end of the underscores in the text box.

>Example ________V This will allow negative numbers.

Reward points if this Helps.

Manish

Read only

Former Member
0 Likes
468

Hi Priyanka ,

Use the FM <b>CLOI_PUT_SIGN_IN_FRONT</b> , if you give the input as 36.2- you get -36.2 as input .

Regards

Arun

  • Assign points if reply is helpful

Read only

Former Member
0 Likes
468

Hi,

Use the FM CLOI_PUT_SIGN_IN_FRONT.

Regards

Bhupal Reddy

Read only

Former Member
0 Likes
469

Hi,

chk this:

data num type p decimals 2 value -673.

data: v type p decimals 2 value 10.

data: ch(10), ch1(10).

ch = num.

write ch.

skip 2.

call function 'CLOI_PUT_SIGN_IN_FRONT'

changing

value = ch.

write ch.

regards,

keerthi