cancel
Showing results for 
Search instead for 
Did you mean: 

To display the amount text into two lines as per length of Cheque leaf

Former Member
0 Kudos

HI all,

(Attn:HI Perez,)

Im working on Cheque print(pre-printed script)...in that i want to display the amount into two lines....as available/specified as per Bank Cheque (leaf)format...

With the below code, im not getting the output as required...

FYI----in se38

*************************

DATA AMT LIKE REGUD-WAERS.

data: words(120) type c,AMOUNT(120).

data: ant like PC207-betrg,t like reguh-vblnr,t1 type int4.

FORM WORDS TABLES intab

STRUCTURE itcsy outtab

STRUCTURE itcsy.

READ TABLE intab INDEX 1.

t = intab-value.

select single RWBTR from reguh into ant where vblnr eq t.

ant = ant * ( -1 ).

CALL FUNCTION 'HR_IN_CHG_INR_WRDS'

EXPORTING

AMT_IN_NUM = ant

IMPORTING

AMT_IN_WORDS = words.

amount = words.

READ TABLE outtab INDEX 1.

MOVE WORDS TO outtab-value.

MODIFY outtab INDEX 1.

ENDFORM. "diff

*************************

in Script

PERFORM WORDS IN PROGRAM ZCHEQUE

USING &REGUH-VBLNR&

CHANGING &AMOUNT&

ENDPERFORM

IF &REGUH-HBKID& EQ 'ALLBK'

&reguh-zaldt&

&REGUH-NAME1&

&REGUh-rwbtr&

&AMOUNT&

ENDIF

************************************

just go thru the below code...and pls put ur comments in detail.....

Pls do advise....

thanks & regards

sankar

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

Use FM SPELL_AMOUNT instead of 'HR_IN_CHG_INR_WRDS'.

Reward if this helps,

Satish

Former Member
0 Kudos

hi satish panakala,

Could u pls reply me with some example and how should i call in my se71...

is the below one right with my earlier data types....or pls update me with ur modification...

**********************

CALL FUNCTION 'SPELL_AMOUNT'

EXPORTING

AMOUNT = amt

CURRENCY = ' INR'

  • FILLER = ' '

  • LANGUAGE = SY-LANGU

IMPORTING

IN_WORDS = words

  • 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.

******************************

thanks & regards

sankar