Last month i writed a smartform program for printing something.In the ABAP program ,i must spell total value.And print the capital amount in the smartform. But when encount the capital amount is long enough to cram one line's space,the smartform program will print the others in the second line automaticly.But one word will be split into two words.How can solve this problem?I found an very useful function moudle to do this job.It is 'RKD_WORD_WRAP'. Example code as show below.
CALL FUNCTION 'RKD_WORD_WRAP'
EXPORTING
TEXTLINE = l_v_textline " input text which you want to print in smartform
OUTPUTLEN = 70
IMPORTING
OUT_LINE1 = l_v_ssfheader-total_capital_1 " result of split
OUT_LINE2 = l_v_ssfheader-total_capital_2
OUT_LINE3 = l_v_ssfheader-total_capital_3
TABLES
OUT_LINES = l_t_out_lines " result internal table of split
EXCEPTIONS
OUTPUTLEN_TOO_LARGE = 1
OTHERS = 2.
I want to implement this function use ABAP OO .Of course reference the code of this function.Then i can avoid load function group KYER.