Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Condense xyz no-gaps is not working

Former Member
0 Kudos

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.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

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

4 REPLIES 4

Former Member
0 Kudos

CONDENSE spell-word no-gaps.

Former Member
0 Kudos

Hi,

You can try this.

data: text type string.

text = spell-word.

condense text no-gaps.

Former Member
0 Kudos

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

Former Member
0 Kudos

Hi,

you have used CONDENSE : spell-word no-gaps but the spell-word is a strusture with NUMBER, DECIMAL, CURRDEC, WORD , DECWORD etc.

so if we need to condense the word then we use :

CONDENSE spell-word-word no-gaps.

plz check below code:

CALL FUNCTION 'SPELL_AMOUNT'
  EXPORTING
    AMOUNT    = amt
    CURRENCY  = curr
    LANGUAGE  = language
  IMPORTING
    IN_WORDS  = WORDS
  EXCEPTIONS
    NOT_FOUND = 1
    TOO_LARGE = 2
    OTHERS    = 3.
  
txt1 = WORDS-word.
condense txt1 no-gaps.
 
WRITE : txt1.

thanx.

Edited by: Dhanashri Pawar on Sep 11, 2008 9:15 AM