06-04-2006 3:48 PM
Hello,
My problem is the following,
I hava a smartform to print the invoice but it's too heavy(8MB) because it has many graphics, so what I want to do is to convert to PDF and print the PDF but without save the PDF in my computer or in my file server.
When the smartform is launched I set the option GETOTF = 'X' in the exporting structure CONTROL_PARAMETERS. This retrieves the smartform in OTF format in the table JOB_OUTPUT_INFO-OTFDATA and I convert this table in a PDF with the function CONVERT_OTF. I can get the pdf in a table with structure TLINE or in a variable with structure XSTRING. I want to print this table or this xstring from sap but I don't know how to do it.
Can somebody help me?
Thank you very much in advance,
Manuel
06-04-2006 5:46 PM
Manuel-
What version of SAP are you in? Are you trying to print the PDF in background or online. If online, you might have some options! Let me know the version of SAP you are in.
KK
Message was edited by: Krishnakumar Ramamoorthy
06-05-2006 8:31 AM
Hi KK,
My SAP version is SAP ERP Central Component 5.0
I'm trying to print in background but if I have some options in online we can try.
I know the function SSFCOMP_PDF_PREVIEW to preview the invoice in PDF but when you print from this preview Windows NT printer is used and what I want is to use the SAP printers because we have many printers instaled in SAP in different cities and countries.
Do you have any idea?
Regards,
Manuel
06-05-2006 6:36 AM
Hello Manuel LZ ,
1.Define 2 variables
DATA:
num_1 TYPE i,
num_2 TYPE sy-tabix.
DESCRIBE TABLE it_table LINES num_1.
LOOP AT it_table.
num_2 = sy-tabix.
CASE num_2.
WHEN 1.
control_parameters-no_open = ' '.
control_parameters-no_close = 'X'.
WHEN num_1.
control_parameters-no_open = 'X'.
control_parameters-no_close = space.
WHEN OTHERS.
control_parameters-no_open = 'X'.
control_parameters-no_close = 'X'.
ENDCASE.
IF num_1 = 1.
CLEAR: control_parameters.
ENDIF.
control_parameters-langu = sy-langu.
control_parameters-no_dialog = 'X'.
control_parameters-preview = 'X'.<b>with print priview
or</b> control_parameters-preview = 'X'.<b>Without print priview.This is direct printing</b>
CALL FUNCTION fm_name
<b>EXPORTING</b>
ARCHIVE_INDEX =
ARCHIVE_INDEX_TAB =
ARCHIVE_PARAMETERS =
control_parameters = control_parameters
MAIL_APPL_OBJ =
MAIL_RECIPIENT =
MAIL_SENDER =
output_options = gv_output
user_settings = space
gv_agmt = p_agr
gv_dist = gs_distributors-kunnr
<b>IMPORTING</b>
DOCUMENT_OUTPUT_INFO =
JOB_OUTPUT_INFO = output_info
JOB_OUTPUT_OPTIONS =
<b>EXCEPTIONS</b>
formatting_error = 1
internal_error = 2
send_error = 3
user_canceled = 4
OTHERS = 5
ENDLOOP.
It solves ur problem.
Let me know ,if u have any problem.
<b>
Thanks.
Venkat.O</b>
06-05-2006 8:32 AM
Hi Venkat.O,
Thank you very much for you answer but I don't understand what you do with that program that I can use to solve my problem.
Could you please explain it better to me?
Regards,
Manuel
06-07-2006 8:32 AM