on 02-20-2015 10:10 AM
Hello all,
I want to attach the PO in the email.
I called FM 'SSF_FUNCTION_MODULE_NAME' to get the form's name as follow:
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = l_form
IMPORTING
fm_name = v_form_name
EXCEPTIONS
no_form = 1
no_function_module = 2
OTHERS = 3.
But when i tried to call FM v_form_name as below, i got an issue. In fact it couldn't be executed and didn't dump either.
w_ctrlop-getotf = 'X'.
w_ctrlop-no_dialog = 'X'.
w_ctrlop-preview = space.
w_compop-tddest = 'LOCL'.
* w_compop-tdnoprev = 'X'.
CALL FUNCTION v_form_name
EXPORTING
control_parameters = w_ctrlop
output_options = w_compop
user_settings = space
IMPORTING
job_output_info = w_return
EXCEPTIONS
formatting_error = 1
internal_error = 2
send_error = 3
user_canceled = 4
OTHERS = 5.
Could you please help me to figure out the cause of this problem.
thanks,
Meriem.
Hello,
I checked ST22 and here is the error:
When calling the function module "/1BCDWB/SF00000022", one of the parameters
needed according to the interface description was not specified.
This parameter was "SF_PO".
So, i used FM 'BBP_OUTPUT_PO_GETDETAIL_SMART' to fill SF_PO.
BR,
Meriem.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Meriem,
Debug your report and check if the parameter are giving correct values, you can have a look at the sample code below :
DATA lv_smartform TYPE rs38l_fnam.
DATA ls_ssfctrlop TYPE ssfctrlop.
DATA ls_output_options TYPE ssfcompop.
DATA ls_job_output_info TYPE ssfcrescl.
DATA lt_lines TYPE STANDARD TABLE OF tline.
DATA lv_bin_filesize TYPE i.
DATA lv_pdf_xstring TYPE xstring.
* -- Get the name of the smartform function module
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = 'ZMY_SMARTFORM'
IMPORTING
fm_name = lv_smartform.
* -- Call the smartform
ls_ssfctrlop-no_dialog = abap_true.
ls_ssfctrlop-getotf = abap_true.
ls_output_options-tdprinter = 'PDF1'.
CALL FUNCTION lv_smartform
EXPORTING
control_parameters = ls_ssfctrlop
output_options = ls_output_options
custom_input = ls_your_custom_smartform_input
IMPORTING
job_output_info = ls_job_output_info
EXCEPTIONS
OTHERS = 0.
* ---Convert the OTF data to xstring
CALL FUNCTION 'CONVERT_OTF'
EXPORTING
format = 'PDF'
IMPORTING
bin_filesize = lv_bin_filesize
bin_file = lv_pdf_xstring
TABLES
otf = ls_job_output_info-otfdata[]
lines = lt_lines
EXCEPTIONS
OTHERS = 0.
"---Attach file to response
cl_wd_runtime_services=>attach_file_to_response(
i_filename = 'mypdf.pdf'
i_content = lv_pdf_xstring
i_mime_type = 'application/pdf'
).
also check the note given below :
1296758 - Sending purchase order attachments via mail
Please rewards points if this post is helpul.
Thanks,
AkkI
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.