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: 

i want to display 4- as -4

Former Member
0 Kudos
67

i want to display 4- as -4 do we have any function module

or any abap statements to convert 4- to -4

4 REPLIES 4

Former Member
0 Kudos
40

Hi!

Use CLOI_PUT_SIGN_IN_FRONT.

Regards,

Maxim.

former_member188685
Active Contributor
0 Kudos
40
data int type i.
data char(10).
int = -4.

int = int * -1.

write int to char.

concatenate '-' char into char.

try this...

Former Member
0 Kudos
40

can use this

IF SIGN( V_FLDVAL ) EQ '1-'.

SPLIT V_FLDVAL AT '-' INTO ACT MINUS.

SHIFT ACT LEFT DELETING LEADING SPACE.

CONCATENATE '-' ACT INTO V_FLDVAL.

ENDIF.

Regards,

Bikash.

Please close the thread if u r done.

Former Member
0 Kudos
40

use FM CLOI_PUT_SIGN_IN_FRONT , but u have to declare the amount field as char