Skip to Content

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

Condense xyz no-gaps is not working

Hi,

I have used this function to get the text of the total amount, it did work.

What the problem I am facing is that, when text returned, it all lenght(even most part is empty) is displayed and consumes needless lines:

CALL FUNCTION 'SPELL_AMOUNT'

I mean imported text in IN_WORDS of this function is not condensed.

CONDENSE : spell-word no-gaps.

It is still displayed as 255 char long.

What is the problem?

Thanks.

deniz.

Tags:
Former Member
Former Member replied

Hi

Refer this code:

DATA: MONEY LIKE PAYR-RWBTR,
            IN_LETTERS LIKE SPELL,
      text type string.

MONEY = 1000.

CALL FUNCTION 'SPELL_AMOUNT'
  EXPORTING
    AMOUNT    = MONEY
      IMPORTING
    IN_WORDS  = IN_LETTERS
  EXCEPTIONS
    NOT_FOUND = 1
    TOO_LARGE = 2
    OTHERS    = 3.


text = IN_letters-word.
condense text no-gaps.


WRITE :
  / MONEY,
        text.

Regards,

Sravanthi

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question