2011 Feb 21 10:35 AM
Hello all,
I have a requirement for printing RANGE of documents which the user will put on selection screen.
I need to collect the OTF DATA and convert it in PDF format and send as email.
I am doing following steps.
CALL FUNCTION 'SSF_OPEN'
LOOP AT IT_DATA INTO WA_DATA.
CALL FUNCTION GV_FM_NAME
exporting
control_parameters = control
IMPORTING
job_output_info = p_job_output
ENDLOOP.
CALL FUNCTION 'SSF_CLOSE''
The issue is my OTFDATA table is blank.If i run these logic for a single document by removing SSF_OPEN and SSF_CLOSE and also not putting my logic in LOOP than it is working fine.
Kindly suggest how to proceed on the same.
Regards,
Arun Chaudhary
Hello all,
I have a requirement for printing RANGE of documents which the user will put on selection screen.
I need to collect the OTF DATA and convert it in PDF format and send as email.
I am doing following steps.
CALL FUNCTION 'SSF_OPEN'
LOOP AT IT_DATA INTO WA_DATA.
CALL FUNCTION GV_FM_NAME
exporting
control_parameters = control
IMPORTING
job_output_info = p_job_output
ENDLOOP.
CALL FUNCTION 'SSF_CLOSE''
The issue is my OTFDATA table is blank.If i run these logic for a single document by removing SSF_OPEN and SSF_CLOSE and also not putting my logic in LOOP than it is working fine.
Kindly suggest how to proceed on the same.
Regards,
Arun Chaudhary
2011 Feb 21 11:44 AM
Hi Arun,
It seems that IT_DATA is not containing any data within it. You can check that using debugger.
Because, otherwise, you are stating it is running for one value and does not run when you put that in loop.
Just check that you may be flushing data from internal table before calling of the loop.
Thanks.
Kumar Saurav.
2011 Feb 21 12:20 PM
Hello Kumar,
The table has proper data.
The issue is when i use the FM SSF_OPEN only than the OTF DATA is coming as blank.
I am unable to understand the same.
Regards,
Arun
2011 Oct 10 12:44 PM
Why dont you try keeping the loop outside the SSF_OPEN instead of keeping after SSF_OPEN.
Like this:
LOOP.
SSF_OPEN
Call smartform.
SSF_CLOSE.
ENDLOOP.
2011 Oct 11 6:11 AM
See the following example to store data into OTF
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = c_formname
IMPORTING
fm_name = v_fm_name
EXCEPTIONS
no_form = 1
no_function_module = 2
OTHERS = 3.
CALL FUNCTION v_fm_name
EXPORTING
control_parameters = st_control_parameters
output_options = st_output_options
IMPORTING
document_output_info = st_document_output_info
job_output_info = st_job_output_info
job_output_options = st_job_output_options
EXCEPTIONS
formatting_error = 1
internal_error = 2
send_error = 3
user_canceled = 4
OTHERS = 5.
CALL FUNCTION 'CONVERT_OTF_2_PDF'
IMPORTING
bin_filesize = v_bin_filesize
TABLES
otf = st_job_output_info-otfdata
doctab_archive = it_docs
lines = it_lines
EXCEPTIONS
err_conv_not_possible = 1
err_otf_mc_noendmarker = 2
OTHERS = 3.
*Convert into PDF
CONCATENATE 'smrt' '.pdf' INTO v_name.
CREATE OBJECT v_guiobj.
CALL METHOD v_guiobj->file_save_dialog
EXPORTING
default_extension = 'pdf'
default_file_name = v_name
file_filter = v_filter
CHANGING
filename = v_name
path = v_path
fullpath = v_fullpath
user_action = v_uact.
IF v_uact = v_guiobj->action_cancel.
EXIT.
ENDIF.
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |