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

Negative sign for Values

Former Member
0 Likes
6,484

Hi Experts,

I am woking on BW and know some ABAP.

While i am feching data from table i am getting value as Ex: 100-(negative), but i want to show this as -100. I am downloading data into flat file, not for display.

Data i am getting now:

Mat Customer Value Qty

M100 C100 100- 10-

But i want to show this as below.

Mat Customer Value Qty

M100 C100 -100 -10

I am not expert in ABAP, plese give some suggitions or sample coding(if possible).

Thank you a lot.

Srini

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
3,750

Hello Srini,

Please refer to the following post -

Regards,

Anand Mandalika.

Hi Experts,

I am woking on BW and know some ABAP.

While i am feching data from table i am getting value as Ex: 100-(negative), but i want to show this as -100. I am downloading data into flat file, not for display.

Data i am getting now:

Mat Customer Value Qty

M100 C100 100- 10-

But i want to show this as below.

Mat Customer Value Qty

M100 C100 -100 -10

I am not expert in ABAP, plese give some suggitions or sample coding(if possible).

Thank you a lot.

Srini

10 REPLIES 10
Read only

Former Member
0 Likes
3,751

Hello Srini,

Please refer to the following post -

Regards,

Anand Mandalika.

Read only

0 Likes
3,750

Thank you all for quick and prompt reply.

But unfortunately the function module(CLOI_PUT_SIGN_IN_FRONT) is not available in BW.

But i created in BW by coping from R/3. Problem solved.

Thank you once again.

Srini

Read only

Former Member
0 Likes
3,750

IF var LT 0.

WRITE : '-'.

ENDIF.

WRITE var NO-SIGN.

Read only

Former Member
0 Likes
3,750

hi Srini...

The solution for this is already posted in this Forum ... i.e, Use FM <b>CLOI_PUT_SIGN_IN_FRONT</b>

or use <b>EDIT MASK</b> Option

here is that thread

Regards,

Santosh

Read only

Former Member
0 Likes
3,750

Hi Srini,

Please find the same thread posted today with same reqmts:

Cheers

Sunny

rewrd points, if found helpful

Read only

Former Member
0 Likes
3,750

hi srini,

just find if the value is negative..

data : char(20).
 data : val type i.
  val = val - 50.
 if val < 0.
   write val to char.
   concatenate '-' char into char .
   condense char no-gaps.
 endif.
 write : / char.

regards

satesh

Read only

Former Member
0 Likes
3,750

HI

YOU CAN USE A FM <b>CLOI_PUT_SIGN_IN_FRONT</b> FOR CHANGINT THE SIGN POSITION.

IF THIS IS USEFUL PLEASE REWARD POINTS

REGARDS

ANOOP

Read only

Former Member
0 Likes
3,750

Hello Srini,

Use this FM CLOI_PUT_SIGN_IN_FRONT.

Read only

Former Member
0 Likes
3,750

Hi,

use following FM

CLOI_PUT_SIGN_IN_FRONT

Regards,

Shashank

Read only

Former Member
0 Likes
3,750

try this

loop at itab.

CALL FUNCTION 'CLOI_PUT_SIGN_IN_FRONT'
       CHANGING
            VALUE = itab-qty.

endloop.

but ito do this the field must of char type