SAP 는 대충 금액을 테이블에 저장할 때 27자리 정수와 2자리의 소수로 저장을 한다. 앞의 정수자리수는 변할 수 있지만...
소수점 2자리는 국룰이다. 그래서 저장할 때 1000원은 10.00 으로 10 달러는 10.00 으로 저장한다.
글로벌 솔루션이라 그런가... 그래서 실제로 금액을 표시할 때는 통화키를 적용해서 표시해야 한다.
10.00 에 KRW 를 적용하면 1000원, USD 를 적용하면 10.00 달러가 되는 것이다. 테이블이나 Structure 를 에 금액필드를 사용하면 해당하는 통화키 필드를 지정해야 activate 시킬 수 있다.
이 정도 까지 하면 alv 에서는 자동으로 통화키가 적용되어 금액이 잘 표시가 될 것이다.
그러나 그 외에 통화키를 적용하려고 하면 write 구문을 사용하거나 Standard 에서 제공하는 함수를 사용하면 된다.
Function currency_amount_sap_to_idoc 를 사용한다.
( 반대의 경우는 currency_amount_idoc_to_sap 를 사용한다. )
www.se80.co.uk/sapfms/c/curr/currency_amount_sap_to_idoc.htm
CURRENCY_AMOUNT_SAP_TO_IDOC SAP ABAP Function Module
CURRENCY_AMOUNT_SAP_TO_IDOC is a standard SAP function module available within R/3 SAP systems depending on your version and release level. Below is the pattern details for this FM showing its interface including any import and export parameters, exception
www.se80.co.uk
'SAP > ABAP' 카테고리의 다른 글
ABAP OLE EXCEL DOWNLOAD & UPLOAD (0) | 2020.10.05 |
---|---|
저장하기 전에 ALV Data Changed Event 강제로 수행하기 (0) | 2020.10.05 |
Dynamic Internal Table 에서 Cell Tab, Color Tab 만들기 (0) | 2020.10.05 |
ALV 에서 fieldcatalog 속성으로 Material No Internal No 에서 External No 로 표시하기 (0) | 2020.10.05 |