ABAP Function

1. Convert Number to Word
2. Read Text

1. Convert Number to Word:

DATA : t_spell LIKE spell OCCURS 0 WITH HEADER LINE,
ttamt(15) TYPE p DECIMALS 3 VALUE '1234'.

CALL FUNCTION 'SPELL_AMOUNT'
EXPORTING
amount = ttamt
currency = 'INR'
filler = ' '
language = sy-langu
IMPORTING
in_words = t_spell
EXCEPTIONS
not_found = 1
too_large = 2
OTHERS = 3.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.

2. Read Text:

TABLES :STXH.
DATA : itab TYPE TABLE OF tline WITH HEADER LINE.
DATA : inspct TYPE qals-prueflos,
id TYPE thead-tdid,
name TYPE thead-tdname,
object TYPE thead-tdobject.

SELECT SINGLE prueflos
FROM qals INTO inspct
WHERE charg = vcharg-low
AND matnr = tmatcode
AND stat35 = space.

CONCATENATE sy-mandt inspct 'L' INTO name.
id = 'QAVE'.
object = 'QPRUEFLOS'.

CALL FUNCTION 'READ_TEXT'
EXPORTING
client = sy-mandt
id = id
language = sy-langu
name = name
object = object
TABLES
lines = itab[]
EXCEPTIONS
id = 1
language = 2
name = 3
not_found = 4
object = 5
reference_check = 6
wrong_access_to_archive = 7
OTHERS = 8.

Note:Detail fo ID, NAME and OBJECT will come from