‎2008 May 15 1:08 PM
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
‎2008 May 15 1:10 PM
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..
‎2008 May 15 1:14 PM
hi
is there is any standard key word for this
please tell me i need to do it for lot of times
‎2008 May 15 1:18 PM
‎2008 May 15 1:16 PM
Hi
IF amount LT 0.
WRITE:/ '-', amount NO-SIGN.
ELSE.
WRITE:/ amount.
ENDIF.
‎2008 May 15 1:20 PM
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
‎2008 May 15 1:29 PM
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.