While converting spool to PDF marathi character shown as symbolic in PDF
Hi guys,
I have requirement to send payslip via mail.i have developed program everything working well.get payslip,create spool and convert spool to pdf is working well.But issue is while converting spool into PDF then marathi character display like special symbols in PDF (in payslip emp.name , emp location,designation,department are in Marathi).
code as follow,
CALL FUNCTION 'GET_PAYSLIP'
EXPORTING
EMPLOYEE_NUMBER = WA-PERNR
SEQUENCE_NUMBER = WA_PC261-SEQNR
PAYSLIP_VARIANT = FORMULAR " 'ZN01'
IMPORTING
RETURN = RETURN
P_INFO = PINFO
TABLES
P_FORM = PFORM.
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
FORMNAME = 'ZHR_ESS_PAYSLIP_TO_PDF'
* VARIANT = ' '
* DIRECT_CALL = ' '
IMPORTING
FM_NAME = FNAME.
* EXCEPTIONS
* NO_FORM = 1
* NO_FUNCTION_MODULE = 2
* OTHERS = 3
IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
SF_CONTROL_PARAMETERS-DEVICE = 'PRINTER'.
SF_CONTROL_PARAMETERS-NO_DIALOG = 'X'.
SF_OUTPUT_OPTIONS-TDNEWID = 'X'.
SF_CONTROL_PARAMETERS-LANGU = SY-LANGU.
SF_OUTPUT_OPTIONS-TDDEST = 'LP01'.
* SF_OUTPUT_OPTIONS-tdprinter = 'PDFUC'.
CALL FUNCTION FNAME "'/1BCDWB/SF00000499'
EXPORTING
* ARCHIVE_INDEX =
* ARCHIVE_INDEX_TAB =
* ARCHIVE_PARAMETERS =
CONTROL_PARAMETERS = SF_CONTROL_PARAMETERS
* MAIL_APPL_OBJ =
* MAIL_RECIPIENT =
* MAIL_SENDER =
OUTPUT_OPTIONS = SF_OUTPUT_OPTIONS
USER_SETTINGS = ''
PINFO = PINFO
PFORM = PFORM
IMPORTING
* DOCUMENT_OUTPUT_INFO =
JOB_OUTPUT_INFO = JOB_OUTPUT_INFO
* JOB_OUTPUT_OPTIONS =
EXCEPTIONS
FORMATTING_ERROR = 1
INTERNAL_ERROR = 2
SEND_ERROR = 3
USER_CANCELED = 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.
IF JOB_OUTPUT_INFO-SPOOLIDS IS NOT INITIAL.
LOOP AT JOB_OUTPUT_INFO-SPOOLIDS INTO LV_SPOOL.
EXIT.
ENDLOOP.
REFRESH IT_TY_TAB_PDF.
CALL FUNCTION 'CONVERT_OTFSPOOLJOB_2_PDF'
EXPORTING
SRC_SPOOLID = LV_SPOOL
NO_DIALOG = ' '
TABLES
PDF = IT_TY_TAB_PDF
EXCEPTIONS
ERR_NO_OTF_SPOOLJOB = 1
ERR_NO_SPOOLJOB = 2
ERR_NO_PERMISSION = 3
ERR_CONV_NOT_POSSIBLE = 4
ERR_BAD_DSTDEVICE = 5
USER_CANCELLED = 6
ERR_SPOOLERROR = 7
ERR_TEMSEERROR = 8
ERR_BTCJOB_OPEN_FAILED = 9
ERR_BTCJOB_SUBMIT_FAILED = 10
ERR_BTCJOB_CLOSE_FAILED = 11
OTHERS = 12.
IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
APPEND LINES OF IT_TY_TAB_PDF TO IT_TY_TAB_PDF1..
Please guys help on this issue.its urgent.
i am doing this...
CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF'
EXPORTING
src_spoolid = l_spool_nr1
no_dialog = 'X'
dst_device = 'LOCL'
IMPORTING
pdf_bytecount = l_bytecount
LIST_PAGECOUNT = l_page1
TABLES
pdf = itab_pdf_output
EXCEPTIONS
err_no_abap_spooljob = 1
err_no_spooljob = 2
err_no_permission = 3
err_conv_not_possible = 4
err_bad_destdevice = 5
user_cancelled = 6
err_spoolerror = 7
err_temseerror = 8
err_btcjob_open_failed = 9
err_btcjob_submit_failed = 10
err_btcjob_close_failed = 11
OTHERS = 12.
now l_bytecount stores the total number of bytes in the internal table itab_pdf_output. The value of this differs when i run in foreground nad background seperately
Similar Messages
-
Data loss while converting spool to PDF in background
I am using CONVERT_ABAPSPOOLJOB_2_PDF to convert spool information to PDF.The bytecount in background is 1000 less than what i get by running the program forcibly in foregroud.I am very confused,any suggestions
i am doing this...
CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF'
EXPORTING
src_spoolid = l_spool_nr1
no_dialog = 'X'
dst_device = 'LOCL'
IMPORTING
pdf_bytecount = l_bytecount
LIST_PAGECOUNT = l_page1
TABLES
pdf = itab_pdf_output
EXCEPTIONS
err_no_abap_spooljob = 1
err_no_spooljob = 2
err_no_permission = 3
err_conv_not_possible = 4
err_bad_destdevice = 5
user_cancelled = 6
err_spoolerror = 7
err_temseerror = 8
err_btcjob_open_failed = 9
err_btcjob_submit_failed = 10
err_btcjob_close_failed = 11
OTHERS = 12.
now l_bytecount stores the total number of bytes in the internal table itab_pdf_output. The value of this differs when i run in foreground nad background seperately -
Converting spool of line width more than 850 char to PDF format in ECC 6.0.
Hello Experts.
I am facing problem while trying to convert a spool (generated from background scheduling of an ALV ) to PDF format in ECC 6.0.
The ALV has 45 columns. Using SAP note no 1226758 I am able to increase the spool width but when I am converting the spool to PDF using FM 'CONVERT_ABAPSPOOLJOB_2_PDF' the end caharacters are getting truncated .
Please reply ASAP . Any suggestion/Hint will be appreciated.
Thanks and Regards
Arvind Kumar YadavHi Aravind,
go to SPAD transaction --> and change the printer which supports more than 45 columnsand 256 cahracters..
according to the printer setting the output is created.
choose any below format TYPES...X_65_256/2
ABAP list: At least 65 lines 2*128=256 double columns (SAPLPD only)
see th following link for result..
<a class="jive_macro jive_macro_message" href="" __jive_macro_name="message" modifiedtitle="true" __default_attr="7318557"></a>
Regards,
Prabhudas -
While converting spool to PDF, no data is coming in the PDF file.
Hi All,
I am submitting a z program ZPR022_INNCOMETAX_REPORT_COPY1 (which has some output display) from Z_ITSLIP_MAIL. I am creating a job, submitting the above program via JOB to SAP-SPOOL.
In program ZPR022_INNCOMETAX_REPORT_COPY1 , I am getting the run time job information and from there I am getting the spool id. Now I am converting the spool id to a PDF. This PDF should contain the output of the program ZPR022_INNCOMETAX_REPORT_COPY1. This output is normal output using Write statement only. But once the program is executed, I could find no data in the PDF file. When I check in SM37 and SP02, both the JOB and the SPOOL are created. What I feel is the program is not picking the spool id at the run time. Could any one help me in this regard how to proceed.
Please find the code below.
Program 1.
LOOP AT pernr.
CLEAR p_job.
p_stim = p_stim + 120.
CONCATENATE'ITSlip' pernr-low p_job sy-datum INTO p_job SEPARATED BY
space.
CALL FUNCTION 'JOB_OPEN'
EXPORTING
jobname = p_job
sdlstrtdt = p_sdat
sdlstrttm = p_stim
IMPORTING
jobcount = l_jobcount.
SUBMIT ZPR022_INNCOMETAX_REPORT_COPY1
WITH pnptimr6 = 'X'
WITH pnpbegda = period-low
WITH pnpendda = period-high
WITH pnppernr-low = pernr-low
WITH pnpabkrs-low = 'IN'
VIA JOB p_job
NUMBER l_jobcount
TO SAP-SPOOL WITHOUT SPOOL DYNPRO
SPOOL PARAMETERS ls_params
WITH immediately = 'X'
KEEP IN SPOOL = 'X'
AND RETURN.
CALL FUNCTION 'JOB_CLOSE'
EXPORTING
jobcount = l_jobcount
jobname = p_job
strtimmed = 'X'
PRDMINS = 2.
sdlstrtdt = p_sdat
sdlstrttm = p_stim.
ENDLOOP.
Program 2.
IF sy-batch EQ 'X'.
LOOP AT pnppernr.
SELECT SINGLE * FROM pa0105
WHERE pernr EQ pnppernr-low
AND subty EQ '0010'
AND endda EQ '99991231'.
p_email1 = pa0105-usrid_long..
PERFORM get_job_details.
PERFORM obtain_spool_id.
PERFORM convert_spool_to_pdf.
PERFORM process_email.
IF sy-sysid = c_dev.
WAIT UP TO 5 SECONDS.
SUBMIT rsconn01 WITH mode = 'INT'
WITH output = 'X'
AND RETURN.
ENDIF.
ENDLOOP.
ELSE.
SKIP.
WRITE:/ 'Program must be executed in background in-order for spool'
'request to be created.'.
EXPORT gd_spool_nr TO MEMORY ID 'SPOOLTOPDF'.
ENDIF.
ENDFORM. " SEND_MAIL
*& Form get_job_details
text
--> p1 text
<-- p2 text
FORM get_job_details .
Get current job details
CALL FUNCTION 'GET_JOB_RUNTIME_INFO'
IMPORTING
eventid = gd_eventid
eventparm = gd_eventparm
external_program_active = gd_external_program_active
jobcount = gd_jobcount
jobname = gd_jobname
stepcount = gd_stepcount
EXCEPTIONS
no_runtime_info = 1
OTHERS = 2.
ENDFORM. " get_job_details
*& Form obtain_spool_id
text
--> p1 text
<-- p2 text
FORM obtain_spool_id .
CHECK NOT ( gd_jobname IS INITIAL ).
CHECK NOT ( gd_jobcount IS INITIAL ).
SELECT * FROM tbtcp
INTO TABLE it_tbtcp
WHERE jobname = gd_jobname
AND jobcount = gd_jobcount
AND stepcount = gd_stepcount
AND listident <> '0000000000'
ORDER BY jobname
jobcount
stepcount.
READ TABLE it_tbtcp INTO wa_tbtcp INDEX 1.
IF sy-subrc = 0.
MESSAGE s004(zdd) WITH gd_spool_nr.
gd_spool_nr = wa_tbtcp-listident.
MESSAGE s004(zdd) WITH gd_spool_nr.
ELSE.
MESSAGE s005(zdd).
ENDIF.
ENDFORM. " obtain_spool_id
*& Form convert_spool_to_pdf
text
--> p1 text
<-- p2 text
FORM convert_spool_to_pdf .
CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF'
EXPORTING
src_spoolid = gd_spool_nr
no_dialog = c_no
dst_device = c_device
IMPORTING
pdf_bytecount = gd_bytecount
TABLES
pdf = it_pdf_output
EXCEPTIONS
err_no_abap_spooljob = 1
err_no_spooljob = 2
err_no_permission = 3
err_conv_not_possible = 4
err_bad_destdevice = 5
user_cancelled = 6
err_spoolerror = 7
err_temseerror = 8
err_btcjob_open_failed = 9
err_btcjob_submit_failed = 10
err_btcjob_close_failed = 11
OTHERS = 12.
CHECK sy-subrc = 0.
Transfer the 132-long strings to 255-long strings
LOOP AT it_pdf_output.
TRANSLATE it_pdf_output USING ' ~'.
CONCATENATE gd_buffer it_pdf_output INTO gd_buffer.
ENDLOOP.
TRANSLATE gd_buffer USING '~ '.
DO.
it_mess_att = gd_buffer.
APPEND it_mess_att.
SHIFT gd_buffer LEFT BY 255 PLACES.
IF gd_buffer IS INITIAL.
EXIT.
ENDIF.
ENDDO.
ENDFORM. " convert_spool_to_pdf
*& Form process_email
text
--> p1 text
<-- p2 text
FORM process_email .
DESCRIBE TABLE it_mess_att LINES gd_recsize.
CHECK gd_recsize > 0.
PERFORM send_email USING p_email1.
ENDFORM. "process_email
FORM send_email USING p_email.
CHECK NOT ( p_email IS INITIAL ).
REFRESH it_mess_bod.
Default subject matter
gd_subject = 'Subject'.
gd_attachment_desc = 'IT Declaration'.
CONCATENATE 'ITSLIP' ' ' INTO gd_attachment_name.
it_mess_bod = 'IT FORM for this month'.
APPEND it_mess_bod.
it_mess_bod = 'Message Body text, line 2...'.
APPEND it_mess_bod.
If no sender specified - default blank
IF p_sender EQ space.
gd_sender_type = space.
ELSE.
gd_sender_type = 'INT'.
ENDIF.
Send file by email as .xls speadsheet
PERFORM send_file_as_email_attachment
TABLES it_mess_bod
it_mess_att
USING p_email1
'MindTree Payroll team'
'PDF'
gd_attachment_name
gd_attachment_desc
p_sender
gd_sender_type
CHANGING gd_error
gd_reciever.
ENDFORM. " process_email
*& Form send_file_as_email_attachment
text
-->P_IT_MESS_BOD text
-->P_IT_MESS_ATT text
-->P_P_EMAIL text
-->P_4422 text
-->P_4423 text
-->P_GD_ATTACHMENT_NAME text
-->P_GD_ATTACHMENT_DESC text
-->P_P_SENDER text
-->P_GD_SENDER_TYPE text
<--P_GD_ERROR text
<--P_GD_RECIEVER text
FORM send_file_as_email_attachment TABLES it_message
it_attach
USING p_email
p_mtitle
p_format
p_filename
p_attdescription
p_sender_address
p_sender_addres_type
CHANGING p_error
p_reciever.
DATA: ld_error TYPE sy-subrc,
ld_reciever TYPE sy-subrc,
ld_mtitle LIKE sodocchgi1-obj_descr,
ld_email LIKE somlreci1-receiver,
ld_format TYPE so_obj_tp ,
ld_attdescription TYPE so_obj_nam ,
ld_attfilename TYPE so_obj_des ,
ld_sender_address LIKE soextreci1-receiver,
ld_sender_address_type LIKE soextreci1-adr_typ,
ld_receiver LIKE sy-subrc.
DATA: t_packing_list LIKE sopcklsti1 OCCURS 0 WITH HEADER LINE,
t_contents LIKE solisti1 OCCURS 0 WITH HEADER LINE,
t_receivers LIKE somlreci1 OCCURS 0 WITH HEADER LINE,
t_attachment LIKE solisti1 OCCURS 0 WITH HEADER LINE,
t_object_header LIKE solisti1 OCCURS 0 WITH HEADER LINE,
w_cnt TYPE i,
w_sent_all(1) TYPE c,
w_doc_data LIKE sodocchgi1.
ld_email = p_email.
ld_mtitle = p_mtitle.
ld_format = p_format.
ld_attdescription = p_attdescription.
ld_attfilename = p_filename.
ld_sender_address = p_sender_address.
ld_sender_address_type = p_sender_addres_type.
Fill the document data.
w_doc_data-doc_size = 1.
Populate the subject/generic message attributes
w_doc_data-obj_langu = sy-langu.
w_doc_data-obj_name = 'SAPRPT'.
w_doc_data-obj_descr = ld_mtitle .
w_doc_data-sensitivty = 'F'.
Fill the document data and get size of attachment
CLEAR w_doc_data.
READ TABLE it_attach INDEX w_cnt.
w_doc_data-doc_size =
( w_cnt - 1 ) * 255 + STRLEN( it_attach ).
w_doc_data-obj_langu = sy-langu.
w_doc_data-obj_name = 'SAPRPT'.
w_doc_data-obj_descr = ld_mtitle.
w_doc_data-sensitivty = 'F'.
CLEAR t_attachment.
REFRESH t_attachment.
t_attachment[] = it_attach[].
Describe the body of the message
CLEAR t_packing_list.
REFRESH t_packing_list.
t_packing_list-transf_bin = space.
t_packing_list-head_start = 1.
t_packing_list-head_num = 0.
t_packing_list-body_start = 1.
DESCRIBE TABLE it_message LINES t_packing_list-body_num.
t_packing_list-doc_type = 'RAW'.
APPEND t_packing_list.
Create attachment notification
t_packing_list-transf_bin = 'X'.
t_packing_list-head_start = 1.
t_packing_list-head_num = 1.
t_packing_list-body_start = 1.
DESCRIBE TABLE t_attachment LINES t_packing_list-body_num.
t_packing_list-doc_type = ld_format.
t_packing_list-obj_descr = ld_attdescription.
t_packing_list-obj_name = ld_attfilename.
t_packing_list-doc_size = t_packing_list-body_num * 255.
APPEND t_packing_list.
Add the recipients email address
CLEAR t_receivers.
REFRESH t_receivers.
t_receivers-receiver = ld_email.
t_receivers-rec_type = 'U'.
t_receivers-com_type = 'INT'.
t_receivers-notif_del = 'X'.
t_receivers-notif_ndel = 'X'.
APPEND t_receivers.
CALL FUNCTION 'SO_DOCUMENT_SEND_API1'
EXPORTING
document_data = w_doc_data
put_in_outbox = 'X'
sender_address = ld_sender_address
sender_address_type = ld_sender_address_type
commit_work = 'X'
IMPORTING
sent_to_all = w_sent_all
TABLES
packing_list = t_packing_list
contents_bin = t_attachment
contents_txt = t_attachment
contents_txt = it_message
receivers = t_receivers
EXCEPTIONS
too_many_receivers = 1
document_not_sent = 2
document_type_not_exist = 3
operation_no_authorization = 4
parameter_error = 5
x_error = 6
enqueue_error = 7
OTHERS = 8.
Populate zerror return code
ld_error = sy-subrc.
Populate zreceiver return code
LOOP AT t_receivers.
ld_receiver = t_receivers-retrn_code.
ENDLOOP.
ENDFORM. "send_file_as_email_attachment
Points will be rewarded.
Regards,
BalajiHi,
I think you are retrieving the spool before the entire spool is generated.
Put the following logic to retrieve spool iD
CHECK WHETHER STATUS OF JOB IS COMPLETED OR CANCELLED
WHILE 1 = 1.
GET THE JOB STEPLIST WHICH HAS THE SPOOL NUMBER
CALL FUNCTION 'BP_JOB_READ'
EXPORTING
job_read_jobcount = w_jobcount
job_read_jobname = w_jobname
job_read_opcode = '35'
JOB_STEP_NUMBER =
IMPORTING
job_read_jobhead = wa_jobhead
TABLES
job_read_steplist = i_jobsteplist
CHANGING
RET =
EXCEPTIONS
invalid_opcode = 1
job_doesnt_exist = 2
job_doesnt_have_steps = 3
OTHERS = 4
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
BEGIN OF INSERTION U179942 E1BK928781
IF STATUS OF JOB IS COMPLETED(F) OR CANCELLED(A)
READ THE JOBSTEPLIST & GET THE SPOOL NUMBER
IF wa_jobhead-status = c_a OR wa_jobhead-status = c_f.
READ TABLE i_jobsteplist INTO wa_jobsteplist INDEX 1.
CHECK wa_jobsteplist-listident <> space.
w_spool_number = wa_jobsteplist-listident.
EXIT.
ENDIF.
ENDWHILE.
Best regards,
Prashant -
Problem while converting Spool to PDF
Hi,
I am sending ALV report output to Spool then converting the Spool to PDF using 'CONVERT_ABAPSPOOLJOB_2_PDF'.
I am able to send the mail but in the PDF, the first page contains data statistics(no. of records passed) but I want to supress it. I need to get my Actual output only.
Please help me regarding this.
Thanks,
SwathiYou need to set the print parameter of the ALV to avoid the statistics in the Spool.
Like:
data: ls_prnt type slis_print_alv.
ls_prnt-NO_PRINT_LISTINFOS = 'X'.
call function 'REUSE_ALV_GRID_DISPLAY'
is_print = ls_prnt
Regards,
Naimesh Patel -
Page format problem while converting spool job to PDF file
Hi,
I convert the sapscript from spoollist to pdf with the FM CONVERT _ OTFSPOOLJOB _ 2 _ PDF giving the spool id but I can not get the file properly. It adds a raigth margin to the PDF file.
Should I call aany other FM to format the PDF file ?
Thanks.
Utku.Hi,
I have executed the report and the PDF file has the right margin.
In the properties of PDF file it says PDF version 1.3 (Acrobat 4.x) and Page Size 11.69 in x 11.69 in
Also I open the PDF file with Acrobat 5.0
Thanks.
Utku. -
How to Convert spool which is for smartform output to PDF?
how to Convert spool which is for smartform output to PDF?
CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF' is not working for smartform output,
if i use this there will be error spool not contain list output?
than whats the function module or way to convert spool contain smartform output to pdg?
regards,<b>Procedure</b>
When we activate the Smartform the system generates a Function Module. The function module name we can get from Smartfrom screen from menubar
Environment => Function Module_Name . In a report we can get this Function module name by calling a Function Module standard SSF_FUNCTION_MODULE_NAME. This function module at runtime calls the FM generated by smartform, which in turn is then used to pass data from the report to Smartform. In the report given below the FM generated is /1BCDWB/SF00000152 . In this FM we can see CONTROL_PARAMETERS in import tab. This is of type SSFCTRLOP. We need to set the GETOTF of this to be X. Setting this field will activate the OTF field in smartform.
In export tab of the FM generated by smartform we can see a parameter JOB_OUTPUT_INFO which is of type SSFCRESCL. The SSFCRESCL is a structure of having one of fields as OTFDATA. OTFDATA in turn is a table of type ITCOO. ITCOO has two fields TDPRINTCOM and TDPRINTPAR. TDPRINTCOM represents command line of OTF format data and TDPRINTPAR contains command parameters of OTF format data.
In every Smartform output in OTF format, TDPRINTCOM begins and ends with //. EP represents the end-of-page value for TDPRINTCOM field.
In addition we need to set few fields at the place where we call this FM(generated by smartform) in our program. While calling this FM we should set control_parameters, output_options, user_settings and job_putput_info fields as shown in program.
Once these settings are done we can call Function Module CONVERT_OTF to convert the OTF data of smartfrom output to PDF data format. Once these are done we can call method cl_gui_fronted_services=>file_save_dialog to specify the directory path where we want to save the output PDF file. After this we can call Function Module GUI_DOWNLOAD to download the PDF file on our local system.
<b>Here is a sample code of program to perform the function.</b>
SAMPLE CODE
[code]*&---------------------------------------------------------------------*
*& Report ZAMIT_SMART_FORM_PDF *
REPORT ZAMIT_SMART_FORM_PDF .
data: carr_id type sbook-carrid,
cparam type ssfctrlop,
outop type ssfcompop,
fm_name type rs38l_fnam.
DATA: tab_otf_data TYPE ssfcrescl,
pdf_tab LIKE tline OCCURS 0 WITH HEADER LINE,
tab_otf_final TYPE itcoo OCCURS 0 WITH HEADER LINE,
file_size TYPE i,
bin_filesize TYPE i,
FILE_NAME type string,
File_path type string,
FULL_PATH type string.
parameter: p_custid type scustom-id default 1.
select-options: s_carrid for carr_id default 'LH' to 'LH'.
parameter: p_form type tdsfname default 'ZAMIT_SMART_FORM'.
data: customer type scustom,
bookings type ty_bookings,
connections type ty_connections.
start-of-selection.
***************** suppressing the dialog box for print preview****************************
outop-tddest = 'LP01'.
cparam-no_dialog = 'X'.
cparam-preview = SPACE.
cparam-getotf = 'X'.
select single * from scustom into customer where id = p_custid.
check sy-subrc = 0.
select * from sbook into table bookings
where customid = p_custid
and carrid in s_carrid
order by primary key.
select * from spfli into table connections
for all entries in bookings
where carrid = bookings-carrid
and connid = bookings-connid
order by primary key.
call function 'SSF_FUNCTION_MODULE_NAME'
exporting formname = p_form
* variant = ' '
* direct_call = ' '
importing fm_name = fm_name
exceptions no_form = 1
no_function_module = 2
others = 3.
if sy-subrc <> 0.
message id sy-msgid type sy-msgty number sy-msgno
with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
exit.
endif.
* calling the generated function module
call function fm_name
exporting
* archive_index =
* archive_parameters =
control_parameters = cparam
* mail_appl_obj =
* mail_recipient =
* mail_sender =
output_options = outop
user_settings = SPACE
bookings = bookings
customer = customer
connections = connections
importing
* document_output_info =
job_output_info = tab_otf_data
* job_output_options =
exceptions formatting_error = 1
internal_error = 2
send_error = 3
user_canceled = 4
others = 5.
if sy-subrc <> 0.
* error handling
message id sy-msgid type sy-msgty number sy-msgno
with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
endif.
tab_otf_final[] = tab_otf_data-otfdata[].
CALL FUNCTION 'CONVERT_OTF'
EXPORTING
format = 'PDF'
max_linewidth = 132
* ARCHIVE_INDEX = ' '
* COPYNUMBER = 0
* ASCII_BIDI_VIS2LOG = ' '
IMPORTING
bin_filesize = bin_filesize
* BIN_FILE =
TABLES
otf = tab_otf_final
lines = pdf_tab
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 METHOD cl_gui_frontend_services=>file_save_dialog
* EXPORTING
* WINDOW_TITLE =
* DEFAULT_EXTENSION =
* DEFAULT_FILE_NAME =
* FILE_FILTER =
* INITIAL_DIRECTORY =
* WITH_ENCODING =
* PROMPT_ON_OVERWRITE = 'X'
CHANGING
filename = FILE_NAME
path = FILE_PATH
fullpath = FULL_PATH
* USER_ACTION =
* FILE_ENCODING =
* EXCEPTIONS
* CNTL_ERROR = 1
* ERROR_NO_GUI = 2
* NOT_SUPPORTED_BY_GUI = 3
* others = 4
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
*************downloading the converted PDF data to your local PC********
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
bin_filesize = bin_filesize
filename = FULL_PATH
filetype = 'BIN'
* APPEND = ' '
* WRITE_FIELD_SEPARATOR = ' '
* HEADER = '00'
* TRUNC_TRAILING_BLANKS = ' '
* WRITE_LF = 'X'
* COL_SELECT = ' '
* COL_SELECT_MASK = ' '
* DAT_MODE = ' '
* CONFIRM_OVERWRITE = ' '
* NO_AUTH_CHECK = ' '
* CODEPAGE = ' '
* IGNORE_CERR = ABAP_TRUE
* REPLACEMENT = '#'
* WRITE_BOM = ' '
* TRUNC_TRAILING_BLANKS_EOL = 'X'
IMPORTING
filelength = file_size
TABLES
data_tab = pdf_tab
* FIELDNAMES =
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
IF sy-subrc <> 0.
ENDIF.
[/code]
Thanks and Regards,
Pavankumar -
Error while converting smartform output to pdf
hi
while converting smartform output to pdf error occured otf data not founr.
regarding code is as follows:
otfitab = i_job_output_info-otfdata.
CALL FUNCTION 'CONVERT_OTF_2_PDF'
EXPORTING
USE_OTF_MC_CMD = 'X'
ARCHIVE_INDEX =
IMPORTING
bin_filesize = l_pdf_len
TABLES
otf = otfitab
doctab_archive = t_docs_tab
lines = pdfitab
EXCEPTIONS
ERR_CONV_NOT_POSSIBLE = 1
ERR_OTF_MC_NOENDMARKER = 2
OTHERS = 3
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
rest all declarations are up to date.
thanks in advance..........Hi Mayank,
I am not sure if u know this already, we can convert the spool ouput to PDF
by using the program RSTXPDFT4.
Regards,
Vivek -
URGENT ----- Problem in converting spool to pdf .
Error - File cannot be opened because of no pages ......
Hi experts,
I am passing internal table contents to spool --> then spool to pdf -
> then mail sending.
Everything is fine but only error is in the receiving mail the above error is coming.
given the code...
<b>I think the error is in converting into pdf function module</b>
<b>Help me to solve this problem as it is very urgent</b>
include data_declare. " pasted down
select * from kna1 into table itab up to 50 rows.
CALL FUNCTION 'RSPO_OPEN_SPOOLREQUEST'
EXPORTING
dest = 'LP01'
immediate_print = 'X'
IMPORTING
handle = handle
SPOOLID = spoolid.
loop at itab.
concatenate itab-kunnr itab-name1 itab-land1 into text separated by
space.
CALL FUNCTION 'RSPO_WRITE_SPOOLREQUEST'
EXPORTING
handle = handle
text = text.
endloop.
CALL FUNCTION 'RSPO_CLOSE_SPOOLREQUEST'
EXPORTING
handle = handle.
Convert Spool to PDF **********************************
<b>CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF'
EXPORTING
src_spoolid = spoolid "gd_spool_nr
no_dialog = c_no
dst_device = c_device
IMPORTING
pdf_bytecount = gd_bytecount
TABLES
pdf = it_pdf_output
EXCEPTIONS
err_no_abap_spooljob = 1
err_no_spooljob = 2
err_no_permission = 3
err_conv_not_possible = 4
err_bad_destdevice = 5
user_cancelled = 6
err_spoolerror = 7
err_temseerror = 8
err_btcjob_open_failed = 9
err_btcjob_submit_failed = 10
err_btcjob_close_failed = 11
OTHERS = 12.
CHECK sy-subrc = 0.
Transfer the 132-long strings to 255-long strings
LOOP AT it_pdf_output.
TRANSLATE it_pdf_output USING ' ~'.
CONCATENATE gd_buffer it_pdf_output INTO gd_buffer.
ENDLOOP.
TRANSLATE gd_buffer USING '~ '.
DO.
it_mess_att = gd_buffer.
APPEND it_mess_att.
SHIFT gd_buffer LEFT BY 255 PLACES.
IF gd_buffer IS INITIAL.
EXIT.
ENDIF.
ENDDO.</b>
Processing Mail Sending ************************************
DATA: p_email LIKE somlreci1-receiver,
p_sender LIKE somlreci1-receiver,
sub(40).
DESCRIBE TABLE it_mess_att LINES gd_recsize.
CHECK gd_recsize > 0.
REFRESH it_mess_bod.
Default subject matter
gd_subject = 'Subject'.
gd_attachment_desc = text-002.
it_mess_bod = text-001.
APPEND it_mess_bod.
IF p_sender EQ space.
gd_sender_type = space.
ELSE.
gd_sender_type = 'INT'.
ENDIF.
MOVE 'Orders Rejeced on' TO sub.
WRITE: sy-datum DD/MM/YYYY TO sub+27(10).
Send file by email as .xls speadsheet
PERFORM send_file_as_email_attachment
TABLES it_mess_bod
it_mess_att
USING
p_email
sub "text-009
'PDF'
gd_attachment_name
gd_attachment_desc
p_sender
gd_sender_type
CHANGING gd_error
gd_reciever.
ENDFORM. " process_email
*& Form send_file_as_email_attachment
text
-->P_IT_MESS_BOD text
-->P_IT_MESS_ATT text
-->P_TEXT_009 text
-->P_1058 text
-->P_GD_ATTACHMENT_NAME text
-->P_GD_ATTACHMENT_DESC text
<--P_GD_ERROR text
<--P_GD_RECIEVER text
FORM send_file_as_email_attachment TABLES it_message
it_attach
USING
p_email
p_mtitle
p_format
p_filename
p_attdescription
p_sender_address
p_sender_addres_type
CHANGING p_error
p_reciever.
DATA: ld_error TYPE sy-subrc,
ld_reciever TYPE sy-subrc,
ld_mtitle LIKE sodocchgi1-obj_descr,
ld_email LIKE somlreci1-receiver,
ld_format TYPE so_obj_tp ,
ld_attdescription TYPE so_obj_nam ,
ld_attfilename TYPE so_obj_des ,
ld_sender_address LIKE soextreci1-receiver,
ld_sender_address_type LIKE soextreci1-adr_typ,
ld_receiver LIKE sy-subrc.
DATA: t_packing_list LIKE sopcklsti1 OCCURS 0 WITH HEADER LINE,
t_contents LIKE solisti1 OCCURS 0 WITH HEADER LINE,
t_receivers LIKE somlreci1 OCCURS 0 WITH HEADER LINE,
t_attachment LIKE solisti1 OCCURS 0 WITH HEADER LINE,
t_object_header LIKE solisti1 OCCURS 0 WITH HEADER LINE,
w_cnt TYPE i,
w_sent_all(1) TYPE c,
w_doc_data LIKE sodocchgi1.
ld_email = p_email.
ld_mtitle = p_mtitle.
ld_format = p_format.
ld_attdescription = p_attdescription.
ld_attfilename = p_filename.
ld_sender_address = p_sender_address.
ld_sender_address_type = p_sender_addres_type.
Fill the document data.
w_doc_data-doc_size = 1.
Populate the subject/generic message attributes
w_doc_data-obj_langu = sy-langu.
w_doc_data-obj_name = 'SAPRPT'.
w_doc_data-obj_descr = ld_mtitle .
w_doc_data-sensitivty = 'F'.
Fill the document data and get size of attachment
CLEAR w_doc_data.
READ TABLE it_attach INDEX w_cnt.
w_doc_data-doc_size =
( w_cnt - 1 ) * 255 + STRLEN( it_attach ).
w_doc_data-obj_langu = sy-langu.
w_doc_data-obj_name = 'SAPRPT'.
w_doc_data-obj_descr = ld_mtitle.
w_doc_data-sensitivty = 'F'.
CLEAR t_attachment.
REFRESH t_attachment.
t_attachment[] = it_attach[].
Describe the body of the message
CLEAR t_packing_list.
REFRESH t_packing_list.
t_packing_list-transf_bin = space.
t_packing_list-head_start = 1.
t_packing_list-head_num = 0.
t_packing_list-body_start = 1.
DESCRIBE TABLE it_message LINES t_packing_list-body_num.
t_packing_list-doc_type = 'RAW'.
APPEND t_packing_list.
Create attachment notification
t_packing_list-transf_bin = 'X'.
t_packing_list-head_start = 1.
t_packing_list-head_num = 1.
t_packing_list-body_start = 1.
DESCRIBE TABLE t_attachment LINES t_packing_list-body_num.
t_packing_list-doc_type = ld_format.
t_packing_list-obj_descr = ld_attdescription.
t_packing_list-obj_name = ld_attfilename.
t_packing_list-doc_size = t_packing_list-body_num * 255.
APPEND t_packing_list.
Add the recipients email address
CLEAR t_receivers.
REFRESH t_receivers.
t_receivers-rec_type = 'U'.
t_receivers-com_type = 'INT'.
t_receivers-notif_del = 'X'.
t_receivers-notif_ndel = 'X'.
CLEAR gt_mail.
SELECT SINGLE * FROM zmail INTO gt_mail
WHERE grpnr = '1'.
IF NOT gt_mail-mail1 IS INITIAL.
t_receivers-receiver = gt_mail-mail1.
APPEND t_receivers.
ENDIF.
IF NOT gt_mail-mail2 IS INITIAL.
t_receivers-receiver = gt_mail-mail2.
APPEND t_receivers.
ENDIF.
IF NOT gt_mail-mail3 IS INITIAL.
t_receivers-receiver = gt_mail-mail3.
APPEND t_receivers.
ENDIF.
IF NOT gt_mail-mail4 IS INITIAL.
t_receivers-receiver = gt_mail-mail4.
APPEND t_receivers.
ENDIF.
LOOP AT gt_mail.
t_receivers-receiver = gt_mail-mailid..
APPEND t_receivers.
ENDLOOP.
CALL FUNCTION 'SO_DOCUMENT_SEND_API1'
EXPORTING
document_data = w_doc_data
put_in_outbox = 'X'
sender_address = ld_sender_address
sender_address_type = ld_sender_address_type
commit_work = 'X'
IMPORTING
sent_to_all = w_sent_all
TABLES
packing_list = t_packing_list
contents_bin = t_attachment
contents_txt = it_message
receivers = t_receivers
EXCEPTIONS
too_many_receivers = 1
document_not_sent = 2
document_type_not_exist = 3
operation_no_authorization = 4
parameter_error = 5
x_error = 6
enqueue_error = 7
OTHERS = 8.
Populate zerror return code
ld_error = sy-subrc.
Populate zreceiver return code
LOOP AT t_receivers.
ld_receiver = t_receivers-retrn_code.
ENDLOOP.
ENDFORM. " send_file_as_email_attachment
Data Declaration ************************************
DATA : handle LIKE sy-tabix.
data itab like kna1 occurs 0 with header line.
data: text(50) type c.
data: spoolid type TSP01-RQIDENT.
DATA : gt_listobject LIKE abaplist OCCURS 10 .
DATA : gt_objcont LIKE soli OCCURS 10 WITH HEADER LINE.
DATA : gt_objcont1 LIKE soli OCCURS 10 WITH HEADER LINE.
DATA : gt_objhead LIKE soli OCCURS 10 WITH HEADER LINE.
DATA : gt_att_head LIKE soli OCCURS 10 WITH HEADER LINE.
DATA : gt_receivers LIKE soos1 OCCURS 10 WITH HEADER LINE.
DATA : gt_packing_list LIKE soxpl OCCURS 10 WITH HEADER LINE.
DATA : gt_so_ali LIKE soli OCCURS 100 WITH HEADER LINE.
DATA : gt_so_ali1 LIKE soli OCCURS 100 WITH HEADER LINE.
DATA : gt_document_data LIKE sood1.
DATA: lineno TYPE i , length TYPE i , size TYPE i.
DATA: gt_message LIKE soli OCCURS 10 WITH HEADER LINE,
gt_message1 LIKE soli OCCURS 10 WITH HEADER LINE.
DATA: gt_scheme LIKE ztrc_scheme OCCURS 0 WITH HEADER LINE,
gt_mail LIKE zmail_prov OCCURS 0 WITH HEADER LINE.
gt_mail LIKE zmail." occurs 0 with header line.
DATA: gd_recsize TYPE i.
Spool IDs
TYPES: BEGIN OF t_tbtcp.
INCLUDE STRUCTURE tbtcp.
TYPES: END OF t_tbtcp.
DATA: it_tbtcp TYPE STANDARD TABLE OF t_tbtcp INITIAL SIZE 0,
wa_tbtcp TYPE t_tbtcp.
Job Runtime Parameters
DATA: gd_eventid LIKE tbtcm-eventid,
gd_eventparm LIKE tbtcm-eventparm,
gd_external_program_active LIKE tbtcm-xpgactive,
gd_jobcount LIKE tbtcm-jobcount,
gd_jobname LIKE tbtcm-jobname,
gd_stepcount LIKE tbtcm-stepcount,
gd_error TYPE sy-subrc,
gd_reciever TYPE sy-subrc.
DATA: w_recsize TYPE i.
DATA: gd_subject LIKE sodocchgi1-obj_descr,
it_mess_bod LIKE solisti1 OCCURS 0 WITH HEADER LINE,
it_mess_att LIKE solisti1 OCCURS 0 WITH HEADER LINE,
gd_sender_type LIKE soextreci1-adr_typ,
gd_attachment_desc TYPE so_obj_nam,
gd_attachment_name TYPE so_obj_des.
Spool to PDF conversions
DATA: gd_spool_nr LIKE tsp01-rqident,
gd_destination LIKE rlgrap-filename,
gd_bytecount LIKE tst01-dsize,
gd_buffer TYPE string.
Binary store for PDF
DATA: BEGIN OF it_pdf_output OCCURS 0.
INCLUDE STRUCTURE tline.
DATA: END OF it_pdf_output.
CONSTANTS: c_dev LIKE sy-sysid VALUE 'DEV',
c_no(1) TYPE c VALUE ' ',
c_device(4) TYPE c VALUE 'LOCL'.
DATA: check TYPE c,
days TYPE i.
<b></b><b></b><b></b>Hi Prashant,
Thanks for your reply. Really it is very useful one.
In this, the output list is getting populated into spool and to pdf.
But my requirement sending the internal table contents to spool directly without dispalying in the output list.
I did the program like the above mentioned one already. But my requirement is not that one.
Regards
chakradhar -
Error: EXOpenExport() while converting xlsb file to PDF
I am getting this error while converting .XLSB file to PDF using IBR :Step PDFExport forced conversion failure by conversion engine because of error: EXOpenExport() failed: no filter available for this file type (0x0004). Can anyone tell me how to resolve this issue.
Thanks in advance.Thank you for all your intrest.
The error message I get is... "an unexpected error occured. PDFMaker was unable to process the request".
When I then try to convert again, the system opens the ppt, but then does not do anything, and the error message does not show, for all presentations I try to convert.
I have also tried using the ribbon, but the button does not do anything once I have clicked.
I can print to PDF, but this provides an output which is not suitable, because it shows as if it each slide was printed on to paper and then put in PDF.
I have also uninstalled and reinstalled Acrobat to make sure nothing was corrupt. -
Error while converting Image -to- PDF and then to PDF/A
Hi,
I'm trying to convert a Image format(JPEG,bmp,tiff) to PDF and then to PDF/A. I could able to convert Image to PDF successfully.
I'm getting the below error while converting the PDF(that was generated) to PDF/A.
Caused by: com.adobe.livecycle.output.exception.OutputException: Input Document is a already flat PDF Document
at com.adobe.printSubmitter.PrintServer.transformPDF(PrintServer.java:307)
at com.adobe.printSubmitter.service.OutputServiceImpl.transformPDFInTxn(OutputServiceImpl.ja va:518)
at com.adobe.printSubmitter.service.OutputServiceImpl$4.doInTransaction(OutputServiceImpl.ja va:481)
... 106 more
Error OCCURRED: ALC-DSC-000-000: com.adobe.idp.dsc.DSCException: Internal error.
Please give me the solution to convert PDF to PDF/A?I've just read a footnote in the API documentation which indicates that the transformPDF function cannot be used for this purpose:
"GS_Enterprise said on Nov 24, 2007 at 12:03 PM :
Please note that the parameter "inPdfDoc" for transformPDF assumes that the stream content is an XFA-based PDF, and that it's not an XFA-based PDF with a PDF background (also known as "XFA foreground"). In other words, this function does not convert any input PDF to PDF/A, but only those PDFs generated from an XFA template which does not include any static PDF content as a background." -
Problem in converting Spool Request into PDF format
Hi,
I am facing problem to convert spool request (which store output of sap script) in to PDF format. Actually I have converted it with function module 'CONVERT_OTFSPOOLJOB_2_PDF' and it is working properly but the problem occurs where the BOLD fonts are used. I am unable to see the Text/Address where i have used Bold Font in script (PDF FORMAT). Even though in (SPO1) spool request shows every thing perfectly (along with Bold Font). It will great if you could suggest me something.
Thanks,
PradeepHi Pradeep,
Use ,
Closing the Sapscript, we save data (OTF) in a table
CALL FUNCTION 'CLOSE_FORM'
TABLES
otfdata = t_otfdata
EXCEPTIONS
unopened = 1
bad_pageformat_for_print = 2
send_error = 3
spool_error = 4
OTHERS = 5.
DATA: BEGIN OF t_otfdata2 OCCURS 0.
INCLUDE STRUCTURE solisti1.
DATA: END OF t_otfdata2.
Move OTF data to another table with lenght 255
LOOP AT t_otfdata.
CONCATENATE t_otfdata-tdprintcom t_otfdata-tdprintpar INTO t_otfdata2.
APPEND t_otfdata2.
ENDLOOP.
Convert OTF format to PDF
CALL FUNCTION 'SX_OBJECT_CONVERT_OTF_PDF'
EXPORTING
format_src = 'OTF'
format_dst = 'PDF'
devtype = 'PRINTER'
FUNCPARA =
len_in = len_in
IMPORTING
len_out = len_out
TABLES
content_in = t_otfdata2
content_out = t_pdfdata
EXCEPTIONS
err_conv_failed = 1
OTHERS = 2.
Have a look at Progs. RSTXPDF4 and RSTXPDFT2 for converting the Spool to PDF.
Regards,
Raj
Message was edited by: Rajasekhar Dinavahi
Message was edited by: Rajasekhar Dinavahi -
Problem in converting Spool to PDF file, having non-English characters
Hi All,
I have problem in converting Spool to PDF format.
Scenario : I have a spool which has non-English characters. I am using CONVERT_ABAPSPOOLJOB_2_PDF FM to perform conversion. But my output is having junk values( ie # ) for non-English characters. Any pointers to solve this issue will be appreciated.
I even tried with report RSTXPDFT4 , it also gives me the same junk characters.
Regards,
Navin.Hi All,
I have problem in converting Spool to PDF format.
Scenario : I have a spool which has non-English characters. I am using CONVERT_ABAPSPOOLJOB_2_PDF FM to perform conversion. But my output is having junk values( ie # ) for non-English characters. Any pointers to solve this issue will be appreciated.
I even tried with report RSTXPDFT4 , it also gives me the same junk characters.
Regards,
Navin. -
Problem while Converting TiFF to PDF using OCR
Hi,
We have installed Adobe LiveCycle8.2 PDF Generator ES trail version, Acrobat Pro Extended 9.0.
OS: Windows XP Service Pack3,
App Server: WebSphere 6.1.0.19
DB: SQL Server 2005 SP2.
We are getting following error while converting TIFF images to PDF Using OCR.
Error message on AdminUI screen:
"Error Code:1000
Error Message: ALC-PDG-001-000-Conversion failed because of an exception. Connection to failed service."
Error messages in server log file:
[10/10/08 18:16:50:015 IST] 00000043 ProcessResour W com.adobe.service.ProcessResource$ErrorReaderThread run BMC024: Service Native2PDFSvc: Process ProcessResource(name=pdfgen.exe,pid=0) terminated abnormally with error code {3}
[10/10/08 18:16:50:218 IST] 00000035 ProcessResour A com.adobe.service.ProcessResource startProcess BMC505: Service Native2PDFSvc: Starting native process with command line "C:\\Program Files\\ibm\\WebSphere\\AppServer1\\profiles\\AppSrv01\\installedApps\\HDDLGSDMNK8897Node0 1Cell\\adobe\\server1\\Native2PDFSvc\\bin\\dll\\pdfgen.exe" PDF-NAf6c310002 -beginExecutable "C:\\Program Files\\IBM\\WebSphere\\AppServer1\\java\\jre\\bin\\javaw.exe" -endExecutable -Xmx64m -cp "C:/Program Files/ibm/WebSphere/AppServer1/profiles/AppSrv01/installedApps/HDDLGSDMNK8897Node01Cell/a dobe/server1/Native2PDFSvc/bin/adobe-appmon.jar;C:/Program Files/ibm/WebSphere/AppServer1/profiles/AppSrv01/installedApps/HDDLGSDMNK8897Node01Cell/a dobe/server1/Native2PDFSvc/bin/adobe-appmondata.jar;C:/Program Files/ibm/WebSphere/AppServer1/profiles/AppSrv01/installedApps/HDDLGSDMNK8897Node01Cell/a dobe/server1/Native2PDFSvc/bin/adobe-bslj.jar;C:/Program Files/ibm/WebSphere/AppServer1/profiles/AppSrv01/installedApps/HDDLGSDMNK8897Node01Cell/a dobe/server1/Native2PDFSvc/bin/adobe-csa.jar;C:/Program Files/ibm/WebSphere/AppServer1/profiles/AppSrv01/installedApps/HDDLGSDMNK8897Node01Cell/a dobe/server1/Native2PDFSvc/bin/adobe-generatepdf-client.jar;C:/Program Files/ibm/WebSphere/AppServer1/profiles/AppSrv01/installedApps/HDDLGSDMNK8897Node01Cell/a dobe/server1/Native2PDFSvc/bin/adobe-pdfg-common-jaxb.jar;C:/Program Files/ibm/WebSphere/AppServer1/profiles/AppSrv01/installedApps/HDDLGSDMNK8897Node01Cell/a dobe/server1/Native2PDFSvc/bin/adobe-pdfg-common.jar;C:/Program Files/ibm/WebSphere/AppServer1/profiles/AppSrv01/installedApps/HDDLGSDMNK8897Node01Cell/a dobe/server1/Native2PDFSvc/bin/adobe-pdfg-commonbmc.jar;C:/Program Files/ibm/WebSphere/AppServer1/profiles/AppSrv01/installedApps/HDDLGSDMNK8897Node01Cell/a dobe/server1/Native2PDFSvc/bin/adobe-pdfg-idl-bmc-websphere.jar;C:/Program Files/ibm/WebSphere/AppServer1/profiles/AppSrv01/installedApps/HDDLGSDMNK8897Node01Cell/a dobe/server1/Native2PDFSvc/bin/adobe-pdfg-idl-bmc.jar;C:/Program Files/ibm/WebSphere/AppServer1/profiles/AppSrv01/installedApps/HDDLGSDMNK8897Node01Cell/a dobe/server1/Native2PDFSvc/bin/adobe-utilities.jar;C:/Program Files/ibm/WebSphere/AppServer1/profiles/AppSrv01/installedApps/HDDLGSDMNK8897Node01Cell/a dobe/server1/Native2PDFSvc/bin/avalon-framework-4.1.5.jar;C:/Program Files/ibm/WebSphere/AppServer1/profiles/AppSrv01/installedApps/HDDLGSDMNK8897Node01Cell/a dobe/server1/Native2PDFSvc/bin/comfyj-2.4.jar;C:/Program Files/ibm/WebSphere/AppServer1/profiles/AppSrv01/installedApps/HDDLGSDMNK8897Node01Cell/a dobe/server1/Native2PDFSvc/bin/jacorb.jar;C:/Program Files/ibm/WebSphere/AppServer1/profiles/AppSrv01/installedApps/HDDLGSDMNK8897Node01Cell/a dobe/server1/Native2PDFSvc/bin/jaxb-api.jar;C:/Program Files/ibm/WebSphere/AppServer1/profiles/AppSrv01/installedApps/HDDLGSDMNK8897Node01Cell/a dobe/server1/Native2PDFSvc/bin/jaxb-impl.jar;C:/Program Files/ibm/WebSphere/AppServer1/profiles/AppSrv01/installedApps/HDDLGSDMNK8897Node01Cell/a dobe/server1/Native2PDFSvc/bin/jaxb-libs.jar;C:/Program Files/ibm/WebSphere/AppServer1/profiles/AppSrv01/installedApps/HDDLGSDMNK8897Node01Cell/a dobe/server1/Native2PDFSvc/bin/jniw2.9.5_acrobat1.1.jar;C:/Program Files/ibm/WebSphere/AppServer1/profiles/AppSrv01/installedApps/HDDLGSDMNK8897Node01CeError message continuation:
[10/10/08 18:16:50:296 IST] 00000044 SystemOut O Command line '"C:\Program Files\IBM\WebSphere\AppServer1\java\jre\bin\javaw.exe"'
[10/10/08 18:16:50:437 IST] 00000035 ExceptionUtil E CNTR0020E: EJB threw an unexpected (non-declared) exception during invocation of method "doRequiresNew" on bean "BeanId(LiveCycle8#adobe-dscf.jar#EjbTransactionBMTAdapter, null)". Exception data: java.lang.IllegalStateException: Connection to failed service.
at com.adobe.service.ResourcePooler.allocateResource(ResourcePooler.java:87)
at com.adobe.service.ConnectionFactoryManagerPeer.getConnectionResourceFromPool(ConnectionFa ctoryManagerPeer.java:79)
at com.adobe.service.J2EEConnectionFactoryManagerPeerImpl.getConnection(J2EEConnectionFactor yManagerPeerImpl.java:84)
at com.adobe.service.ConnectionFactoryRmiAdapter.getConnection(ConnectionFactoryRmiAdapter.j ava:53)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:615)
at com.ibm.rmi.util.ProxyUtil$4.run(ProxyUtil.java:727)
at java.security.AccessController.doPrivileged(AccessController.java:241)
at com.ibm.rmi.util.ProxyUtil.invokeWithClassLoaders(ProxyUtil.java:725)
at com.ibm.CORBA.iiop.ClientDelegate.invoke(ClientDelegate.java:1123)
at $Proxy80.getConnection(Unknown Source)
at com.adobe.service._ConnectionFactoryRemote_Stub.getConnection(_ConnectionFactoryRemote_St ub.java:58)
at com.adobe.pdfg.callbacks.NativeToPDFTransactionCallback.convertToPdf(NativeToPDFTransacti onCallback.java:185)
at com.adobe.pdfg.callbacks.NativeToPDFTransactionCallback.doInTransaction(NativeToPDFTransa ctionCallback.java:163)
at com.adobe.idp.dsc.transaction.impl.ejb.adapter.EjbTransactionBMTAdapterBean.doRequiresNew (EjbTransactionBMTAdapterBean.java:218)
at com.adobe.idp.dsc.transaction.impl.ejb.adapter.EJSLocalStatelessEjbTransactionBMTAdapter_ 3af08fdf.doRequiresNew(Unknown Source)
at com.adobe.idp.dsc.transaction.impl.ejb.EjbTransactionProvider.execute(EjbTransactionProvi der.java:133)
at com.adobe.idp.dsc.transaction.impl.DefaultTransactionTemplate.execute(DefaultTransactionT emplate.java:79)
at com.adobe.pdfg.BMCCaller.invokeInSMT(BMCCaller.java:769)
at com.adobe.pdfg.Native2PdfCaller.callNativeBMC(Native2PdfCaller.java:779)
at com.adobe.pdfg.Native2PdfCaller.createPDF(Native2PdfCaller.java:298)
at com.adobe.pdfg.GeneratePDFImpl.createPDFCommon(GeneratePDFImpl.java:342)
at com.adobe.pdfg.GeneratePDFImpl.createPDF(GeneratePDFImpl.java:172)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:615)
at com.adobe.idp.dsc.component.impl.DefaultPOJOInvokerImpl.invoke(DefaultPOJOInvokerImpl.jav a:118)
at com.adobe.idp.dsc.interceptor.impl.InvocationInterceptor.intercept(InvocationInterceptor. java:140)
at com.adobe.idp.dsc.interceptor.impl.RequestInterceptorChainImpl.proceed(RequestInterceptor ChainImpl.java:60)
at com.adobe.idp.dsc.transaction.interceptor.TransactionInterceptor$1.doInTransaction(Transa ctionInterceptor.java:74)
at com.adobe.idp.dsc.transaction.impl.ejb.adapter.EjbTransactionBMTAdapterBean.doBMT(EjbTran sactionBMTAdapterBean.java:197)
at com.adobe.idp.dsc.transaction.impl.ejb.adapter.EJSLocalStatelessEjbTransactionBMTAdapter_ 3af08fdf.doBMT(Unknown Source)
at com.adobe.idp.dsc.transaction.impl.ejb.EjbTransactionProvider.execute(EjbTransactionProvi der.java:95)
at com.adobe.idp.dsc.transaction.interceptor.TransactionInterceptor.intercept(TransactionInt erceptor.java:72)
at com.adobe.idp.dsc.interceptor.impl.RequestInterceptorChainImpl.proceed(RequestInterceptor ChainImpl.java:60)
at com.adobe.idp.dsc.interceptor.impl.InvocationStrategyInterceptor.intercept(InvocationStra tegyInterceptor.java:55)
at com.adobe.idp.dsc.interceptor.impl.RequestInterceptorChainImpl.proceed(RequestInterceptor ChainImpl.java:60)
at com.adobe.idp.dsc.interceptor.impl.InvalidStateInterceptor.intercept(InvalidStateIntercep tor.java:37)
at com.adobe.idp.dsc.interceptor.impl.RequestInterceptorChainImpl.proceed(RequestInterceptor ChainImpl.java:60)
at com.adobe.idp.dsc.interceptor.impl.AuthorizationInterceptor.intercept(AuthorizationInterc eptor.java:102)
at com.adobe.idp.dsc.interceptor.impl.RequestInterceptorChainImpl.proceed(RequestInterceptor ChainImpl.java:60)
at com.adobe.idp.dsc.interceptor.impl.JMXInterceptor.intercept(JMXInterceptor.java:48)
at com.adobe.idp.dsc.interceptor.impl.RequestInterceptorChainImpl.proceed(RequestInterceptor ChainImpl.java:60)
at com.adobe.idp.dsc.engine.impl.ServiceEngineImpl.invoke(ServiceEngineImpl.java:115)
at com.adobe.idp.dsc.routing.Router.routeRequest(Router.java:118)
at com.adobe.idp.dsc.provider.impl.base.AbstractMessageReceiver.routeMessage(AbstractMessage Receiver.java:91)
at com.adobe.idp.dsc.provider.impl.vm.VMMessageDispatcher.doSend(VMMessageDispatcher.java:21 5)
at com.adobe.idp.dsc.provider.impl.base.AbstractMessageDispatcher.send(AbstractMessageDispat cher.java:57)
at com.adobe.idp.dsc.clientsdk.ServiceClient.invoke(ServiceClient.java:208)
at com.adobe.aes.web.create.CreatePDFAct.createPDF(CreatePDFAct.java:383)
at com.adobe.aes.web.create.CreatePDFAct.createPDF2(CreatePDFAct.java:402)
at com.adobe.aes.web.create.CreatePDFAct.execute(CreatePDFAct.java:174)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
at com.adobe.aes.web.AesActionServlet.service(AesActionServlet.java:63)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1095)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1036)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:145)
at com.adobe.idp.um.auth.filter.AuthenticationFilter.doFilter(AuthenticationFilter.java:154)
at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java: 190)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:130)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterChain.java:87)
at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:832)
at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:679)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:565)
at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:478)
at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.jav a:90)
at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:748)
at com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1461)
at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:118)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink .java:458)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink .java:387)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:267)
at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminators(NewConn ectionInitialReadCallback.java:214) -
Problem in converting spool to pdf
Hi Experts,
I want an internal table to be converted to the PDF. For this RSPO_OPEN_SPOOLREQUEST, RSPO_WRITE_SPOOLREQUEST and RSPO_CLOSE_SPOOLREQUEST to create the spool. However, somehow the table tsp01 does not gets updated as a result i could not convert the data to PDF. Can any one help me how this problem could be solved.
Thank.
Warm Regards,
Harshad.Hi,
you can refer this sample code.
DATA: t_otfdata_tab LIKE ITCOO OCCURS 0 WITH HEADER LINE.
CALL FUNCTION 'CLOSE_FORM'
TABLES
OTFDATA = t_otfdata_tab
fill the exceptions..
IF SY-SUBRC = 0.
ENDIF.
then pass the t_otfdata_tab to this function module..
CONSTANTS: c_pdf(03) VALUE 'PDF'.
PDF File size
DATA: w_file_size TYPE I.
Internal Table to hold Form contents in PDF format
DATA: t_pdfdata_tab LIKE tline OCCURS 0 WITH HEADER LINE.
for converting. the output format from OTF to PDF
CALL FUNCTION 'CONVERT_OTF'
EXPORTING
FORMAT eq c_pdf
IMPORTING
BIN_FILESIZE = w_file_size
TABLES
OTF eq t_otfdata_tab
LINES eq t_pdfdata_tab
EXCEPTIONS...
use these links, hope it will be useful to you....
Problem in converting spool to PDF file
Problem in converting the spool to PDF.
Thanks and Regards,
Ahamed.
Maybe you are looking for
-
Write XML CLOB 10 MB in size to an XML file
Hi, I am trying to export a table into an XML file. Using various examples, I have learned that is really easy to handle objects smaller that 32767 bytes (characters). The problem is working with big chunks. My XML CLOB is just over 10 MB in size. I
-
Inspection lot not getting created
Dear MM guru's... SUB: Quality inspection lot neot creating. when i am do GIR, system is not creating Inspection lot for the material, i have maintained the QM view in material master and assigned the inspection type aslo, then why system is not crea
-
Sleep or wait() / notify() Which is better IYO
Consider an app where a central object, like an information server is handed a query and an amount of time will pass before that information is available. For caching, many objects may ask the same question and be waiting on the same answer. Is it be
-
Cannot Connect Remotely to WMI
I have run into an issue with our Windows 7 machines and am having trouble diagnosing the cause. I am unable to connect remotely to any of the Windows 7 machines' WMI. Every time I try, I get the error "RDP server is unavailable". I can ping the work
-
Very weak wifi signal after i change the battery
i recently change my playbook battery. everything seems perfectly okay except that i have a very weak wifi signal reception. i need to be very near the router just to have the signal. i dont know what went wrong during the changing of battery proces