|
Is there any SAP function that could turn the numbers
to text amount?
For example: I need to change USD 3789.45 to USD Three Thousand Seven Hundred Eighty Night and Fourty Five Cents. Here I am giving some little bit code for conversion, please go through it. Define internal table selected fields DATA: BEGIN OF it_header OCCURS 0,
Define variables v_netvalue TYPE vbrp-netwr.
Assign into function module CALL FUNCTION 'SPELL_AMOUNT'
Or This sample program shows how to work spell amount function module with decimals: REPORT ZDEC_TEST. DATA: langu LIKE sy-langu,
DATA:cu_spell TYPE spell. CALL FUNCTION 'SPELL_AMOUNT' EXPORTING
IMPORTING
EXCEPTIONS
OTHERS = 3. IF sy-subrc EQ 0. DATA:in_words TYPE string. CONCATENATE cu_spell-word 'dollors' 'and' cu_spell-decword
'cents'
WRITE in_words. ENDIF. --> End of ABAP Example |
|
See Also:
Tables
ABAP Books List
Smart Forms
ABAP Menu:
Return to Index:-
(c) www.gotothings.com All material on this site is Copyright.
|