‎2008 Jan 05 6:18 AM
Hi,
I want to put negative sign in front.
i.e in standard SAP 15.23- will be display,
but my requirement is instead of that i want -15.23.
i want this type of settings in all reports.
so without programming, there is any option for changing the format of negative sign.
Regards,
Arpit
‎2008 Jan 05 6:21 AM
‎2008 Jan 05 6:38 AM
hi Lakshman,
i don't want through programming,
bcoz for using this FM i have to convert into character and change.
so using this i can not use sum,subtotal etc function that is in alv.
so ,
there is any setting for that,
Negative Sign format,
in that option like,
in which type of format u want negative sign.
like,
-1.1
1.1-
etc.
Regards,
Arpit
‎2008 Jan 05 6:51 AM
Hi Arpit
try from follwoing code explaination.
Data : l_dmbtr(13).
it_bsik-dmbtr = 15.23- "supposed value
if it_bsik-dmbtr < 0.
l_dmbtr = abs(it_bsik-dmbtr).
concatenate '-' l_dmbtr into l_dmbtr.
write :/10 l_dmbtr.
else.
l_dmbtr = it_bsik-dmbtr.
write :/10 l_dmbtr.
endif.
reward point if helpfull.
Regards
Rajesh
‎2008 Jan 05 6:57 AM
hi, Rajesh
i m using this with ALV.
so write is not useful to me.
& i want to use function that is provided by alv like
sum, sorting, subtotal etc.
Regards,
Arpit
‎2008 Jan 05 7:35 AM
then in ur inetnal table add an extra text field and follow the code.
Data : begin of it_bsik occurs 0.
dmbtr like bsik-dmbtr,
l_dmbtr(13), " extra field
end of it_bsik.
for example.
loop at it_bsik.
if it_bsik-dmbtr < 0.
it_bsik-l_dmbtr = Abc(it_bsik-dmbtr)
concatenate '-' it_bsik-l_dmbtr into it_bsik-l_dmbtr.
else.
it_bsik-l_dmbtr = it_bsik-dmbtr.
endif
modify it_bsik.
endloop.
use this inernal table field to display.
reward point if usefull.
regards
rajesh
‎2008 Jan 05 7:50 AM
Hi,
You can use the FM CLOI_PUT_SIGN_IN_FRONT .
Thanks,
Sriram Ponna.
‎2008 Jan 05 7:58 AM
i don't want to use any FM.
Is there any settings for that?.......
‎2008 Jan 05 8:21 AM
Hi,
Please check in SU01 TCode, but doing this it may effect entire systems.
Thanks,
Sriram Ponna.
‎2008 Jan 05 8:41 AM
Hi Sriram,
In SU01 where it is?...
pls provide more details.
Regards,
Arpit
‎2008 Jan 07 7:31 AM
‎2008 Jan 07 8:57 AM
Hi,
I dont think we can make some setting changes to get the negetive in front, you will have to write the code before you pass the value to ALV field.
Reward Points if useful.
‎2008 Jan 08 7:39 AM
‎2008 Jan 09 1:14 PM
‎2008 Jan 09 1:18 PM
hi arpit try to use the Fm cloi_pvt_sign_in_front
reward points if useful
‎2008 Jan 09 1:23 PM
Hi,
Try this sample code.
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,
Satish
‎2021 Apr 22 8:04 AM