2006 Mar 01 2:26 PM
in module pool it is showing that, "OTF end command // missing in OTF "
when iam running my program
IF OK_CODE = 'BACK' .
CALL FUNCTION 'CONVERT_OTF'
EXPORTING
FORMAT = 'PDF'
MAX_LINEWIDTH = 132
ARCHIVE_INDEX = ' '
COPYNUMBER = 0
ASCII_BIDI_VIS2LOG = ' '
IMPORTING
BIN_FILESIZE = w_line
BIN_FILE =
TABLES
otf = IT_ITCOO
lines = IT_TLINE
EXCEPTIONS
ERR_MAX_LINEWIDTH = 1
ERR_FORMAT = 2
ERR_CONV_NOT_POSSIBLE = 3
ERR_BAD_OTF = 4
OTHERS = 5
.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CALL FUNCTION 'WS_DOWNLOAD'
EXPORTING
BIN_FILESIZE = W_LINE
CODEPAGE = ' '
FILENAME = 'd:\test.PDF'
FILETYPE = 'BIN'
MODE = ' '
WK1_N_FORMAT = ' '
WK1_N_SIZE = ' '
WK1_T_FORMAT = ' '
WK1_T_SIZE = ' '
COL_SELECT = ' '
COL_SELECTMASK = ' '
NO_AUTH_CHECK = ' '
IMPORTING
FILELENGTH = W_LINE1
TABLES
data_tab = IT_ITCOO
FIELDNAMES =
EXCEPTIONS
FILE_OPEN_ERROR = 1
FILE_WRITE_ERROR = 2
INVALID_FILESIZE = 3
INVALID_TYPE = 4
NO_BATCH = 5
UNKNOWN_ERROR = 6
INVALID_TABLE_WIDTH = 7
GUI_REFUSE_FILETRANSFER = 8
CUSTOMER_ERROR = 9
NO_AUTHORITY = 10
OTHERS = 11
.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDIF .
2006 Mar 01 5:35 PM
Hi,
Check this program for reference :RSTXPDFT and check the contents of the IT_ITCOO table , the contents will start like below format in IT_ITCOO .
TDPRINTCOM TDPRINTPAR
// XXXXXXXXX - first line
// XXXXXXXXX - last line.
Laxman
2006 Mar 02 4:22 AM
Hii Laxman,
Could you pls tell me how to use the standard program RSTXPDFT? I mean, the input values to be filled up in the selection-screen. I have a program HINCEDT0 which generates a payslip. I want this payslip to be converted into PDF format. How can these two programs be merged to get a PDF form of payslip?
2006 Mar 02 5:27 AM
Abdul Azeez
Have a look at the following post, you can read the ABAP spool to convert your output to PDF.
/people/sap.user72/blog/2004/11/10/bsphowto-generate-pdf-output-from-a-bsp
Regards
2006 Mar 02 5:34 AM
Hi Anil,
The internal table should be populated with otf data before coverting it to PDF.
we can get that by checking this field.
ls_control_param-getotf = 'X'. and passing it to the function module.
After that we need to pass it_output_info-otfdata this deep structure to the 'CONVERT_OTF' function module.
Thanks,
Vamsi.
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |