cancel
Showing results for 
Search instead for 
Did you mean: 

MEDRUCK script to display currency fields in amount

Former Member
0 Kudos

Hi Experts,

I have written the code in the main window of the zscript of medruck to display KOMK-SUPOS field in words and the

subroutine i included is as follows:

PROGRAM ZWORD_DISPLAY.

data:W_SUPOS TYPE spell-number,

TEXT1 LIKE SPELL-WORD.

FORM WORD TABLES IN_TAB STRUCTURE itcsy

OUT_TAB STRUCTURE itcsy.

READ TABLE in_tab INDEX 1.

w_supos = in_tab-value.

CALL FUNCTION 'SPELL_AMOUNT'

EXPORTING

AMOUNT = w_supos

CURRENCY = sy-waers

  • FILLER = ' '

LANGUAGE = SY-LANGU

IMPORTING

IN_WORDS = TEXT1

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.

READ TABLE out_tab INDEX 1.

MOVE text1 TO out_tab-value.

MODIFY out_tab INDEX sy-tabix.

ENDFORM.

But when am trying to check the print preview in tcode me22n itis giving a short dump indicating that

TYPE CONFLICT WHEN CALLING THE FUNCTION MODULE,TEXT1 IS CORRECT TYPE BUT LENGTH IS INCORRECT.

pls help.

Thanks in advance.

Accepted Solutions (1)

Accepted Solutions (1)

Sandra_Rossi
Active Contributor
0 Kudos

define the arguments of the exact same type as function module parameters

Answers (1)

Answers (1)

Former Member
0 Kudos

Thanks.it solved my problem.