2013 Apr 11 1:23 PM
Hi,
We have created a new device to use device type PDF1.
I am retreiving PDF content from SAP and trying the use the function module 'RSPO_SX_OUTPUT_DEVICEDATA' to send the PDF data to the spool.
I am getting a INTERNAL_SERVER Error.
Here is my function call: -
CALL FUNCTION 'RSPO_SX_OUTPUT_DEVICEDATA'
EXPORTING
* NAME =
dest = p_dest
* SIZE = l_rowbytes
* ROWS = w_lines
* STARTROW = 1
* pages = 1
* RQTITLE =
* RQCOPIES =
* RQOWNER =
datatype = 'RAW'
immediately = space
* IMPORTING
* RQID =
TABLES
device_data = t_hex
* EXCEPTIONS
* NAME_MISSING = 1
* NAME_TWICE = 2
* NOT_FOUND = 3
* ILLEGAL_LAYOUT = 4
* INTERNAL_ERROR = 5
* SIZE_MISMATCH = 6
* OTHERS = 7
.
I have also tried to process a smartform while specifying the output device as my new PDF device, but this appears on the spool as an OTF not a PDF. Should it be a PDF.
Any help is much appreciated.
Thanks
Martin
Hi,
We have created a new device to use device type PDF1.
I am retreiving PDF content from SAP and trying the use the function module 'RSPO_SX_OUTPUT_DEVICEDATA' to send the PDF data to the spool.
I am getting a INTERNAL_SERVER Error.
Here is my function call: -
CALL FUNCTION 'RSPO_SX_OUTPUT_DEVICEDATA'
EXPORTING
* NAME =
dest = p_dest
* SIZE = l_rowbytes
* ROWS = w_lines
* STARTROW = 1
* pages = 1
* RQTITLE =
* RQCOPIES =
* RQOWNER =
datatype = 'RAW'
immediately = space
* IMPORTING
* RQID =
TABLES
device_data = t_hex
* EXCEPTIONS
* NAME_MISSING = 1
* NAME_TWICE = 2
* NOT_FOUND = 3
* ILLEGAL_LAYOUT = 4
* INTERNAL_ERROR = 5
* SIZE_MISMATCH = 6
* OTHERS = 7
.
I have also tried to process a smartform while specifying the output device as my new PDF device, but this appears on the spool as an OTF not a PDF. Should it be a PDF.
Any help is much appreciated.
Thanks
Martin
2013 Apr 11 1:53 PM
Hi Martin,
pls check below code.
IF NOT it_final[] IS INITIAL. -
>IT_FINAL is my main internal table in the report ZSALARY
DATA : count TYPE syprcop,
days TYPE sypexpi,
params TYPE pri_params,
valid TYPE c,
pdf_table TYPE rcl_bag_tline,
spoolid TYPE rspoid,
pdf_fsize TYPE i.
CALL FUNCTION 'GET_PRINT_PARAMETERS'
EXPORTING
destination = 'LP01'
copies = count
list_name = 'ZSALARY' -
tHIS IS MY REPORT NAME
list_text = 'ZSSPOOL'
immediately = ' '
release = 'X'
new_list_id = 'X'
expiration = days
line_size = 90
line_count = 65
layout = 'X_PAPER'
sap_cover_page = 'X'
receiver = 'SAP*'
department = 'System'
no_dialog = 'X'
IMPORTING
out_parameters = params
valid = valid.
NEW-PAGE PRINT ON PARAMETERS params NO DIALOG.
WRITE : 'hi this is the test for spool'.
NEW-PAGE PRINT OFF.
COMMIT WORK.
WRITE : / 'The Spool no is ', sy-spono. "system variable for spool no
spoolid = sy-spono . -
At this point i can see the spool no.
CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF'
EXPORTING
src_spoolid = spoolid
no_dialog = 'X'
IMPORTING
pdf_bytecount = pdf_fsize
TABLES
pdf = pdf_table
EXCEPTIONS
OTHERS = 0.
CHECK sy-subrc = 0.
Thanks
Tarak
2013 Apr 12 9:26 AM
I already have the PDF content. I need to use the function module RSPO_SX_OUTPUT_DEVICEDATA to send the PDF content to the spool/printer, but I do not know if I am using it properly.
Do I need to populated the number of pages etc.
Thanks
Martin
2013 Nov 29 8:43 AM
Hello Martin,
SAP provides a function module ADS_CREATE_PDF_SPOOLJOB, that can put an PDF in the SAP spool system. Example program is FP_TEST_SAVE_PDF_TO_SPOOL.
If not available, check note 0001855522.
Regards
Jürgen
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |