2023 Apr 13 2:50 PM
Hi All,
I'm sending Smartforms in Email attachment with an email body text but getting error as "OTF end command // missing in OTF data". I've attached the code below.
When I debug the code found that line 222 call function returning sy-subrc = 3 (send_error). Please let me know where im missing something.
* call smartform invoice
"Control Parameters
ls_control_param-getotf = 'X'.
CALL FUNCTION lf_fm_name
EXPORTING
archive_index = toa_dara
archive_parameters = arc_params
control_parameters = ls_control_param
* mail_appl_obj =
mail_recipient = ls_recipient
mail_sender = ls_sender
output_options = ls_composer_param
user_settings = space
is_bil_invoice = ls_bil_invoice
is_nast = nast
is_repeat = repeat
IMPORTING
job_output_info = ls_job_info
* document_output_info =
* job_output_options =
EXCEPTIONS
formatting_error = 1
internal_error = 2
send_error = 3
user_canceled = 4
OTHERS = 5.
CALL FUNCTION 'Z_CONVERT_OTF_2_PDF_MAIL_ATTCH'
TABLES "I've used above custom call function to get data in PDF.
t_objbin = lt_objbin
t_itcoo = ls_job_info-otfdata.
Thank you,
Ankita.
2023 Apr 13 2:59 PM
2023 Apr 13 4:19 PM
2023 Apr 13 4:25 PM
It means that you didn't close the form (see the control parameters NO_OPEN and NO_CLOSE mixed with the optional use of SSF_OPEN and SSF_CLOSE).
2023 Apr 13 4:25 PM
Please edit your question, select your code and press the button [CODE], which makes the code appear colored/indented, it will be easier for people to look at it. Thank you!
2023 Apr 14 12:02 PM
it is like chocolate, no OTF data no PDF conversion
You certainly forget one of the necessary parameters
Check the part 3 of this old blog
https://blogs.sap.com/2013/05/30/sending-mail-using-oo-2-smartforms/
Send the Smartform in PDF attachment with a text message.
2023 Apr 24 11:55 AM
Hi Frederic,
Thank you so much for your response.
Just for confirmation following parameters I missed thatswhy i'm getting the error ryt?
MOVE : ‘X’ TO is_control_param–no_dialog ,
‘ ‘ TO is_control_param–preview ,‘X’ TO is_composer_param–tdfinal.
2023 Apr 24 11:58 AM
2023 Apr 24 4:21 PM