Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Emailed Smartform Not Producing a Spool ID in Production system

Former Member
0 Kudos

Hi ,

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
           EXPORTING
             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>
           IMPORTING
             document_output_info = es_document_output_info
             job_output_info      = es_job_output_info
             job_output_options   = es_job_output_options
           EXCEPTIONS
             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.

Thanks,

Aisha


2 REPLIES 2

raymond_giuseppi
Active Contributor
0 Kudos

Why do you generate a spool in Smartforms, if you require a pdf, set to 'X' the getotf component of control_parameters, and then pass the otfdata component of job_output_info to CONVERT_OTF FM. Also check sy-subrc when calling a FM.

Regards,
Raymond

0 Kudos

Hello,

I have not developed the requirement. it is already in production system and we are supporting production system. the existing code works in quality system but in production system I am not able to find the reason why the PDF is not getting attached in the email.

When I tried to debug I found the FM for smartform has import parameter job_output_info which has spoolid. once spool id gets filled the another fm 'CONVERT_OTFSPOOLJOB_2_PDF' convert that spoolid.

CALL FUNCTION lv_fnam
           EXPORTING
             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>
           IMPORTING
             document_output_info = es_document_output_info
             job_output_info      = es_job_output_info
             job_output_options   = es_job_output_options
           EXCEPTIONS
             output_canceled      = 1
             parameter_error      = 2
             OTHERS               = 3.

it is working in Q system but somehow, no spoolid found in P system. I question is why this is happening. is there any setting issue? anyone got this issue? how to solve this issue?

Thanks,

Aisha