on 10-07-2008 11:04 AM
Hello,
I have a problem with smartforms.
When I try to output a text in the table cell that is longer than 132 characters and does not have CR LF in it, it breaks after 132th sign and the remaining part is displayed in the next line.
I use call 'CONVERT_OTF' to generate pdf file.
How can one fix it without inserting extra CR LF ?
Hi,
When converting OTF to PDF, there is a piece of code you should add to convert 132 length to 255. The code looks like below.
FORM f_convert_132_255 USING p_pdf TYPE tlinetab
CHANGING p_content_bin TYPE swuoconttab.
DATA: lv_buffer TYPE string,
lwa_pdf TYPE tline,
lwa_content_bin TYPE solisti1.
REFRESH p_content_bin[].
LOOP AT p_pdf INTO lwa_pdf.
TRANSLATE lwa_pdf USING '~'.
CONCATENATE lv_buffer lwa_pdf INTO lv_buffer.
ENDLOOP.
TRANSLATE lv_buffer USING '~'.
DO.
lwa_content_bin = lv_buffer.
APPEND lwa_content_bin TO p_content_bin.
SHIFT lv_buffer LEFT BY 255 PLACES.
IF lv_buffer IS INITIAL.
EXIT.
ENDIF.
ENDDO.
ENDFORM.
For more clearer explanation, please try to search "Smartform to PDF" in this forum. There is a blog or wiki showing a complete code for converting smartform to PDF.
Regards,
Teddy Kurniawan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.