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: 

amount in diffrent languages

Former Member
0 Kudos

Hi gurus,

iam fetched some fields amount now i want to write it in differrent languages,

how can i do this ,if i want to display it in other than logon lang.

iam using parameter for lang.

help

thanks

deepak

1 ACCEPTED SOLUTION

former_member705122
Active Contributor
0 Kudos

Hi,

Check this:

PARAMETER : 
  p_lang TYPE t002-spras.
DATA:
  w_word  LIKE spell,
  w_out   TYPE c.

CALL FUNCTION 'CONVERSION_EXIT_ISOLA_INPUT'
  EXPORTING
    input            = p_lang
  IMPORTING
    output           = w_out
  EXCEPTIONS
    unknown_language = 1
    OTHERS           = 2.
IF sy-subrc EQ 0.
  CALL FUNCTION 'SPELL_AMOUNT'
    EXPORTING
      amount    = 1230
      currency  = ' '
      filler    = ' '
      language  = w_out
    IMPORTING
      in_words  = w_word
    EXCEPTIONS
      not_found = 1
      too_large = 2
      OTHERS    = 3.
ENDIF.

WRITE: w_word-word.

Regards

Adil

3 REPLIES 3

former_member125931
Active Participant
0 Kudos

check this FM : spell_amount

Former Member
0 Kudos

tellme the fields which you want to display it in the differenet languages bcoz the description will be in the tables starting with T1*

etc.. do reply with complete details of your fields.

former_member705122
Active Contributor
0 Kudos

Hi,

Check this:

PARAMETER : 
  p_lang TYPE t002-spras.
DATA:
  w_word  LIKE spell,
  w_out   TYPE c.

CALL FUNCTION 'CONVERSION_EXIT_ISOLA_INPUT'
  EXPORTING
    input            = p_lang
  IMPORTING
    output           = w_out
  EXCEPTIONS
    unknown_language = 1
    OTHERS           = 2.
IF sy-subrc EQ 0.
  CALL FUNCTION 'SPELL_AMOUNT'
    EXPORTING
      amount    = 1230
      currency  = ' '
      filler    = ' '
      language  = w_out
    IMPORTING
      in_words  = w_word
    EXCEPTIONS
      not_found = 1
      too_large = 2
      OTHERS    = 3.
ENDIF.

WRITE: w_word-word.

Regards

Adil