Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

reg: spell_word

Hi Abapers,

I want to display amount field as word format. I am using Spell_word FM.

But, the problem is, I don't know how to use this FM internal table records.

FORM SUB_GET_OUPUT .

CLEAR W_VBRK.

LOOP AT T_VBRK INTO W_VBRK.

W_OUTPUT-VBELN = W_VBRK-VBELN.

W_OUTPUT-FKART = W_VBRK-FKART.

W_OUTPUT-FKDAT = W_VBRK-FKDAT.

W_OUTPUT-KUNRG = W_VBRK-KUNRG.

W_OUTPUT-XBLNR = W_VBRK-XBLNR.

  • W_OUTPUT-NETWR = W_VBRK-NETWR.

CALL FUNCTION 'SPELL_AMOUNT'

EXPORTING

AMOUNT = W_VBRK-NETWR

CURRENCY = SY-WAERS

  • FILLER = ' '

LANGUAGE = SY-LANGU

  • IMPORTING

  • IN_WORDS = W_OUTPUT-NETWR

  • 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.

W_OUTPUT-ERDAT = W_VBRK-ERDAT.

CLEAR W_VBRP.

READ TABLE T_VBRP INTO W_VBRP WITH KEY VKORG_AUFT = W_VBRK-VKORG.

W_OUTPUT-MATNR = W_VBRP-MATNR.

W_OUTPUT-WERKS = W_VBRP-WERKS.

W_OUTPUT-POSNV = W_VBRP-POSNV.

W_OUTPUT-ARKTX = W_VBRP-ARKTX.

W_OUTPUT-VRKME = W_VBRP-VRKME.

W_OUTPUT-FKIMG = W_VBRP-FKIMG.

W_OUTPUT-NETWR = W_VBRP-NETWR.

W_OUTPUT-VKORG_AUFT = W_VBRP-VKORG_AUFT.

This is example code.

Please help me in this regard.

Advance thanks

Regards

Sai

Tags:
Not what you were looking for? View more on this topic or Ask a question