2009 Mar 25 6:39 AM
Hi,
I need to get more than one invoice in single pdf. I am using below code:
DATA: lines LIKE STANDARD TABLE OF tline.
DATA: l_line LIKE itcoo,
v_bin_filesize type i,
l_pdf_xstring type xstring.
STATICS: pdf_dat1 LIKE itcoo OCCURS 0 WITH HEADER LINE.
LOOP AT job_output_info-otfdata INTO l_line.
pdf_dat1 = l_line.
APPEND pdf_dat1.
CLEAR: l_line, pdf_dat.
ENDLOOP.
IF nast-dimme = 'X'.
CALL FUNCTION 'CONVERT_OTF'
EXPORTING
format = 'PDF'
max_linewidth = 132
IMPORTING
BIN_FILESIZE = v_bin_filesize
BIN_FILE = l_pdf_xstring
TABLES
otf = pdf_dat1
lines = lines
EXCEPTIONS
err_max_linewidth = 1
err_format = 2
err_conv_not_possible = 3
err_bad_otf = 4
OTHERS = 5
.
I am getting return code = 4.
Please tell me where i am wrong or why sy-subrc ne 0.
Regards,
Abhimanyu
Hi,
I need to get more than one invoice in single pdf. I am using below code:
DATA: lines LIKE STANDARD TABLE OF tline.
DATA: l_line LIKE itcoo,
v_bin_filesize type i,
l_pdf_xstring type xstring.
STATICS: pdf_dat1 LIKE itcoo OCCURS 0 WITH HEADER LINE.
LOOP AT job_output_info-otfdata INTO l_line.
pdf_dat1 = l_line.
APPEND pdf_dat1.
CLEAR: l_line, pdf_dat.
ENDLOOP.
IF nast-dimme = 'X'.
CALL FUNCTION 'CONVERT_OTF'
EXPORTING
format = 'PDF'
max_linewidth = 132
IMPORTING
BIN_FILESIZE = v_bin_filesize
BIN_FILE = l_pdf_xstring
TABLES
otf = pdf_dat1
lines = lines
EXCEPTIONS
err_max_linewidth = 1
err_format = 2
err_conv_not_possible = 3
err_bad_otf = 4
OTHERS = 5
.
I am getting return code = 4.
Please tell me where i am wrong or why sy-subrc ne 0.
Regards,
Abhimanyu
2011 Mar 17 4:03 AM
2011 Mar 17 4:04 AM
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |