Application Development and Automation 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: 
Read only

Problem with Cheque Printing with Word?

Former Member
0 Likes
562

Hi,

I have a problem with cheque printing. I am printing the amount in words in RUPEES rows. There are two rows normally. Hope everyone knows.

If the amount in words is u2018FOURTY FOUR THOUSAND FIVE HUNDRED AND FIFTYu2019.

Problem is:

Rupees: line1: FOURTY FOUR THO

USAND FIVE HUNDRED AND FIFTY

Need solution is:

Rupees: line 1: FOURTY FOUR

THOUSAND FIVE HUNDRED AND FIFTY.

If the amount in word is u2018 FIVE THOUSAND ONE

HUDRED.

It should come like this, if the value is not more than.

Help me the solution.

Thanks

Sarayu Reddy

1 ACCEPTED SOLUTION
Read only

naveen_kumar116
Active Participant
0 Likes
512

Hi,

First u need to find how can characters can fit into first row. split and display it..

If u need to split based on each and every word then lot of logic need to be added.

Cheers,

Naveen.

Hi,

I have a problem with cheque printing. I am printing the amount in words in RUPEES rows. There are two rows normally. Hope everyone knows.

If the amount in words is u2018FOURTY FOUR THOUSAND FIVE HUNDRED AND FIFTYu2019.

Problem is:

Rupees: line1: FOURTY FOUR THO

USAND FIVE HUNDRED AND FIFTY

Need solution is:

Rupees: line 1: FOURTY FOUR

THOUSAND FIVE HUNDRED AND FIFTY.

If the amount in word is u2018 FIVE THOUSAND ONE

HUDRED.

It should come like this, if the value is not more than.

Help me the solution.

Thanks

Sarayu Reddy

3 REPLIES 3
Read only

naveen_kumar116
Active Participant
0 Likes
513

Hi,

First u need to find how can characters can fit into first row. split and display it..

If u need to split based on each and every word then lot of logic need to be added.

Cheers,

Naveen.

Read only

Former Member
0 Likes
512

Hi,

Just use:-

DATA: w_footer1(60),

w_footer2(60).

CALL FUNCTION 'RKD_WORD_WRAP'

EXPORTING

textline = w_footer

delimiter = ' '

outputlen = 60

IMPORTING

out_line1 = w_footer1

out_line2 = w_footer2

out_line3 = w_footer3

  • TABLES

  • OUT_LINES =

EXCEPTIONS

outputlen_too_large = 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.

Please note that in the above case maximum no of characters that can be printed is 60. Just check how many characters you can print on a given line & pass that value instead of 60, & in DATA defination define w_footer1 & w_footer2 as lenght 60 Characters.

I hope this helps,

Regards

Raju Chitale

Read only

Former Member
0 Likes
512

self