Smartform OTF error
Hi,
I have followed the steps for converting a smartform to a PDF file. But the OTF data table is initial.
Can someone point me to what i am doing wrong?
Best regards
Lisa M Simonsen
Hi,
Try this code in the initialisation of the code.
DATA: ws_ctrlpara TYPE ssfctrlop,
ws_opoption TYPE ssfcompop,
ws_opinfo TYPE ssfcrescl,
wi_otfdata TYPE tsfotf.
CLEAR ws_ctrlpara.
ws_ctrlpara-getotf = 'X'.
ws_ctrlpara-no_dialog = 'X'.
ws_ctrlpara-preview = space.
ws_opoption-tdprinter = text-element.
While calling smartform you call it like this:
CALL FUNCTION v_frmname
EXPORTING
ARCHIVE_INDEX =
ARCHIVE_INDEX_TAB =
ARCHIVE_PARAMETERS =
control_parameters = ws_ctrlpara
MAIL_APPL_OBJ =
MAIL_RECIPIENT =
MAIL_SENDER =
output_options = ws_opoption
user_settings = 'X'
IMPORTING
DOCUMENT_OUTPUT_INFO =
job_output_info = ws_opinfo
JOB_OUTPUT_OPTIONS =
TABLES
wi_invoice = wi_invoice1(table where data is stored)
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.
Then you write this:
MOVE ws_opinfo-otfdata[] TO wi_otfdata[].
Then you can use this FM:
CALL FUNCTION 'CONVERT_OTF_2_PDF'
EXPORTING
use_otf_mc_cmd = 'X'
IMPORTING
bin_filesize = wl_filesize
TABLES
otf = wi_otfdata
doctab_archive = wi_docs
lines = wi_mtab_pdf
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.
This will convert smartform into PDF.
Now the table wi_mtab_pdf will contain the PDF form and you can download it using gui_download fm.
Hope this help.
Reward if useful.
Sushil
Similar Messages
-
Smartform Printing : Error in spool C call: Error from TemSe
Hi! everybody,
I am stating my problem as follows : I have to print a bar-code sticker of size 10 X 7 cms. I have worked on bar-codes before this also. This time the output from a smartform is to be given to a ZEBRA TLP 2844 printer. I initially encountered problems in printing. The data does not fit on to the page.
After a lot of searching I found that ZEBRA was a partner of SAP and that a special device type needs to be created for output from a ZEBRA printer. I did this two times. Each time my steps were as described under.
To create the device type I did the following :
1. I finally found the driver from the ZEBRA website from http://www.zebra.com/id/products/global/en/utilities/sap_device_types.UtilityFile.File.tmp/Zebra_SAP_Device_Types.zip From this I uploaded the driver for 203 DPI zebra printer with IBM code 850 font file name "YZB200.PRI" into the transaction SA38.
2. Then I created a new device ZEB10 in SPAD after assigning my format to the device.
Thereafter, I tried to print my sticker. During this procedure, on selection of the new device type, the fonts automatically changed to ARIAL in the print preview. When I give the print command (Spool request : Print immed = X, Delete after output = X & New spool request = X) it gives an error message Error in spool C call: Error from TemSe.
Since the output had not been issued, I opened the spool request to view its TemSe characteristics. Here I found
Spool Attributes
Output Device ZEB10
Format ZTT Format
Doc. Category SMART
Recipient
Department
Deleted On 19.01.2011
Authorization
Output Attributes
No. of Copies 1
Priority 5
SAP Cover Page Do not print SAP cover page
OS Cover Sheet Print as set at printer
Requested 0
Processed 0 With Problem 0
With Error (Not Printed) 0
Storage Mode Print
TemSe Attributes
Object name SPOOL0000013836
Data type ????????????
Character set 0 -
> Character set of dev type = 1162
Number of parts 0
Record format
Size in bytes 0
Storage location
On seeing SP01
Spool no. Type Date Time Status Pages Title
13836 Smartforms(OTF) 11.01.2011 07:32 + 0 SMART LP01 USERID
I hope this data helps you help me. Please ask for more data if you wish. Also, I have searched vastly for this error on the net have already come across the link http://help.sap.com/saphelp_45b/helpdata/en/d9/4a8f9c51ea11d189570000e829fbbd/frameset.htm but to no use. On the SDN, I have not found a similar thread and that is why I decided to post this problem here, hoping to find a solution. Kindly help.
Regards,
ManasHi Manas,
I am facing the same issue for one of my clients.
Can you please share the solution with me if you have come out with it.
Regards,
Nirmal.K -
We are on ECC 6 EhP4, NW 7.0 SP20, ESS 1.41
When implementing ESS 1.41, we made a Z copy of hr_conf_form and changed the verbiage to our company.
Now when we open the Print Confirmation Form button in the portal an error is returned: com.sap.pcuigp.xssfpm.java.FPMRuntimeException: OTF end command // missing in OTF data
After reviewing all SDN posts on OTF error cannot find a solution for this problem.
The SAP delivered hr_conf_form allows the 'Print Form' function to work but the Z copy returns the error.
Any ideas?
Thanks,
D. Maupin
University of KentuckyWe solved the problem by applying SAP Note 1398788 Benefits: Adobe templates not used in ESS
-
Archive Smartform Copies - Error - OTF end command // missing in OTF data
Hi All,
We are printng invoices and archiving them at the same time.
When I try to print and archive just the original invoice it works fine
That is , it prints and archives.
However when I set the flag SSFCOMPOP-TDARCCOP to 'X' (Archive Copies as well),
I get the error OTF end command // missing in OTF data.
Im guessing that the system tries to archive multiple copies and the End of File Command // at the end of each copy is causing the issue. But I dont know how to go about solving it.
Regards,
Nehal.Implemented SAP Note 1123505 - OTF-PDF conversion. Archiving several copies
-
Smartform (otf) as pdf and sending as email-attachment
Hello everybody,
when trying to convert a smartform to pdf and sending it with the FM 'SO_NEW_DOCUMENT_ATT_SEND_API1' i get an error when opening the pdf-file. It says ' a non identified Token w62.10 was found' and the pdf is all empty.
The problem seems to be somewhere between getting the pdf output data from the FM 'convert_otf' and trying to create a bin-object for the attachment.
Here is the code:
call function 'CONVERT_OTF'
EXPORTING
format = 'PDF'
* max_linewidth = 132
IMPORTING
bin_filesize = v_len_in
TABLES
otf = i_otf
lines = i_tline
EXCEPTIONS
err_max_linewidth = 1
err_format = 2
err_conv_not_possible = 3
others = 4.
* Fehlerhandling
if sy-subrc <> 0.
endif.
loop at i_tline.
translate i_tline using '~'.
concatenate wa_buffer i_tline into wa_buffer.
endloop.
translate wa_buffer using '~'.
do.
i_record = wa_buffer.
append i_record.
shift wa_buffer left by 255 places.
if wa_buffer is initial.
exit.
endif.
enddo.
* Attachment
refresh:
i_reclist,
i_objtxt,
i_objbin,
i_objpack.
clear wa_objhead.
i_objbin[] = i_record[].
******* Create Message Body
**** Title and Description
wa_doc_chng-obj_name = 'smartform'.
wa_doc_chng-expiry_dat = sy-datum + 10.
wa_doc_chng-obj_descr = 'smartform'.
wa_doc_chng-sensitivty = 'F'.
* wa_doc_chng-doc_size = v_lines_txt * 255.
**** Main Text
i_objtxt = 'test with pdf-Attachment!'.
append i_objtxt.
describe table i_objtxt lines v_lines_txt.
read table i_objtxt index v_lines_txt.
wa_doc_chng-doc_size = ( v_lines_txt - 1 ) * 255 + strlen( i_objtxt ).
clear i_objpack-transf_bin.
i_objpack-head_start = 1.
i_objpack-head_num = 0.
i_objpack-body_start = 1.
i_objpack-body_num = v_lines_txt.
i_objpack-doc_type = 'RAW'.
append i_objpack.
**** Attachment
* (pdf-Attachment)
i_objpack-transf_bin = 'X'.
i_objpack-head_start = 1.
i_objpack-head_num = 0.
i_objpack-body_start = 1.
* Länge des Attachment ermitteln
describe table i_objbin lines v_lines_bin.
read table i_objbin index v_lines_bin.
i_objpack-doc_size = ( v_lines_bin - 1 ) * 255 + strlen( i_objbin ).
i_objpack-body_num = v_lines_bin.
i_objpack-doc_type = 'PDF'.
i_objpack-obj_name = 'smart'.
i_objpack-obj_descr = 'test'.
append i_objpack.
clear i_reclist.
i_reclist-receiver = receiver.
i_reclist-rec_type = RECEIVER_TYPE.
append i_reclist.
if not receiver is initial.
call function 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
document_data = wa_doc_chng
put_in_outbox = 'X'
TABLES
packing_list = i_objpack
object_header = wa_objhead
CONTENTS_BIN = i_objbin
contents_txt = i_objtxt
receivers = i_reclist
EXCEPTIONS
too_many_receivers = 1
document_not_sent = 2
document_type_not_exist = 3
operation_no_authorization = 4
parameter_error = 5
x_error = 6
enqueue_error = 7
others = 8.Hi,
I just observed the following.
call function 'CONVERT_OTF'
EXPORTING
format = 'PDF'
max_linewidth = 132 IMPORTING
bin_filesize = v_len_in
TABLES
otf = i_otf
lines = i_tline
EXCEPTIONS
err_max_linewidth = 1
err_format = 2
err_conv_not_possible = 3
others = 4.
i_objtxt = 'test with pdf-Attachment!'.
append i_objtxt.
describe table i_objtxt lines v_lines_txt.
read table i_objtxt index v_lines_txt.
wa_doc_chng-obj_name = 'smartform'.
wa_doc_chng-expiry_dat = sy-datum + 10.
wa_doc_chng-obj_descr = 'smartform'.
wa_doc_chng-sensitivty = 'F'.
wa_doc_chng-doc_size = v_lines_txt * 255.
clear i_objpack-transf_bin.
i_objpack-head_start = 1.
i_objpack-head_num = 0.
i_objpack-body_start = 1.
i_objpack-body_num = v_lines_txt.
i_objpack-doc_type = 'RAW'.
append i_objpack.
Attachment
(pdf-Attachment)
i_objpack-transf_bin = 'X'.
i_objpack-head_start = 1.
i_objpack-head_num = 0.
i_objpack-body_start = 1.
Länge des Attachment ermitteln
describe table i_objbin lines v_lines_bin.
read table i_objbin index v_lines_bin.
i_objpack-doc_size = v_lines_bin * 255 .
I just tried with your coding and then changed to the below coding.Now I am able to open the PDF in mail.
* Internal Table declarations
DATA: i_otf TYPE itcoo OCCURS 0 WITH HEADER LINE,
i_tline TYPE TABLE OF tline WITH HEADER LINE,
i_receivers TYPE TABLE OF somlreci1 WITH HEADER LINE,
i_record LIKE solisti1 OCCURS 0 WITH HEADER LINE,
* Objects to send mail.
i_objpack LIKE sopcklsti1 OCCURS 0 WITH HEADER LINE,
i_objtxt LIKE solisti1 OCCURS 0 WITH HEADER LINE,
i_objbin LIKE solisti1 OCCURS 0 WITH HEADER LINE,
i_reclist LIKE somlreci1 OCCURS 0 WITH HEADER LINE,
* Work Area declarations
wa_objhead TYPE soli_tab,
w_ctrlop TYPE ssfctrlop,
w_compop TYPE ssfcompop,
w_return TYPE ssfcrescl,
wa_doc_chng typE sodocchgi1,
w_data TYPE sodocchgi1,
wa_buffer TYPE string,"To convert from 132 to 255
* Variables declarations
v_form_name TYPE rs38l_fnam,
v_len_in LIKE sood-objlen,
v_len_out LIKE sood-objlen,
v_len_outn TYPE i,
v_lines_txt TYPE i,
v_lines_bin TYPE i.
call function 'SSF_FUNCTION_MODULE_NAME'
exporting
formname = 'ZZZ_TEST1'
importing
fm_name = v_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.
w_ctrlop-getotf = 'X'.
w_ctrlop-no_dialog = 'X'.
w_compop-tdnoprev = 'X'.
CALL FUNCTION v_form_name
EXPORTING
control_parameters = w_ctrlop
output_options = w_compop
user_settings = 'X'
IMPORTING
job_output_info = w_return
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.
i_otf[] = w_return-otfdata[].
call function 'CONVERT_OTF'
EXPORTING
format = 'PDF'
max_linewidth = 132
IMPORTING
bin_filesize = v_len_in
TABLES
otf = i_otf
lines = i_tline
EXCEPTIONS
err_max_linewidth = 1
err_format = 2
err_conv_not_possible = 3
others = 4.
* Fehlerhandling
if sy-subrc <> 0.
endif.
loop at i_tline.
translate i_tline using '~'.
concatenate wa_buffer i_tline into wa_buffer.
endloop.
translate wa_buffer using '~'.
do.
i_record = wa_buffer.
append i_record.
shift wa_buffer left by 255 places.
if wa_buffer is initial.
exit.
endif.
enddo.
* Attachment
refresh:
i_reclist,
i_objtxt,
i_objbin,
i_objpack.
clear wa_objhead.
i_objbin[] = i_record[].
******* Create Message Body
**** Title and Description
i_objtxt = 'test with pdf-Attachment!'.
append i_objtxt.
describe table i_objtxt lines v_lines_txt.
read table i_objtxt index v_lines_txt.
wa_doc_chng-obj_name = 'smartform'.
wa_doc_chng-expiry_dat = sy-datum + 10.
wa_doc_chng-obj_descr = 'smartform'.
wa_doc_chng-sensitivty = 'F'.
wa_doc_chng-doc_size = v_lines_txt * 255.
**** Main Text
* wa_doc_chng-doc_size = ( v_lines_txt - 1 ) * 255 + strlen( i_objtxt )
clear i_objpack-transf_bin.
i_objpack-head_start = 1.
i_objpack-head_num = 0.
i_objpack-body_start = 1.
i_objpack-body_num = v_lines_txt.
i_objpack-doc_type = 'RAW'.
append i_objpack.
**** Attachment
* (pdf-Attachment)
i_objpack-transf_bin = 'X'.
i_objpack-head_start = 1.
i_objpack-head_num = 0.
i_objpack-body_start = 1.
* Länge des Attachment ermitteln
describe table i_objbin lines v_lines_bin.
read table i_objbin index v_lines_bin.
i_objpack-doc_size = v_lines_bin * 255 .
i_objpack-body_num = v_lines_bin.
i_objpack-doc_type = 'PDF'.
i_objpack-obj_name = 'smart'.
i_objpack-obj_descr = 'test'.
append i_objpack.
clear i_reclist.
i_reclist-receiver = '[email protected]'.
i_reclist-rec_type = 'U'.
append i_reclist.
call function 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
document_data = wa_doc_chng
put_in_outbox = 'X'
TABLES
packing_list = i_objpack
object_header = wa_objhead
CONTENTS_BIN = i_objbin
contents_txt = i_objtxt
receivers = i_reclist
EXCEPTIONS
too_many_receivers = 1
document_not_sent = 2
document_type_not_exist = 3
operation_no_authorization = 4
parameter_error = 5
x_error = 6
enqueue_error = 7
others = 8.
If your problem is solved,kindly close the thread and reward points.If you need clarifications,get back. -
Hi ,
I'm trying to print a smartform but there is a problem when I try it from the spool(SP01).
The message is : incorrect (Reason unknown);
Log :
SAP spool error log
=====================
Print request processing log
Errors occurred processing this print request
OTF module: Page buffer (80*1000 entries) is too small
OTF module: Page buffer (80*1000 entries) is too small
OTF module: Page buffer (80*1000 entries) is too small
OTF module: Page buffer (80*1000 entries) is too small
OTF module: Page buffer (80*1000 entries) is too small
OTF module: Page buffer (80*1000 entries) is too small
OTF module: Page buffer (80*1000 entries) is too small
OTF module: Page buffer (80*1000 entries) is too small
OTF module: Page buffer (80*1000 entries) is too small
OTF module: Page buffer (80*1000 entries) is too small
OTF module: Page buffer (80*1000 entries) is too small
OTF module: Page buffer (80*1000 entries) is too small
OTF module: Page buffer (80*1000 entries) is too small
OTF module: Page buffer (80*1000 entries) is too small
OTF module: Page buffer (80*1000 entries) is too small
Did you already have this problem?
Thanks a lot
KarimHi Rejish,
we have the same problem here with SAP 730. Printing a smartform we get the "OTF module: Page buffer (80*1000 entries) is too small" error.
In ST03N I can see an "oversized" raw which refers to my print test.
This is the Task/Memory view:
I read about the note 1331658 but I think that in SAP 730 they have already fixed it..it's ad old note from 2009.
Thanks in advance -
Table in smartform throwing errors
Hi,
I was trying to create a table in a smartform. I have to display 5 colums from the table vbap based on certain conditions. I have created a table and a line type. And based on this line type I have created 5 cells under the header with text elements having the name of the columns. I then created the same 5 cells in main area with the text elements having the value within &.. I have added a loop also in the data tab of the table. However when i test the smart for it throws an error "No other column available". Is this the right procedure to create a table?I got it..thanks..
-
Dunning smartform F150_DUNN_SF Error ?
Hi All,
I have assigned the standard dunning smartform "F150_DUNN_SF" for dunning letter printout, i have also configured BTE event 1720 to trigger smartforms. While triggering the dunning letter from F150 transaction, its giving a error "ULINE not found". Please provide some solution to this error ?
Thanks & Regards,
Navneeth K.Hi,
Could you please let me know the steps involved in configuration of Dunning smartform, I am also having a requirement where I have to configure Dunning form F150_DUNN_SF with the standard print program.
Could you please explain me the steps to configure this, I am able to configure a script for dunning but not the smartform.
Thanks in advance.
Best Regards,
Abnish Jain -
Color graphic in a PDF generated from a SmartForm causes error
I have a SmartForm containing a color graphic. It works correctly,
appears just the way it should in Print Preview, and it prints
correctly. However, when I generate a PDF file from, Adobe Reader
complains that the PDF file is corrupt and refuses to print it. If I
remove the color graphic from the SmartForm and don't make any other
changes, I get a good PDF file that can be parsed, displayed, and
printed without any problems.
Why is the presence of the color graphic in the SmartForm leading to a
corrupt PDF file? Is there any workaround (short of removing the color
graphic) that I can use to get a good PDF file?
Here is a more detailed description of what I am doing.
1. Creating the color graphic
A. I started with a color .TIF file
B. I went to transaction SE78,
Form Graphics -> Stored on Document Server ->
GRAPHICS General Graphics -> BMAP Bitmap Images
C. Clicked on the "Import" icon
D. In the "File name" field, navigated to my .TIF file
E. Typed the name of my graphic in the "Name" field and some
descriptive text in the "Description" field
F. Selected the "Color Bitmap Image" radio button
G. Set the "Print Attributes" as follows:
Unchecked - Resides in the Printer Memory
Checked - Reserve Height Automatically
Unchecked - Compression
H. The color graphic seems to upload correctly
I. When I click on Print Preview, it is displayed perfectly.
J. When I use the Search Help associated with the name field to
find the graphic, it is shown with the name and description
that I gave it, the Object field is displayed as "GRAPHICS",
the ID field is displayed as "BMAP".
K. When I select Graphic -> Graphic Information, the Resolution is
75 DPI and the Size is 26.86 x 8.26 cm. When I use this graphic
in the SmartForm, I will enter the resolution as 300 DPI - in
order to get an image whose dimensions are one-quarter of these
dimensions, but which will have a good resolution for a laser
printer.
2. The use of the color graphic in the SmartForm
A. It is a "Graphic" node which is the first node on the first
(and only) page of the SmartForm.
i. The Name is the name of the graphic I created
ii. Object = "GRAPHICS"
iii. ID = "BMAP"
iv. The "Color Bitmap Image (BCOL)" radio button is selected
v. The Resolution = 300 DPI
B. The position and size are:
i. Left Margin = 15.00 MM
ii. Width = 69.00 MM
iii. Upper margin = 15.00 MM
iv. Height = 21.77 MM
3. The process of producing the PDF file
A. The function SSF_FUNCTION_MODULE_NAME is called to obtain the
name of the function module associated with the SmartForm.
B. The function module (whose name was returned by
SSF_FUNCTION_MODULE_NAME) is called with:
i. CONTROL_PARAMETERS = a SSFCTRLOP structure with
GETOTF = 'X'
NO_OPEN = space
NO_CLOSE = space
NO_DIALOG = 'X'
ii. OUTPUT_OPTIONS = a SSFCOMOP structure with:
TDPRINTER = 'POST2'
TDDEST = space
TDNEWID = 'X'
TDIMMED = 'X'
TDDELETE = space
TDCOVER = space
TDCOPOES = 1
iii. JOB_OUTPUT_INFO = a structure of type SSFCRESCL used to
receive the OTF file
C. The function CONVERT_OTF is called with:
i. FORMAT parameter = 'PDF'
ii. OTF table parameter = the OTFDATA table contained within
the JOB_OUTPUT_INFO SSFCRESCL structure returned from the
SmartForm function module.
iii. BIN_FILE parameter = an XSTRING used to receive the PDF
file
iv. BIN_FILESIZE parameter = an integer used to receive the
size of the PDF file.Hello David,
The reason for this problem is probably related to the FlateDecode compression described in SAP Note 843480 (PDF conversion: Compression of bitmaps and TrueType fonts).
Try switching off the usage of FlateDecode compression again via report RSTXPDF3 as described in Note #843480.
It is a little confusing. The option 'FLATE_COMPR_OFF' needs to be set to 'On' to turn off the FlateDecode compression.
To set this run as follows:
se38 -> RSTXPDF3 -> enter 'FLATE_COMPR_OFF' in the 'Name' field
-> Select 'Change Settings' radio button
You will get a pop-up 'Do not use flat compression'.
Select the 'on' button.
After this create a new PDF and check if the problem is resovled.
Regards,
Aidan -
hi,
when i am executing the smartform a runtime error is raised in function module
SSFCOMP_GENERATE_SMART_FORM and the error is err_comp ssf_err_main_width_changed 'A' 080 can anyone tell what is the error its throwing ?Hi harri kishan,
As shivkumar said. All the main windows of pages should have the same width. If width varies, then form will got dump. So make sure all the main windows should have the same measurements.
Award points if its useful to you. Feel free to contact me.
Regards
Sreenivasa sharma k. -
SmartForms Printing Error for Japanese Characters
Hi,
I have an issue with Printing Japanese Characters in the SmartForm.
When I Print Preview the smartform I can see the characters in Japanese but when I Print the actual smartform in the printer, all I get is some junk characters like # and !.
I have the following setting in the smartform.
Multi-Byte functionality enabled
Character set used is Shift JIS
Smartform created in language EN
Translate to All Languages set to true
No restriction on Language Control
Smartstyles used has JPMINCHO fonts only
Default Para is JPMINCHO
Characters formatting has explicit JPMINCHO as font
Login language is JA
Printer is Local Printer with device type JPSAPWIN
When I debug the Smartform function module, the OTF Data Table (within the function) shows characters in Japanese (with codepage 8000) but then I look at the actual spool as a result of processing the function, it comes up as garbled.
Interestingly, I have exactly the same settings on another test smartform to print just 2 columns and it works well.
Not sure where I am going wrong.
Appreciate help on this issue.
Many Thanks
Krishnanhi,
has anyone solved this problem? even i m facing the problem. me restating the problem as below:
in VF02 transaction, for billing document we are trying to print smartform. Our logon languagae is EN and the Output Type langugae is EN. In spool, we are getting the CORRECT format ie the texts that are maintained in Japanese are showing as Japanese characters while the whole smartform is in English format.
Our requirement is to PRINT (from printer) the texts that are maintained in Japanese should get printed in Japanese format. I know that this is problem with printer settings. The printer is printing perfectly fine as other documents in Japanese characters so its ensured that printer is enabled for Japanese.
I suppose some kind of setting needs to be done at SAP end so that printer recognises double-byte character set of Japanese.
Waiting for confirmation/ solution.
Thanks
Debs -
A Problem When Converting SmartForm (OTF) to MS Word
Hi,
i'm converting smartform to ms word file but design is spoiled.
CALL FUNCTION 'CONVERT_OTF'
EXPORTING
format = 'ASCII'
max_linewidth = 132
IMPORTING
bin_filesize = gv_fsize
* bin_file = l_pdf_xstring
TABLES
otf = itcoo
lines = tline
EXCEPTIONS
err_max_linewidth = 1
err_format = 2
err_conv_not_possible = 3
err_bad_otf = 4
OTHERS = 5.
CALL FUNCTION 'CONVERT_TEXT'
EXPORTING
CODEPAGE = '1133'
DIRECTION = 'EXPORT'
FORMAT_TYPE = 'RTF'
* FORMATWIDTH = 72
* HEADER = ' '
* SSHEET = 'X'
* WITH_TAB = 'X'
* WORD_LANGU = SY-LANGU
TABLETYPE = 'BIN'
* TAB_SUBSTITUTE = ' '
* LF_SUBSTITUTE = ' '
* REPLACE_SYMBOLS = 'X'
* REPLACE_SAPCHARS = 'X'
* MASK_BRACKETS = 'X'
* IMPORTING
* NEWHEADER =
* WITH_TAB_E =
* FORMATWIDTH_E =
TABLES
FOREIGN = tline
ITF_LINES = tline
* LINKS_TO_CONVERT =
EXCEPTIONS
NOT_SUPPORTED = 1
OTHERS = 2
IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
* Transfer the 132-long strings to 255-long strings
LOOP AT tline.
TRANSLATE tline USING ' ~'.
CONCATENATE gd_buffer tline INTO gd_buffer.
ENDLOOP.
TRANSLATE gd_buffer USING '~ '.
DO.
it_attach = gd_buffer.
APPEND it_attach.
SHIFT gd_buffer LEFT BY 255 PLACES.
IF gd_buffer IS INITIAL.
EXIT.
ENDIF.
ENDDO.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
* BIN_FILESIZE = gv_fsize
FILENAME = l_pdf_string
FILETYPE = 'BIN'
APPEND = 'X'
* WRITE_FIELD_SEPARATOR = ' '
* HEADER = '00'
* TRUNC_TRAILING_BLANKS = ' '
* WRITE_LF = 'X'
* COL_SELECT = ' '
* COL_SELECT_MASK = ' '
* DAT_MODE = ' '
* CONFIRM_OVERWRITE = 'X'
* NO_AUTH_CHECK = ' '
* CODEPAGE = ' '
* IGNORE_CERR = ABAP_TRUE
* REPLACEMENT = '#'
* WRITE_BOM = ' '
* TRUNC_TRAILING_BLANKS_EOL = 'X'
* WK1_N_FORMAT = ' '
* WK1_N_SIZE = ' '
* WK1_T_FORMAT = ' '
* WK1_T_SIZE = ' '
* WRITE_LF_AFTER_LAST_LINE = ABAP_TRUE
* SHOW_TRANSFER_STATUS = ABAP_TRUE
* IMPORTING
* FILELENGTH =
TABLES
DATA_TAB = it_attach
* 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.
when converting to pdf with parameter is 'PDF' in fm CONVERT_OTF, design is not spoiled. but in 'ASCII' format in fm CONVERT_OTF design is spoiled.
how can i solve this problem?
can somebody help me pls?
Thanks.CALL FUNCTION 'CONVERT_OTF'
EXPORTING
FORMAT = 'PDF'
IMPORTING
BIN_FILESIZE = FILE_LEN
TABLES
OTF = OTFDATA
LINES = PDFDATA
EXCEPTIONS
ERR_MAX_LINEWIDTH = 1
ERR_FORMAT = 2
ERR_CONV_NOT_POSSIBLE = 3
OTHERS = 4.
Hope there will be problems with word but i think you can use pdf for that
If you do get the resolution please do let me know
Cheers -
iam able to see the print preview of the form but when i print iam getting error called 'error in generating the smartform'
iam new to smartfroms can anyone please help me
here is the print program which was already exisisting
DATA g_fmname TYPE rs38l_fnam.
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
PARAMETERS: p_vbeln TYPE vbrk-vbeln.
SELECTION-SCREEN END OF BLOCK b1.
START-OF-SELECTION.
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = 'ZSD_SMRTSALEINVOICE1'
IMPORTING
fm_name = g_fmname
EXCEPTIONS
no_form = 1
no_function_module = 2
OTHERS = 3.
IF sy-subrc <> 0.
MESSAGE 'Error in opening the smartform'
TYPE 'I'.
LEAVE LIST-PROCESSING.
ENDIF.
CALL FUNCTION g_fmname
EXPORTING
s_vbeln = p_vbeln
EXCEPTIONS
formatting_error = 1
internal_error = 2
send_error = 3
user_canceled = 4
OTHERS = 5.
IF sy-subrc <> 0.
MESSAGE 'Error in generating the smartform'
TYPE 'I'.
LEAVE LIST-PROCESSING.
ENDIF.Hi,
Hi,
i m not getting that sy-subrc = 0 or <> 0.
if u getting right print preview means it should print.
Remove the
IF sy-subrc 0.
MESSAGE 'Error in generating the smartform'
TYPE 'I'.
LEAVE LIST-PROCESSING.
ENDIF.
Statements and execute u will find the difference.
if u r maintaining sy-subrc <> 0.
there is problem in smart form function module calling.. or smart form maintainance plz check that. or u may not activate the smart form correctly.
hope it will work.
with Regards,
Kiran.G -
Smartform System Error for VF03 output type
Hi Friends,
Error encountered in Smartform:
Message no. SSFCOMPOSER181
Diagnosis
You tried to switch to the next table column, but no other column exists. The current column is 10. The line type %LTYPE1 contains only 10 columns.
System Response
The system issues an error message.
Procedure
Check whether the current line type is the desired line type and whether you defined a switch to a new table line.
%LTYPE1 contains only one cell consisting Material Description & Code .Apart from that nothin is there in line.
Please help.
Regards,
Abhishek.Hi,
check what is going else for JEX billingtype documents.
if that does not work out you can try to locate where it is going wrong.
how you do that: Disable a part of your form with conditions.
then if you have done it so far you didn't get that error meesage. Then shrink the part you have disabled until it goed worng again. Then it is going wrong in the last part you have enabled. It is a lot of work but debugging in smartform is not as easy as in sapscript.
success., Gr., Frank -
Smartform, PDF Error, Unrecognized Token
Hi all,
I have used smarform to send the output of Order Confirmation in PDF format to customer's external mail id. The program is working fine and sending mail to customer's mail id. But the problem is when I am trying to open the PDF file, I am getting the error. The error says ''An unrecognized token 'xxx.xx' was found", where xxx.xx is some number.
I have searched the forum, got some link to resolve that but didnt get the success. To send the mail, I have used the program which is generally used to send the mail. Like me some more users are looking for the solution for this error.
Using SAP4.7.
Helpful Ans will be rewarded
Thanks in Adv.
JigarLook this: problem opening pdf file
SX_OBJECT_CONVERT_OTF_PDF Please use this function module to solve the problem......
Use this in following way....
Please note the following:
1. Get the FM name of the SSF:
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = 'SSF'"Name of the SSF
IMPORTING
fm_name = fmname "Variable
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.
2. Get the Output of the Form....
DATA :l_t_job_output TYPE ssfcrescl OCCURS 0 WITH HEADER LINE.
DATA :l_t_out LIKE ssfcompop OCCURS 0 WITH HEADER LINE.
DATA :l_t_control LIKE ssfctrlop OCCURS 0 WITH HEADER LINE.
l_t_out-tddest = 'LOCL'.
APPEND l_t_out.
l_t_control-no_dialog = 'X'.
l_t_control-getotf = 'X'.
l_t_control-no_close = space.
APPEND l_t_control.
CALL FUNCTION fmname
EXPORTING
control_parameters = l_t_control
output_options = l_t_out
IMPORTING
job_output_info = l_t_job_output
TABLES
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.
3. Convert the OTF to PDF format...
DATA :l_t_pdfdata_tab LIKE tline OCCURS 200.
CALL FUNCTION 'CONVERT_OTF_2_PDF'
EXPORTING
use_otf_mc_cmd = 'X'
IMPORTING
bin_filesize = l_filesize_deck "Variable
TABLES
otf = l_t_job_output-otfdata
doctab_archive = l_t_docs " Variable
lines = l_t_pdfdata_tab
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.
4. Download the PDF data...
CALL FUNCTION 'WS_DOWNLOAD'
EXPORTING
bin_filesize = l_filesize "Variable
filename = 'C:\temp.pdf'
filetype = 'BIN"
mode = ' '
IMPORTING
filelength = l_filesize "Variable
TABLES
data_tab = l_t_pdfdata_tab
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 ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
5. View the Doc...
CALL FUNCTION 'WS_EXECUTE'
EXPORTING
document = 'X'
cd = 'C:\'
program = 'C:\temp.pdf'
EXCEPTIONS
frontend_error = 1
no_batch = 2
prog_not_found = 3
illegal_option = 4
gui_refuse_execute = 5
OTHERS = 6.
Note: The Exceptions in any FM are to be uncommented to catch the errer. Else SAP may trigger a dump.
call function 'SX_OBJECT_CONVERT_OTF_PDF'
exporting
format_src = 'OTF'
format_dst = 'PDF'
devtype = 'PRINTER'
FUNCPARA =
len_in = '1234'
IMPORTING
LEN_OUT =
tables
content_in = objbin
content_out = objpdf
EXCEPTIONS
ERR_CONV_FAILED = 1
OTHERS = 2.
Maybe you are looking for
-
For about the past 3 weeks I am unable to do any search without being redirected and then timing out at w3.mict.go.th, no searches work now.
-
Mail and Preview crashing upon launch
Okay, so it's just another day, and I'm launching Mail, just like I've done a million times before, but for some reason now all I get is just one bounce out of the icon in the dock, and then... nothing happens. Below, I've copied and pasted some gobb
-
Role Config Key Not Working under Business Role
Hi Gurus, I have created a Z role configuration key under a Z business role which is assigned to my user id. I have done some configuration changes under that role config key. Now when i login with my user id, i am not able to see the config changes.
-
Hello, I have been trying to setup vlans on a SG300-28p but they are not working. This is my setup: I want Switch1 to have ports 1-10 to access the DMZ, and 11-24 the LAN. Then i wan to add switch2-4 to extend the access to LAN. Is this possible? i t
-
IP/Network Camera Support ?
Hello All Could anyone please tell me whether Flash player supports IP / Network based cameras ? I have been trying to configure but I couldn't find any other API other than Camera.get(). Is there any other way of configuring such cameras ? Does futu