IT WORK/SAP FI and ABAP

[ABAP] 마이너스 부호를 뒤에서 앞으로 보내기 How to display minus sign infront of numbers

Bathildis 2016. 5. 19. 16:20
반응형
* 1. Funtions 
    CALL FUNCTION 'CLOI_PUT_SIGN_IN_FRONT'
       CHANGING
            VALUE = GV_VALUE.

* 2. Logic
data: v1 type p decimals 3 value '123.45-', 
v2(15) type c. 

write: v1. 
WRITE v1 TO v2. 

if v1 < 0. 
  SHIFT v2 RIGHT CIRCULAR. 
endif. 

CONDENSE v2 NO-GAPS. 
write:/ v2.

 

Before: 123.45-

After : -123.45

 

 

반응형

 

반응형