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

amout fields

Former Member
0 Likes
646

hi to all

for amount fields

if the value is coming from tables is 132.00-

i need - sign in from of the value

like -132.00

please help me

how to do it

6 REPLIES 6
Read only

Former Member
0 Likes
628

multiply the value by -1

move the value to character field of same length...

now use concatenate command to append '-' sign in front of the char field..

Read only

0 Likes
628

hi

is there is any standard key word for this

please tell me i need to do it for lot of times

Read only

0 Likes
628

Hi,

Use the function module CLOI_PUT_SIGN_IN_FRONT to bring the sign to front.

if itab-shkzg = 'H'.

v_amount = itab-shkzg.

else.

CALL FUNCTION 'CLOI_PUT_SIGN_IN_FRONT'

CHANGING

VALUE = itab-shkzg.

v_amount = itab-shkzg

endif.

Also check this thread.

Regards,

Shiva Kumar

Read only

asik_shameem
Active Contributor
0 Likes
628

Hi

IF amount LT 0.
  WRITE:/ '-', amount NO-SIGN.
ELSE.
  WRITE:/ amount.
ENDIF.

Read only

Former Member
0 Likes
628

hi Radha,

do this way ...


data: string type string value '1100.00-'.
data: d type i.
 
d = strlen( string ).
d = d - 1.
 
SHIFT string BY d PLACES CIRCULAR.
 
write:/ string.
 

or


DATA: TEXT1(1) TYPE C,
VALUE(5) type c.
 
value = '90-'.
 
SEARCH VALUE FOR '-'.
IF SY-SUBRC = 0 AND SY-FDPOS 0.
SPLIT VALUE AT '-' INTO VALUE TEXT1.
CONDENSE VALUE.
CONCATENATE '-' VALUE INTO VALUE.
ELSE.
CONDENSE VALUE.
ENDIF. 

Regards,

Santosh

Read only

Former Member
0 Likes
628

Hi,

Use the function module CLOI_PUT_SIGN_IN_FRONT to bring the sign to front.

if itab-shkzg = 'H'.

v_amount = itab-shkzg.

else.

CALL FUNCTION 'CLOI_PUT_SIGN_IN_FRONT'

CHANGING

VALUE = itab-shkzg.

v_amount = itab-shkzg

endif.

Regards,

Raj.