2008 Jan 08 9:04 PM
Hi Experts,
Could any one provide me with the code for replacing the minus sign from behind the totol to the front.
Like in the output screen at the bottom wher total is displayed, it is displayed as for example 24257480 - at the last minus sign
so I want it as - 24257480, I want it in the begining, the minus sign
Please help me out .
THanx
Hi Experts,
Could any one provide me with the code for replacing the minus sign from behind the totol to the front.
Like in the output screen at the bottom wher total is displayed, it is displayed as for example 24257480 - at the last minus sign
so I want it as - 24257480, I want it in the begining, the minus sign
Please help me out .
THanx
2008 Jan 08 9:11 PM
Use
SHIFT string UP TO str CIRCULAR.
Where String is your field value and str is '-'.
Hope this helps.
Vinodh Balakrishnan
2008 Jan 08 9:15 PM
Check if you have this FM in your system: CLOI_PUT_SIGN_IN_FRONT
2008 Jan 08 9:21 PM
you can try this code:
if z_val<0
z_val = z-val * -1.
write: '-', z_val.
else
write z_val.
endif.
but it might leave a space between - and no. ( iam not sure)
like '- 234'.
2008 Jan 08 9:36 PM
try this..
DATA: minus_sign(1) ,
total(16) type c.
total = '24257480-'. "assign your variable
SEARCH total FOR '-'.
IF SY-SUBRC = 0 AND SY-FDPOS NE 0.
SPLIT total AT '-' INTO total minus_sign.
CONDENSE total.
CONCATENATE '-' total INTO total.
ELSE.
CONDENSE total.
ENDIF.
2008 Jan 09 4:43 AM
Hi aman,
You need to manually display the "-" symbol before the value.
Have a look on the following example code.so that u can get the idea.
data: str type i value -1234543.
write:/ '-' no-gap,str no-sign left-justified.
reward points,if it is useful.
Thanks,
chandu.
| User | Count |
|---|---|
| 5 | |
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |