cancel
Showing results for 
Search instead for 
Did you mean: 

SMARTFORMS - DUMP IN CONVERTING AMOUNT TO WORDS

Former Member
0 Kudos

final internal table

BEGIN OF STRUCT_FINAL ,

WA_FINAL - GTOTAL TYPE PAYR-WAERS,

TEXT(75) TYPE C,

END OF STRUCT_FINAL.

RECORD NOW MOVED TO WA_FINAL

IMPORT PARAMETER

WA_FINAL - GTOTAL

EXPORT PARAMETER

WA_FINAL-TEXT

CALL FUNCTION 'HR_IN_CHG_INR_WRDS'

EXPORTING

AMT_IN_NUM = WA_FINAL-GTOTAL

IMPORTING

AMT_IN_WORDS = WA_FINAL-TEXT

  • EXCEPTIONS

  • DATA_TYPE_MISMATCH = 1

  • OTHERS = 2

.

IF SY-SUBRC <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

WHILE DRAGGING TEXT FROM FIELD LIST ON / OFF AND ON EXECUTING IT SHOWS DUMP ERROR..

KINDLY HELP

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Please check if this may help you out.

Declare the field WA_FINAL - GTOTAL as PC207-BETRG.

instead of the previous one.

Regards,

Soumya.

Answers (2)

Answers (2)

mahaboob_pathan
Contributor
0 Kudos

hi

do one thing.

define one variable like

v_total type PC207-BETRG.

and assign the gtotal to v_total.

and pass this v_total to FM.

Former Member
0 Kudos

Yes, you should declare Gtotal as told by soumya and also increase the length of the text field.

Can you provide the details of the Dump, what it is saying?

Regards

Karthik D

Former Member
0 Kudos

hi,

You can move value to some variable ex: v_gtotal, v_text.

v_gtotal = WA_FINAL-GTOTAL.

then

CALL FUNCTION 'HR_IN_CHG_INR_WRDS'

EXPORTING

AMT_IN_NUM = v_gtotal

IMPORTING

AMT_IN_WORDS = v_text

move v_text value to WA_FINAL-text