Chinese char issue in smartform preview as pdf format
Hi chinese guy!!
please help me with chinese char in smartform preview as pdf format
i created smartform with chinese char and then when executing this smartform by t-code smartforms, it show as simplified chinese char, but when getting JOB_OUTPUT_INFO in order to convert OTF as pdf format, although smartforms performed as pdf format, only chinese char were broken. smartform with english or korean language does not have any issue, only chinese issue now.
i got into r/3 as logon ZH by SAP GUI english version and i used adobe acrobat reader chinese simplifed version. r/3 version is ecc60 unicode system***
please help me,, any chinese guy there?
1. CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
2. CONTORL_PARAMETERS-NO_DIALOG = 'X'.
CONTORL_PARAMETERS-GETOTF = 'X'.
OUTPUT_OPTIONS-TDNOPREV = 'X'.
CLEAR JOB_OUTPUT_INFO.
3.
CALL FUNCTION FUNCTION
EXPORTING
CONTROL_PARAMETERS = CONTORL_PARAMETERS
OUTPUT_OPTIONS = OUTPUT_OPTIONS
IMPORTING
JOB_OUTPUT_INFO = JOB_OUTPUT_INFO
TABLES
ITEM = ITEM
EXCEPTIONS
FORMATTING_ERROR = 1
INTERNAL_ERROR = 2
SEND_ERROR = 3
USER_CANCELED = 4.
OTF_TAB[] = JOB_OUTPUT_INFO-OTFDATA[].
CALL FUNCTION 'CONVERT_OTF'
EXPORTING
FORMAT = 'PDF'
IMPORTING
BIN_FILESIZE = PDF_FSIZE
TABLES
OTF = OTF_TAB
LINES = PDF_TABLE
EXCEPTIONS
ERR_MAX_LINEWIDTH = 1
ERR_FORMAT = 2
ERR_CONV_NOT_POSSIBLE = 3
OTHERS = 4.
hi,
please see the notes 999712.
thanks
Similar Messages
-
I have a problem in converting smartform output to pdf format.
Hi,
While converting the smartform output to pdf format.
It is showing this error.
otf end command // missing in otf data.
I have used this function.
Assigning the OTFDATA to OTF Structure table
CLEAR gt_otf.
gt_otf[] = gs_otfdata-otfdata[].
Convert the OTF DATA to SAP Script Text lines
CLEAR gt_pdf_tab.
CALL FUNCTION 'CONVERT_OTF'
EXPORTING
format = 'PDF'
max_linewidth = 132
IMPORTING
bin_filesize = gv_bin_filesize
TABLES
otf = gt_otf
lines = gt_pdf_tab
EXCEPTIONS
err_max_linewidth = 1
err_format = 2
err_conv_not_possible = 3
OTHERS = 4.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
Please help me in this regard. Thanks in advance.Hi ,
I am getting this exception "err_conv_not_possible"
CALL FUNCTION f_name " '/1BCDWB/SF00000092'
EXPORTING
ARCHIVE_INDEX =
ARCHIVE_INDEX_TAB =
ARCHIVE_PARAMETERS =
CONTROL_PARAMETERS = st_control_parameters
MAIL_APPL_OBJ =
MAIL_RECIPIENT =
MAIL_SENDER =
OUTPUT_OPTIONS = st_output_options
USER_SETTINGS = 'X'
ZST_TEXTSYMBOLS = ZST_TEXTSYMBOLS
wa_kna1 = wa_kna1
wa_claim_header = wa_claim_header
IMPORTING
DOCUMENT_OUTPUT_INFO = st_document_output_info
JOB_OUTPUT_INFO = st_job_output_info
JOB_OUTPUT_OPTIONS = st_job_output_options
TABLES
IT_CLAIM_VERSION = IT_CLAIM_VERSION
IT_CLAIM_ITEM = IT_CLAIM_ITEM
IT_CLAIM_PARTNER = IT_CLAIM_PARTNER
IT_FINAL = IT_FINAL
EXCEPTIONS
FORMATTING_ERROR = 1
INTERNAL_ERROR = 2
SEND_ERROR = 3
USER_CANCELED = 4
OTHERS = 5
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ELSE.
CALL FUNCTION 'CONVERT_OTF_2_PDF'
EXPORTING
USE_OTF_MC_CMD = 'X'
ARCHIVE_INDEX =
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.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDIF.
HERE when i tried to debug it i got SY-SUBRC = 1.
Please help me in this regard. Thanks in advance. -
Need Smartform materials in PDF Format
Hi Guys,
Please give me the links to download the SMARTFORM materials in PDF format.
I am new to smartforms so i need all the materials to learn SMARTFORMS.
Regards,
Chandrufor Smartforms material
http://www.sap-basis-abap.com/sapsf001.htm
http://www.sap-press.com/downloads/h955_preview.pdf
http://www.ossincorp.com/Black_Box/Black_Box_2.htm
http://www.sap-img.com/smartforms/sap-smart-forms.htm
http://www.sap-img.com/smartforms/smartform-tutorial.htm
http://www.sapgenie.com/abap/smartforms.htm
How to trace smartform
http://help.sap.com/saphelp_47x200/helpdata/en/49/c3d8a4a05b11d5b6ef006094192fe3/frameset.htm
http://www.help.sap.com/bp_presmartformsv1500/DOCU/OVIEW_EN.PDF
http://www.sap-img.com/smartforms/smart-006.htm
http://www.sap-img.com/smartforms/smartforms-faq-part-two.htm
Re: Need FAQ's
check most imp link
http://www.sapbrain.com/ARTICLES/TECHNICAL/SMARTFORMS/smartforms.html
step by step good ex link is....
http://smoschid.tripod.com/How_to_do_things_in_SAP/How_To_Build_SMARTFORMS/How_To_Build_SMARTFORMS.html
Subtotals - Check the link...
Re: Subtotal with Table Node in smartforms
Go through these SAP Standard programs also,
sf_example_01
sf_example_02
sf_example_03. -
Logo in Smartform output to pdf format is coming as Junk Character
Hi All,
I have a requirement to generate the Smartform output in PDF file. But when i am doing that i am getting the LOGO as Junk character in the PDF file. Can any one help me to resolve this issue?.
Thanks,
Muruganand.KYes check the spool and the output displayed correctly in the spool it means there is a problem when you convert OTF to PDF. Check that part of the code and try different options.
-
Smart form print preview in PDF format
Hi ABAP Experts,
I have 2 requirements
1) I want to print preview of a smartform in pdf format
2) I also want to attach a local pdf file to the smartform which is displaying in the pdf print preview format
or to rephrase:
I want a pdf attached to a smartform which i want to open in the pdf print preview format.
Regards,
NilouferUse following function modules:
Please see the below code to download a PDF file on to your computer.
PERFORM F_CONVERT_OTF.
FORM F_CONVERT_OTF .
PERFORM F_CALL_SMARTFORM. " Call the smartform to get data in I_OTF_FINAL
**appending the otf data into the final table & save the pdf file.
CALL FUNCTION 'CONVERT_OTF'
EXPORTING
FORMAT = C_PDF_U "Value is 'PDF'
IMPORTING
BIN_FILESIZE = L_BIN_FILESIZE "L_BIN_FILESIZE TYPE I,
TABLES
OTF = I_OTF_FINAL
LINES = I_PDF_TAB "It is of type TLINE
EXCEPTIONS
ERR_MAX_LINEWIDTH = 1
ERR_FORMAT = 2
ERR_CONV_NOT_POSSIBLE = 3
ERR_BAD_OTF = 4
OTHERS = 5.
* Check if the file is already existing.
CALL FUNCTION 'TMP_GUI_GET_FILE_EXIST'
EXPORTING
FNAME = L_FILE1 " Path where file is saved
IMPORTING
EXIST = L_RESULT
* ISDIR =
* FILESIZE =
EXCEPTIONS
FILEINFO_ERROR = 1
OTHERS = 2
PERFORM F_GUI_DOWNLOAD USING L_FILE.
ENDFORM.
FORM F_GUI_DOWNLOAD USING P_FILE TYPE STRING.
CONSTANTS: C_BIN(10) TYPE C VALUE 'BIN'.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
FILENAME = P_FILE "same as L_FILE
FILETYPE = C_BIN
CONFIRM_OVERWRITE = C_X "value 'X'
TABLES
DATA_TAB = I_PDF_TAB
EXCEPTIONS
FILE_WRITE_ERROR = 1
NO_BATCH = 2
GUI_REFUSE_FILETRANSFER = 3
INVALID_TYPE = 4
NO_AUTHORITY = 5
UNKNOWN_ERROR = 6
HEADER_NOT_ALLOWED = 7
SEPARATOR_NOT_ALLOWED = 8
FILESIZE_NOT_ALLOWED = 9
HEADER_TOO_LONG = 10
DP_ERROR_CREATE = 11
DP_ERROR_SEND = 12
DP_ERROR_WRITE = 13
UNKNOWN_DP_ERROR = 14
ACCESS_DENIED = 15
DP_OUT_OF_MEMORY = 16
DISK_FULL = 17
DP_TIMEOUT = 18
FILE_NOT_FOUND = 19
DATAPROVIDER_EXCEPTION = 20
CONTROL_FLUSH_ERROR = 21
OTHERS = 22.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ELSE.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
<removed by moderator>
Edited by: vishalmurgai58 on Mar 6, 2012 1:43 PM
Edited by: Thomas Zloch on Mar 6, 2012 - please do not ask for ... -
Issue in printing table to PDF format
Hi all,
I am really facing an issue in designing reports. I have to customize the report that i am displaying in the dashboard while printing or sending it as mail.I need to create a multipage report.
I have a table displayed on the dashboard. Now with the help of the print button i can print the table to PDF format. But before printing in need to add some pages to the report like on first page i have a introduction(static) then on second page i have a table of content then after that i need to place the table that is on the dashboard etc.
Could it be possible to modify a report like this or any other alternative?
Thanks a lot.I found the solution .
I incorporated query,infofield,company logo in report designer and then i imported the report designer into WAD -
Smartform Printing in PDF format
Hi all,
I am looking to print standard SmartForms in PDF output.
I have printed a standard SmartForm to the spool. I convert the spool job to PDF using function module CONVERT_OTFSPOOLJOB_2_PDF. From this I get a new spool request titled "#####(original spool no) converted to PDF format".
My Basis team has create a new printer with device type PDF1 which I have used during this function module.
However this PDF spool shows up as odd characters. It also does not print as expected, again it prints the odd characters.
Obviously I'm missing something - does anyone have any suggestions?
Thanks-Within SP01, viewing the spool request, I see the following characters:
═䑆ⴱ⸳ഊ◢팍ਲ扪
祰攠⽔祰攱ഊ>
〰‱〰〠㄰〰‵>
‱〰〠〠〠〠>
㈰‷㈰‷㘰‷㘰>
⽁獣敮琠㜲>
ਯ䱡獴䍨慲′>
㔳㠠㔳㠠㠵> Etc....
EDIT: I note that when I submit this post, the characters change. I'm seeing 'symbols' mainly, some Asian characters (the form should be in English).
When printing, it comes out with something like:
%PDF-1.3
%aDuE
2 0 objtype /Type1
/BaseFont /H00 1000 1000 520 1000 74 1000 0 0 0 0
/CapHeight
/LastChar 255
%Charwid8 592 779 650 650. etc
/F002 6 0 R
Date=(0000000)
@SAP_OB End TOA_DARA
>>
endob00327 00000 n
and so on...
For now we would like to validate the PDF printing before modifying any new print programs to automate the process.
Thanks-
Message was edited by: Chad Carter
Message was edited by: Chad Carter -
Hi all,
I want to extract the data from the invoice smartform and i should display it in pdf format.I have invoice number with me as input parameter.
Can any one solve my problem...it is urgent plz.........
Thanks ,
Rakesh.hi
good
please check this code
By using FM we can convert smartform to PDF like CONVERT_PDF
and GUI_DOWNLOAD.
*& Report ZSRI_RE_02
REPORT ZSRI_RE_02.
SELECTION-SCREEN: BEGIN OF BLOCK B1 WITH FRAME.
PARAMETER: P_DATE LIKE SY-DATUM.
PARAMETER: P_REA TYPE CHAR255.
SELECTION-SCREEN:END OF BLOCK B1.
*DATA:WS_UCOMM LIKE SY-UCOMM.
DATA FORM_NAME TYPE rs38L_fnam.
DATA: WA_CTRLOP TYPE SSFCTRLOP,
WA_OUTOPT TYPE SSFCOMPOP.
DATA: T_OTFDATA TYPE SSFCRESCL,
T_PDF_TAB LIKE TLINE OCCURS 0 WITH HEADER LINE.
DATA: t_otf TYPE itcoo OCCURS 0 WITH HEADER LINE.
DATA: w_filesize TYPE i.
DATA: w_bin_filesize TYPE i.
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
FORMNAME = 'ZSRI_FORM_01'
VARIANT = ' '
DIRECT_CALL = ' '
IMPORTING
FM_NAME = FORM_NAME
EXCEPTIONS
NO_FORM = 1
NO_FUNCTION_MODULE = 2
OTHERS = 3
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
wa_ctrlop-getotf = 'X'.
wa_ctrlop-no_dialog = 'X'.
wa_outopt-tdnoprev = 'X'.
CALL FUNCTION FORM_NAME
EXPORTING
ARCHIVE_INDEX =
ARCHIVE_INDEX_TAB =
ARCHIVE_PARAMETERS =
CONTROL_PARAMETERS = WA_CTRLOP
MAIL_APPL_OBJ =
MAIL_RECIPIENT =
MAIL_SENDER =
OUTPUT_OPTIONS = WA_OUTOPT
USER_SETTINGS = 'X'
MYDATE = P_DATE
REASON = P_REA
IMPORTING
DOCUMENT_OUTPUT_INFO =
JOB_OUTPUT_INFO = T_OTFDATA.
JOB_OUTPUT_OPTIONS =
EXCEPTIONS
FORMATTING_ERROR = 1
INTERNAL_ERROR = 2
SEND_ERROR = 3
USER_CANCELED = 4
OTHERS = 5
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
t_otf[] = t_otfdata-otfdata[].
*Convert into PDF
CALL FUNCTION 'CONVERT_OTF'
EXPORTING
FORMAT = 'PDF'
MAX_LINEWIDTH = 132
ARCHIVE_INDEX = ' '
COPYNUMBER = 0
ASCII_BIDI_VIS2LOG = ' '
PDF_DELETE_OTFTAB = ' '
IMPORTING
BIN_FILESIZE = w_bin_filesize
BIN_FILE =
TABLES
OTF = T_OTF
LINES = T_PDF_TAB
EXCEPTIONS
ERR_MAX_LINEWIDTH = 1
ERR_FORMAT = 2
ERR_CONV_NOT_POSSIBLE = 3
ERR_BAD_OTF = 4
OTHERS = 5
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
To download into PC
CALL FUNCTION 'WS_DOWNLOAD'
EXPORTING
BIN_FILESIZE = W_BIN_FILESIZE
CODEPAGE = ' '
FILENAME = 'D:\SRI2.PDF'
FILETYPE = 'BIN'
MODE = ' '
WK1_N_FORMAT = ' '
WK1_N_SIZE = ' '
WK1_T_FORMAT = ' '
WK1_T_SIZE = ' '
COL_SELECT = ' '
COL_SELECTMASK = ' '
NO_AUTH_CHECK = ' '
IMPORTING
FILELENGTH = W_FILESIZE
TABLES
DATA_TAB = T_PDF_TAB.
FIELDNAMES =
EXCEPTIONS
FILE_OPEN_ERROR = 1
FILE_WRITE_ERROR = 2
INVALID_FILESIZE = 3
INVALID_TYPE = 4
NO_BATCH = 5
UNKNOWN_ERROR = 6
INVALID_TABLE_WIDTH = 7
GUI_REFUSE_FILETRANSFER = 8
CUSTOMER_ERROR = 9
NO_AUTHORITY = 10
OTHERS = 11
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
reward point if helpful.
thanks
mrutyun^ -
Hi All,
I have a requirement to get a print preview of the smartform in the pdf format and have the option to either print it or save it.
meaning - the adobe application must automatically open and in it, there must be a window to display the smartform in the PDF format.
the code i have so far is as below
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
FORMNAME = W_FORM_NAME
IMPORTING
FM_NAME = W_FMODULE
EXCEPTIONS
NO_FORM = 1
NO_FUNCTION_MODULE = 2
OTHERS = 3.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Calling the SMARTFORM using the function module retrieved above
GET_OTF parameter in the CONTROL_PARAMETERS is set to get the OTF
gst_output_options-tddest = 'FRNT_End_Print'. "Frontend printer
gst_output_options-tdnewid = sy-prnew.
gst_output_options-tdimmed = 'X'.
gst_output_options-tddelete = sy-prrel.
clear gst_control_parameters.
gst_control_parameters-no_dialog = 'X'.
gst_control_parameters-getotf = 'X'.
gst_control_parameters-preview = 'X'. "Deactivate preview!
*Call the original function module.
call function w_fmodule
exporting
control_parameters = gst_control_parameters
output_options = gst_output_options
importing
job_output_info = gt_job_output_info
job_output_options = gt_output_options
tables
tbl_amt = final_tab
exceptions
formatting_error = 1
internal_error = 2
send_error = 3
user_canceled = 4.
if sy-subrc ne 0.
message id sy-msgid type sy-msgty number sy-msgno
with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
endif.
T_OTF[] = gt_job_output_info-OTFDATA[].
call function 'SSFCOMP_PDF_PREVIEW'
exporting
i_otf = t_otf
exceptions
convert_otf_to_pdf_error = 1
cntl_error = 2
others = 3.
if sy-subrc ne 0.
message id sy-msgid type sy-msgty number sy-msgno
with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
endif.
The adobe application is launched but the window inside does not hold anything.
i get a pop-up inside the adobe window with the message " FILE DOES NOT BEGIN WITH '%PDF-' ".
Any suggestions are greatly appreciated.
hoping to hear from you all.
thank you.
SandeepHi Sandeep,
Plz try with this code this code is working properly.
DATA: form_name TYPE rs38l_fnam.
DATA: wa_ctrlop TYPE ssfctrlop,
wa_outopt TYPE ssfcompop.
DATA: t_otfdata TYPE ssfcrescl,
t_pdf_tab LIKE tline OCCURS 0 WITH HEADER LINE.
DATA: t_otf TYPE itcoo OCCURS 0 WITH HEADER LINE.
DATA: w_filesize TYPE i.
DATA: w_bin_filesize TYPE i.
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = 'ZSM_PDF_1'
* VARIANT = ' '
* DIRECT_CALL = ' '
IMPORTING
fm_name = form_name
EXCEPTIONS
no_form = 1
no_function_module = 2
OTHERS = 3
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
wa_ctrlop-getotf = 'X'.
wa_ctrlop-no_dialog = 'X'.
wa_outopt-tdnoprev = 'X'.
CALL FUNCTION form_name
EXPORTING
* ARCHIVE_INDEX =
* ARCHIVE_INDEX_TAB =
* ARCHIVE_PARAMETERS =
control_parameters = wa_ctrlop
* MAIL_APPL_OBJ =
* MAIL_RECIPIENT =
* MAIL_SENDER =
output_options = wa_outopt
user_settings = 'X'
mydate = F_DATE
IMPORTING
* DOCUMENT_OUTPUT_INFO =
job_output_info = t_otfdata
* JOB_OUTPUT_OPTIONS =
TABLES
ITAB = ITAB
EXCEPTIONS
formatting_error = 1
internal_error = 2
send_error = 3
user_canceled = 4
OTHERS = 5
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
t_otf[] = t_otfdata-otfdata[].
CALL FUNCTION 'CONVERT_OTF'
EXPORTING
format = 'PDF'
max_linewidth = 132
* ARCHIVE_INDEX = ' '
IMPORTING
bin_filesize = w_bin_filesize
TABLES
otf = t_otf
lines = t_pdf_tab
EXCEPTIONS
err_max_linewidth = 1
err_format = 2
err_conv_not_possible = 3
OTHERS = 4
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CALL FUNCTION 'WS_DOWNLOAD'
EXPORTING
bin_filesize = w_bin_filesize
* CODEPAGE = ' '
filename = 'C:\Users\KO58\Desktop\test1.pdf'
filetype = 'BIN'
* MODE = ' '
* WK1_N_FORMAT = ' '
* WK1_N_SIZE = ' '
* WK1_T_FORMAT = ' '
* WK1_T_SIZE = ' '
* COL_SELECT = ' '
* COL_SELECTMASK = ' '
* NO_AUTH_CHECK = ' '
IMPORTING
filelength = w_filesize
TABLES
data_tab = t_pdf_tab
* FIELDNAMES =
EXCEPTIONS
file_open_error = 1
file_write_error = 2
invalid_filesize = 3
invalid_type = 4
no_batch = 5
unknown_error = 6
invalid_table_width = 7
gui_refuse_filetransfer = 8
customer_error = 9
OTHERS = 10
IF sy-subrc <> 0.
MESSAGE i003(z00) WITH 'File not downloaded succesfully'.
ELSE.
MESSAGE i003(z00) WITH 'File Test.pdf downloaded succesfully '
'under D drive'.
ENDIF.
If usefull plz give rewards.
Cheers
Anirudh -
Pusrchase order having 3 line item But print preview in PDF shows blank.
Hi All,
Purchase order has 3 line items. While taking print preview in PDF format 1st page shows 1 line item and 2nd page is blank.
I am not understanding the issue why other two line items are not getting displayed.?
Please provide me with the solution.
Thanks
ForumYes,there is a issue in print preview itself , if there is a issue in Print Prview that means page is gets skipped on next page ,therefore 2nd page automatically gets blank ,debug the same with abapor ,if this problem gets resolved then automatically system will convert the document in PDF as per print preview.
Regards,
Sandesh Sawant -
Smartform Output to PDF conversion
Hi experts,
i want to convert the smartform output to PDF Format and stored it in system level.But i got the following information message "OTF end command // missing in OTF data".
I used "CONVERT_OTF" for conversion of smartform output and "WS_DOWNLOAD & GUI_DOWNLOAD".
wt it means,can i make any changes,if tl me why it shows the message.
points wl be rewarded.
Thank you
chandu
Edited by: Chandu Valluri on Jan 4, 2008 12:56 PMhi,
*& Report ZPDF_DNLD_TEST2 *
*& DEVK904540 *
REPORT ZPDF_DNLD_TEST2 .
data: i_otf LIKE itcoo OCCURS 100 WITH HEADER LINE,
i_pdf LIKE tline OCCURS 100 WITH HEADER LINE.
data: op_option type SSFCTRLOP,
job_output type SSFCRESCL.
op_option-getotf = 'X'.
CALL FUNCTION '/1BCDWB/SF00000005'
EXPORTING
ARCHIVE_INDEX =
ARCHIVE_INDEX_TAB =
ARCHIVE_PARAMETERS =
CONTROL_PARAMETERS = op_option
MAIL_APPL_OBJ =
MAIL_RECIPIENT =
MAIL_SENDER =
OUTPUT_OPTIONS =
USER_SETTINGS = 'X'
itab1 = itab1
IMPORTING
DOCUMENT_OUTPUT_INFO =
JOB_OUTPUT_INFO = job_output
JOB_OUTPUT_OPTIONS =
EXCEPTIONS
FORMATTING_ERROR = 1
INTERNAL_ERROR = 2
SEND_ERROR = 3
USER_CANCELED = 4
OTHERS = 5
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CALL FUNCTION 'CONVERT_OTF'
EXPORTING
FORMAT = 'PDF'
MAX_LINEWIDTH = 132
ARCHIVE_INDEX = ' '
COPYNUMBER = 0
ASCII_BIDI_VIS2LOG = ' '
PDF_DELETE_OTFTAB = ' '
IMPORTING
BIN_FILESIZE =
BIN_FILE =
TABLES
otf = job_output-otfdata
lines = i_pdf
EXCEPTIONS
ERR_MAX_LINEWIDTH = 1
ERR_FORMAT = 2
ERR_CONV_NOT_POSSIBLE = 3
ERR_BAD_OTF = 4
OTHERS = 5
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
BIN_FILESIZE =
filename = 'c:\test_pdf_sf.pdf'
FILETYPE = 'BIN'
tables
data_tab = i_pdf
FIELDNAMES =
EXCEPTIONS
FILE_WRITE_ERROR = 1
NO_BATCH = 2
GUI_REFUSE_FILETRANSFER = 3
INVALID_TYPE = 4
NO_AUTHORITY = 5
UNKNOWN_ERROR = 6
HEADER_NOT_ALLOWED = 7
SEPARATOR_NOT_ALLOWED = 8
FILESIZE_NOT_ALLOWED = 9
HEADER_TOO_LONG = 10
DP_ERROR_CREATE = 11
DP_ERROR_SEND = 12
DP_ERROR_WRITE = 13
UNKNOWN_DP_ERROR = 14
ACCESS_DENIED = 15
DP_OUT_OF_MEMORY = 16
DISK_FULL = 17
DP_TIMEOUT = 18
FILE_NOT_FOUND = 19
DATAPROVIDER_EXCEPTION = 20
CONTROL_FLUSH_ERROR = 21
OTHERS = 22
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF. -
I have iMac desktop with Lion OS. I am using Firefox 6 web browser. Previously with Snowleopard OS I did not have any problems with printing, With Lion OS print commands have changed and when I click preview in PDF format for printing a web page, only page 1 of the document shows correctly. In second page, the text does not show all of the document and few lines at the boundary is missing and the font is different from page 1. I tried using Google Chrome browser and this does not have this problem. If I do not find a solution I may be forced to move to Google Chrome. I will really appreciate a response. Thanks.
Why not reconstruct the pages in InDesign they way you want the double pages to appear. There may even be an imposition script available that will do the trick. You could then output to pdf all the pages you want the full spread on. Leave the original to create the pages you wanted left as is.
You can ask in the ID forum about an imposition script. I know there was one with CS4, there may have been one with CS3. -
Alignment problem in converting smartform printpreview into PDF
Hi all,
I am getting some alignment problem in converting smartform printpreview into PDF format, i.e the format of PDF is different from printpreviw of smartform.
kindly suggest something so that alignment is not changed while converting to PDF.
Regards,
Sumalathause below f.m to convert it into 255 characters....
CALL FUNCTION 'QCE1_CONVERT'
TABLES
t_source_tab = i_tline
t_target_tab = so_ali[]
EXCEPTIONS
convert_not_possible = 1
OTHERS = 2. -
Converting sap script output into pdf format?
Hi all,
I have modified the standard purchase order script form MEDRUCK . Now i need to generate the output into pdf format.
This is not only limited to spool requests , But also when the user creates the purchase order and clicks on print or print preview the output should be in pdf format.
Please help on where and what code has to be written for this requirement?
Thanks,
Aravind.Hi
I don't know which is your release, but I don't think it's possible to create a preview in pdf format, but u can create a pdf file instead of the spool and then open it automatically, this is an example:
- A) Open form
IF P_PDF = 'X'.
XDEVICE = 'PRINTER'.
* Get OTF
ITCPO-TDGETOTF = 'X'.
ENDIF.
CALL FUNCTION 'OPEN_FORM'
EXPORTING
DEVICE = XDEVICE
DIALOG = 'X'
FORM = 'ZFI_CL_EC_MOVI'
OPTIONS = ITCPO
MAIL_SENDER = LVS_SENDER
MAIL_RECIPIENT = LVS_RECIPIENT
EXCEPTIONS
CANCELED = 1
DEVICE = 2
FORM = 3
OPTIONS = 4
UNCLOSED = 5
MAIL_OPTIONS = 6
ARCHIVE_ERROR = 7
INVALID_FAX_NUMBER = 8
MORE_PARAMS_NEEDED_IN_BATCH = 9
SPOOL_ERROR = 10
OTHERS = 11.
IF SY-SUBRC <> 0.
EXIT.
ENDIF.
B) Close FORM
CALL FUNCTION 'CLOSE_FORM'
TABLES
OTFDATA = T_OTF
EXCEPTIONS
UNOPENED = 1
BAD_PAGEFORMAT_FOR_PRINT = 2
SEND_ERROR = 3
SPOOL_ERROR = 4
OTHERS = 5.
IF SY-SUBRC <> 0.
MESSAGE I208(00) WITH 'Errore chiusura stampa'(A02).
ELSE.
PERFORM DOWNLOAD_PDF.
ENDIF.
C) Create PDF and open it:
FORM DOWNLOAD_PDF.
DATA: BIN_FILESIZE TYPE I.
DATA: T_FILE_PDF TYPE STANDARD TABLE OF TLINE,
DOCTAB_ARCHIVE TYPE STANDARD TABLE OF DOCS.
DATA: FILE_TABLE TYPE FILETABLE WITH HEADER LINE.
DATA: RC TYPE I,
USER_ACTION TYPE I.
DATA: TITLE TYPE STRING,
FILENAME TYPE STRING.
CHECK P_PDF = 'X'.
CALL FUNCTION 'CONVERT_OTF_2_PDF'
IMPORTING
BIN_FILESIZE = BIN_FILESIZE
TABLES
OTF = T_OTF
DOCTAB_ARCHIVE = DOCTAB_ARCHIVE
LINES = T_FILE_PDF
EXCEPTIONS
ERR_CONV_NOT_POSSIBLE = 1
ERR_OTF_MC_NOENDMARKER = 2
OTHERS = 3.
IF SY-SUBRC <> 0.
MESSAGE I208(00) WITH 'Errore conversione PDF'(A03).
EXIT.
ENDIF.
TITLE = 'Creare File'(T02).
CALL METHOD CL_GUI_FRONTEND_SERVICES=>FILE_OPEN_DIALOG
EXPORTING
WINDOW_TITLE = TITLE
DEFAULT_EXTENSION = '*.pdf'
CHANGING
FILE_TABLE = FILE_TABLE[]
RC = RC
USER_ACTION = USER_ACTION
EXCEPTIONS
FILE_OPEN_DIALOG_FAILED = 1
CNTL_ERROR = 2
ERROR_NO_GUI = 3
OTHERS = 4
IF SY-SUBRC <> 0.
MESSAGE I208(00) WITH 'Errore creazione PDF'(A04).
EXIT.
ELSE.
IF USER_ACTION = 9. EXIT. ENDIF.
IF RC = 1.
READ TABLE FILE_TABLE INDEX 1.
ENDIF.
ENDIF.
MOVE FILE_TABLE-FILENAME TO FILENAME.
CALL METHOD CL_GUI_FRONTEND_SERVICES=>GUI_DOWNLOAD
EXPORTING
BIN_FILESIZE = BIN_FILESIZE
FILENAME = FILENAME
FILETYPE = 'BIN'
CHANGING
DATA_TAB = T_FILE_PDF
EXCEPTIONS
FILE_WRITE_ERROR = 1
NO_BATCH = 2
GUI_REFUSE_FILETRANSFER = 3
INVALID_TYPE = 4
NO_AUTHORITY = 5
UNKNOWN_ERROR = 6
HEADER_NOT_ALLOWED = 7
SEPARATOR_NOT_ALLOWED = 8
FILESIZE_NOT_ALLOWED = 9
HEADER_TOO_LONG = 10
DP_ERROR_CREATE = 11
DP_ERROR_SEND = 12
DP_ERROR_WRITE = 13
UNKNOWN_DP_ERROR = 14
ACCESS_DENIED = 15
DP_OUT_OF_MEMORY = 16
DISK_FULL = 17
DP_TIMEOUT = 18
FILE_NOT_FOUND = 19
DATAPROVIDER_EXCEPTION = 20
CONTROL_FLUSH_ERROR = 21
OTHERS = 22
IF SY-SUBRC <> 0.
MESSAGE I208(00) WITH 'Errore creazione PDF'(A04).
EXIT.
ELSE.
MESSAGE S208(00) WITH 'File creato con successo'(S01).
ENDIF.
CHECK P_OPEN = 'X'.
CALL FUNCTION 'CALL_BROWSER'
EXPORTING
URL = FILE_TABLE-FILENAME
EXCEPTIONS
FRONTEND_NOT_SUPPORTED = 1
FRONTEND_ERROR = 2
PROG_NOT_FOUND = 3
NO_BATCH = 4
UNSPECIFIED_ERROR = 5
OTHERS = 6.
IF SY-SUBRC <> 0.
MESSAGE S208(00) WITH 'Impossibile aprire file'(A05).
ENDIF.
ENDFORM. " DOWNLOAD_PDF
Max -
Arabic language Smartform given Wrong Output format.
Hi,
I have developed Arabic Language smartform and tested in Print Privew mode working fine .
Problem with smartform Converted into PDF format and downloded to PC given wrong format.
Pl let me know any changes required.Sorry I do not have answer to your question. But can you share with me how you managed to display Arabic language in Smartform?
Maybe you are looking for
-
Heartbeat Failure - CallManager Offline
Hello, I'm having a rather unusual issue with Cisco Agent Desktop that I hope somone could give me some insight on. First let me give you a little background. All users in the company, over 300, were on Windows XP SP3 using CAD 4.5.7.4. It was the
-
IPhoto 6.0.3 (293) Performance Worse Than Any Other Version
Interesting. I have 9,990 photos and my iPhoto 6 just came to a crawl. I have 1.5GB of memory. Something is definitely wrong. When I start iPhoto it appears to behave normally for about 30 seconds. I've read many of the other speed/performance/slow t
-
hello I am trying to upload a document in DMS (CV01N) and i get a message stating the browser is turned off in customization; but, in fact, it is activated. any ideas?
-
I'm using OSX 10.6.7, though cannot swear that the issue is new to the latest update. This popup message occurs so frequently, immediately after startup, that it almost seems that every mouse click triggers it, although again I can't be sure of that.
-
OWB Workflow Schema Installation
Hi, Can anybody post what are all the essential softwares and Hardwares needed for creating Workflow schema in OWB 10g R2. Do we need to install the Workflow Server first and then the OWB Repository? Or Can i able to add Workflow Schema in the existi