In quality system I am able to get the spoolid while calling a smartform function module and email gets generated with attached PDF FORM perfectly.
CALL FUNCTION lv_fnam
control_parameters = ls_ctrlop
output_options = is_prn-print_cntrl-compop
user_settings = is_prn-print_cntrl-user_settings
is_prn_ctrl = is_prn-print_cntrl
is_prn = <ls_vdc>
document_output_info = es_document_output_info
job_output_info = es_job_output_info
job_output_options = es_job_output_options
output_canceled = 1
parameter_error = 2
OTHERS = 3.
then I call if soppl id is not initial then covert it into PDF. I.e
IF JOB_OUTPUT_INFO-SPOOLID NOT INITIAL.
CALL FUNCTION 'CONVERT_OTFSPOOLJOB_2_PDF'
EXPORTING:src_spoolid = lc_wa_spool
no_dialog = 'X'
pdf_destination = 'X'
no_background = 'X'
IMPORTING:pdf_bytecount = bin_size
bin_file = pdf_xstring
but the same printer and all setting when I am using in production, I am not able to get any spool id which is needed to convert it into PDF.this
JOB_OUTPUT_INFO-SPOOLID is coming blank in production system.
Could anybody help me to find the issue. why this is happening on production system.