2009 Nov 13 9:36 AM
Hi All
I have more than one spool.
We have these spools containing some data written using write statements.
Now when we convert this Spool using 'RSPO_RETURN_SPOOLJOB' to OTF, we are getting some junk values ,
Not we are passing this to the FM 'CONVERT_OTF_2_PDF', but its giving a error"OTF end command // missing in OTF data"
From this I understand the data is not converted properly to OTF, kindly help me with this issue, if you have faced before.
Regards,
Shobana.K
Edited by: Shobana k on Nov 13, 2009 10:36 AM
Hi All
I have more than one spool.
We have these spools containing some data written using write statements.
Now when we convert this Spool using 'RSPO_RETURN_SPOOLJOB' to OTF, we are getting some junk values ,
Not we are passing this to the FM 'CONVERT_OTF_2_PDF', but its giving a error"OTF end command // missing in OTF data"
From this I understand the data is not converted properly to OTF, kindly help me with this issue, if you have faced before.
Regards,
Shobana.K
Edited by: Shobana k on Nov 13, 2009 10:36 AM
2009 Nov 13 9:43 AM
Hello,
Did you mention the desired type as OTF in the FM 'RSPO_RETURN_SPOOLJOB' ?
Vikranth
2009 Nov 13 9:45 AM
If I give the desired type as OTF, I get nohting in the table,
Only if I dont give , I get atleast the junk values in the table.
2009 Nov 13 9:54 AM
Hello,
Well just as i expected. Thats where the problem lies. If you do not mention the desired type as OTF, it is not a OTF data. Because of that the FM 'CONVERT_OTF_2_PDF' is not able to recognize it as OTF and hence throwing the error.
If you are not getting any data if you are passing the type as OTF, check if you have passed the parameters correctly. Unless the FM 'RSPO_RETURN_SPOOLJOB' returns OTF data, 'CONVERT_OTF_2_PDF' will not work.
Vikranth
2009 Nov 13 11:04 AM
As Vikranth say, the issue lies right here, but I want to know how do we convert the list output spool to OTF ??
Please someone let me know.
2009 Nov 13 11:08 AM
Hello,
If your ultimate aim is to convert spool to pdf why dont you directly use 'CONVERT_ABAPSPOOLJOB_2_PDF' ? Why do you want to have the extra headache of converting the spool to OTF and again OTF to PDF?
Vikranth
2009 Nov 13 11:10 AM
No Vikranth, I have several spools, not just one.
But i even tried with one spool, but still its giving me a message it is there in no SAP script found to convert.
So iam not able to use that too.
Let me know if you have a different solution
Edited by: Shobana k on Nov 13, 2009 12:16 PM
2009 Nov 13 10:09 AM
Take a look at [Combining Multiple Smartform Outputs Into One PDF File|http://www.sdn.sap.com/irj/scn/index;jsessionid=%28J2EE3414900%29ID1232261550DB10872201676046593938End?rid=/library/uuid/62ae7fcd-0b01-0010-3e9d-a54f26944450&overridelayout=true] in this wiki there are pieces of code you may copy to manage the OTF delimiters.
Regards,
Raymond
2009 Nov 13 10:20 AM
Hi,
To Convert Spool to PDF you can check the program RSTXPDF4. Still you are getting the same error then check for the the OSS notes.
Regards
Chandu
2009 Nov 13 10:29 AM
hai shobna,
Use CONVERT_OTFSPOOLJOB_2_PDF function For converting Spool data to PDF.
CALL FUNCTION 'CONVERT_OTFSPOOLJOB_2_PDF'
EXPORTING
src_spoolid = pRQIDENT "Spool Number
TABLES
pdf = pdf_data.Regards
Shelly Malik
2010 Aug 16 3:03 PM
2011 Aug 29 3:09 PM
2012 Jun 19 12:45 PM
Hi Shobana,
I am also facing the same problem can you please let me know how you fixed this issue.
I have several Spools, I just want to convert all the spools into a single PDF Format and that has to send via email.
Here i am facing the error like 'OTF end command // missing in OTF data".
Please let me know how you overcome this situation.
Thanks,
Siva
2012 Jun 19 1:24 PM
Hi Siva,
You just follow this code,
TABLES SFLIGHT.
SELECT-OPTIONS S_CARRID FOR SFLIGHT-CARRID.
DATA: it_otf TYPE STANDARD TABLE OF itcoo,
it_docs TYPE STANDARD TABLE OF docs,
it_lines TYPE STANDARD TABLE OF tline.
* Declaration of local variables.
DATA:
st_job_output_info TYPE ssfcrescl,
st_document_output_info TYPE ssfcrespd,
st_job_output_options TYPE ssfcresop,
st_output_options TYPE ssfcompop,
st_control_parameters TYPE ssfctrlop,
v_len_in TYPE so_obj_len,
v_language TYPE sflangu VALUE 'E',
v_e_devtype TYPE rspoptype,
v_bin_filesize TYPE i,
v_name TYPE string,
v_path TYPE string,
v_fullpath TYPE string,
v_filter TYPE string,
v_uact TYPE i,
v_guiobj TYPE REF TO cl_gui_frontend_services,
v_filename TYPE string,
v_fm_name TYPE rs38l_fnam.
CONSTANTS c_formname TYPE tdsfname VALUE 'ZTESTFORM'.
CALL FUNCTION 'SSF_GET_DEVICE_TYPE'
EXPORTING
i_language = v_language
i_application = 'SAPDEFAULT'
IMPORTING
e_devtype = v_e_devtype.
st_output_options-tdprinter = v_e_devtype.
st_control_parameters-no_dialog = 'X'.
st_control_parameters-getotf = 'X'.
*.................GET SMARTFORM FUNCTION MODULE NAME.................*
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = c_formname
IMPORTING
fm_name = v_fm_name
EXCEPTIONS
no_form = 1
no_function_module = 2
OTHERS = 3.
*...........................CALL SMARTFORM............................*
CALL FUNCTION v_fm_name
EXPORTING
control_parameters = st_control_parameters
output_options = st_output_options
IMPORTING
document_output_info = st_document_output_info
job_output_info = st_job_output_info
job_output_options = st_job_output_options
TABLES
so_carrid = S_CARRID
EXCEPTIONS
formatting_error = 1
internal_error = 2
send_error = 3
user_canceled = 4
OTHERS = 5.
*.........................CONVERT TO OTF TO PDF.......................*
CALL FUNCTION 'CONVERT_OTF_2_PDF'
IMPORTING
bin_filesize = v_bin_filesize
TABLES
otf = st_job_output_info-otfdata
doctab_archive = it_docs
lines = it_lines
EXCEPTIONS
err_conv_not_possible = 1
err_otf_mc_noendmarker = 2
OTHERS = 3.
CONCATENATE 'smrt' '.pdf' INTO v_name.
CREATE OBJECT v_guiobj.
CALL METHOD v_guiobj->file_save_dialog
EXPORTING
default_extension = 'pdf'
default_file_name = v_name
file_filter = v_filter
CHANGING
filename = v_name
path = v_path
fullpath = v_fullpath
user_action = v_uact.
IF v_uact = v_guiobj->action_cancel.
EXIT.
ENDIF.
*..................................DOWNLOAD AS FILE....................*
MOVE v_fullpath TO v_filename.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
bin_filesize = v_bin_filesize
filename = v_filename
filetype = 'BIN'
TABLES
data_tab = it_lines
EXCEPTIONS
file_write_error = 1
no_batch = 2
gui_refuse_filetransfer = 3
invalid_type = 4
no_authority = 5
unknown_error = 6
header_not_allowed = 7
separator_not_allowed = 8
filesize_not_allowed = 9
header_too_long = 10
dp_error_create = 11
dp_error_send = 12
dp_error_write = 13
unknown_dp_error = 14
access_denied = 15
dp_out_of_memory = 16
disk_full = 17
dp_timeout = 18
file_not_found = 19
dataprovider_exception = 20
control_flush_error = 21
OTHERS = 22.
2012 Jun 19 2:38 PM
Hi,
I just want to inform you one thing i am not using any smart form kind of a thing. Here we are running one standard report that is generating 6 spool files, what my requirement is to combine all the 6 spool files into one single PDF.
For that i am using a logic like convert individual spool into OTF and finally from OTF to PDF.
Kindly help me on this scenario.
Thanks,
Siva