Downloading smartform as a word document
Hi How to download smartformoutput as a word document.It was previously displaying as a pdf document.
Can anybody give a sample code
Edited by: Ramya Ramya on May 13, 2009 6:18 AM
hi buddy!!!!
the smartforms are usually saved in OTF format.
so first u need to do all the formalities like calling the function module of that form and executing it
after that u need to use the function module 'CONVERT_OTF' to convert it into ur desired format.
Example:
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.
in format specify ur desired format type
Hope this will help you!!!
Thanks & Regards,
Punit Raval
Similar Messages
-
Download Smartform output in word document
Hi All,
I had a requirement to download the smartform output in ".doc" format.
I had run FM CONVERT_OTF with parameter value format = 'ASCII', and downloaded using .doc format
I was able to download but the output is not having logo and some different symbols are added.
Can any suggest what would be the exact procedure to download the output in word document.
Regards,
Dinakar.Hi Dinakar,
Please check the link provided:
Help with Smartform download - unwanted items showing in file
The solution provided in this link is very relevant for your question, so hope you will get the solution.
Thanks & regards,
Sarita Singh Rathour -
After downloading my file the word document is mostly gibberish. Why? Service used "exportPDF".
Hi shelbyrn,
The quality of a conversion really depends on the quality of the original PDF file. Please see Will Adobe ExportPDF convert both text and form... | Adobe Community. Do you know what or how the PDF file was created?
You may have better luck by disabling OCR as described in this document: How to disable Optical Character Recognition (O... | Adobe Community. (Note, however, that is option isn't optimal if the PDF was created from a scanned document; you'd want OCR enabled to convert the image text in the PDF to editable text).
Best,
Sara -
How can we save smartform output as word document
Hi Friends,
Can anybody help me, how to save Smartform output as Word document instead of PDF file.
Thanks,
Ramana.Hi Venkat,
I think you can do it manually.
After the print preview, Select the menu <b>Goto->List Display</b>.
Now select the menu <b>System->List->Save->Local File</b>.
Now you can select the radio buttion <b>Rich Text Format</b>.
Now you save the document as a .doc file (say test.doc)
That is it!!!!!
<b>Award points if found useful.</b>
Regards,
SP. -
How to download graph output into word document?
Hello experts!
I have plotted graphs using some data.
The graph is actually output of a function module into a container.
Can anybody tell me , how can i download this graphs into a word document?
I am able to download text data into word documents, but not graphs.
Regards,
RahulSteelers, unfortunately your reply didn't get through. Perhaps you tried to send an attachment or screen shot by email? Please try again (but not sending attachments or screen shots by email).
-
Is there a free app I can download that is a (Word) Document on my Mac?
Is there a free app I can download that is a (Word) Document on my Mac?
As far as I know, any free word processing apps would be no where near as good as opposed to just purchasing iWork (Apple's version of Word) or Microsoft Office for Mac. It's definitely worth the price to buy one of these if your planning on using it a lot.
iWork
http://www.apple.com/iwork/pages/
Microsoft Office for Mac
http://store.apple.com/us/browse/campaigns/office -
Smartform output in word document
hi all,
how to download a smartform in word document so that the user can make changes in it. i tried converting the output into OTF format but formatting is not coming properly.how to overcome this?Hi,
Even i had the same requirement for a sales order form to download in word and then change it manually before sending to customer. I tried a lot of ways to do the same and finally raised a sap noted for the same.i got a reply from SAP that it is not possible to download forms in word with same allignments maintained with logo. SAP note 641560 says the same thing.
All you need to do is find a technical solution to fill the data which they want to fill maually or go for adobe form. Thats amazing technology to solve your issue. -
Formatting output and downloading it as a word document
Hello,
I have come across this requirement where i have to draw a table with certain number of rows and columns(defined), with data in a few columns being static and data in a few other columns being dynamic. Also I need to insert objects like ean xcel sheet or a word document into some columns. Finally download this whole thing as a word document to the desktopobjects(kind of an analysis report). Smartforms do not have any options to insert . So, is there any other way to do this??? Kindly help.Hi Nandini,
As suggested by Soumya you can go for Webdynpro or else I would like to suggest you to have a SAP Adobe Interactive form.
Please find the links below,.... will give you clear picture on SAP Adobe Interactive forms.
<<linkfarm removed by moderator>>
Hope this will suit you.
Thanks & Regards
Manu S
Edited by: ManuSNair on Jan 17, 2012 9:30 AM
Edited by: kishan P on Jan 17, 2012 11:12 AM -
Downloading of file(Microsoft Word Document)
I have a problem regarding with downloading of Word Document file, the download is working but the when i open the file an was Exception written in the File, here is my code, can anybody help me with this problem? any help is greatly appreciated
public ActionForward execute(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response)
throws Exception {
ActionErrors errors = new ActionErrors();
ActionForward forward = new ActionForward(); // return value
UtilityBean _bean = null;
String fileName = "Sample.doc";
System.out.println("Download Word Document");
// set the header details
int id = 8;
System.out.println("ID is: " + id);
// details
System.out.println("Download Word Document");
// set the header details
try {
_bean = new UtilityBean();
_bean = DAOFacade.file(id);
response.setContentType("application/msword");
response.setHeader("Content-Disposition", "attachment; filename="
+ fileName);
//set the content type to related file
FileOutputStream fileOut = new FileOutputStream(
"c:\\tempWordOutput.doc");
InputStream inStream = new BufferedInputStream(new FileInputStream(
"c:\\tempWordOutput.doc"));
OutputStream outStream = response.getOutputStream();
// set buffer size. Each attempt to read the file will use // //
// specified number of bytes
byte[] buf = new byte[4 * 1024];
int bytesRead = 0;
while ((bytesRead = inStream.read(buf)) != -1) {
outStream.write(buf, 0, bytesRead);
outStream.flush();
outStream.close();
inStream.close();
} catch (Exception e) {
e.printStackTrace();
// If a message is required, save the specified key(s)
// into the request for use by the <struts:errors> tag.
if (!errors.isEmpty()) {
saveErrors(request, errors);
// Forward control to the appropriate 'failure' URI (change name as
// desired)
// forward = mapping.findForward("failure");
} else {
// Forward control to the appropriate 'success' URI (change name as
// desired)
// forward = mapping.findForward("success");
// Finish with
return (forward);
* @return
private HttpServletResponse HttpServletResponse() {
// TODO Auto-generated method stub
return null;
//------------------------GENERATED FILE------------------------------------
<H1>Error page exception</H1>
<H4>The server cannot use the error page specified for your application to handle the Original Exception printed below. Please see the Error Page Exception below for a description of the problem with the specified error page.</H4>
<BR><H3>Original Exception: </H3>
<B>Error Message: </B><BR>
<B>Error Code: </B>500<BR>
<B>Target Servlet: </B>action<BR>
<B>Error Stack: </B><BR>
java.lang.NullPointerException
<BR>
at org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:441)
<BR>
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:279)
<BR>
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
<BR>
at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507)
<BR>
at javax.servlet.http.HttpServlet.service(HttpServlet.java:743)
<BR>
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
<BR>
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1212)
<BR>
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:629)
<BR>
at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:2837)
<BR>
at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:220)
<BR>
at com.ibm.ws.webcontainer.VirtualHost.handleRequest(VirtualHost.java:204)
<BR>
at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:1681)
<BR>
at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:77)
<BR>
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:421)
<BR>
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:367)
<BR>
at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:94)
<BR>
at com.ibm.ws.tcp.channel.impl.WorkQueueManager.requestComplete(WorkQueueManager.java:548)
<BR>
at com.ibm.ws.tcp.channel.impl.WorkQueueManager.attemptIO(WorkQueueManager.java:601)
<BR>
at com.ibm.ws.tcp.channel.impl.WorkQueueManager.workerRun(WorkQueueManager.java:934)
<BR>
at com.ibm.ws.tcp.channel.impl.WorkQueueManager$Worker.run(WorkQueueManager.java:1021)
<BR>
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1332)
<BR>
<BR>
<BR><BR><H3>Error Page Exception: </H3>
<B>Error Message: </B>SRVE0199E: OutputStream already obtained<BR>
<B>Error Code: </B>0<BR>
<B>Target Servlet: </B>null<BR>
<B>Error Stack: </B><BR>
java.lang.IllegalStateException: SRVE0199E: OutputStream already obtained
<BR>
at com.ibm.ws.webcontainer.srt.SRTServletResponse.getWriter(SRTServletResponse.java:462)
<BR>
at com.ibm.ws.webcontainer.webapp.WebApp.sendError(WebApp.java:2484)
<BR>
at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:2861)
<BR>
at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:220)
<BR>
at com.ibm.ws.webcontainer.VirtualHost.handleRequest(VirtualHost.java:204)
<BR>
at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:1681)
<BR>
at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:77)
<BR>
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:421)
<BR>
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:367)
<BR>
at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:94)
<BR>
at com.ibm.ws.tcp.channel.impl.WorkQueueManager.requestComplete(WorkQueueManager.java:548)
<BR>
at com.ibm.ws.tcp.channel.impl.WorkQueueManager.attemptIO(WorkQueueManager.java:601)
<BR>
at com.ibm.ws.tcp.channel.impl.WorkQueueManager.workerRun(WorkQueueManager.java:934)
<BR>
at com.ibm.ws.tcp.channel.impl.WorkQueueManager$Worker.run(WorkQueueManager.java:1021)
<BR>
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1332)
<BR>
<BR><B>Error Message: </B>SRVE0199E: OutputStream already obtained<BR>
<B>Error Code: </B>0<BR>
<B>Target Servlet: </B>null<BR>
<B>Error Stack: </B><BR>
java.lang.IllegalStateException: SRVE0199E: OutputStream already obtained
this is the error because you have alredy closed the output stream
outStream.flush();
outStream.close();
and then you return the Actionforward and struts Controller tries to write to the already closed output stream once again and hence the above exception is thrown
Please refer to the below link to find how to implement a download action in struts
http://wiki.apache.org/struts/StrutsFileDownload -
When downloading anything Firefox downloads it as a word document causing the document to appear as letter and numbers without sense. Firefox has done it for all documents that as pdf's are in a site, so I can not save them or downloaded, but not even read them.
When downloaded Adobe reader, a Fire Fox down loader window appeared and after several minutes a message said that it was downloaded, but a run window never appeared, so I clicked on the program (on that little fire fox downloader window) and it opened a word document with encoded letter. AGAIN!
-
Opening a Word document in a form layout html region
Hi all,
In an Interactive Report I use
select '<img src="#WORKSPACE_IMAGES#'||package.f_get_document_type ( doc.id )||'" title="Document" width=20 height=20>'
) document
from table
to show an icon that eventually downloads (and shows) a word document.
Now I have a form layout html region and I want to have the same icon\link to show a document.The document however is not in the same table as the rest of the page is based on.
How can I show the document on this page?
Kind Regards,
Maurice
Environment = Apex 4.0 database 11G
Edited by: maurice.niezen on Aug 31, 2010 2:10 AMOne way, create a hidden item, and return the value into it from your package (by having a computation that calls the function package.f_get_document_type(:P1_DOC_ID) . Let's say it's called :P1_DOC_TYPE
There's a new item type in Apex 4, which is Display Image.
When you get to settings in the item creation wizard, specify what the image is based on. From there, you can set it to be 'Image URL stored in Page item Value. Then on the source page, you can just specify the URL, #WORKSPACE_IMAGES#&P1_DOC_TYPE. -
Convert Smartform in WORD Document
Hi Gurus
How can i convert a smartform Output in a word document ??? and download into PC..
Regards
GregoryThere is no standard possibility to do Word outputs in SAP.
Anyway you can develop connection of Mail-merge technology of Microsoft and SAP ABAP class i_oi_document_proxy.
http://help.sap.com/saphelp_sm32/helpdata/EN/e9/0be980408e11d1893b0000e8323c4f/content.htm
with interface get_mail_merge_interface:
http://help.sap.com/saphelp_sm32/helpdata/en/6e/8fc2e3dd0d11d2bdba080009b4534c/content.htm
Simple example I found here:
http://www.sap2word.de/abap.html
Hope, it helps
Edited by: Dimy IT dev on Sep 7, 2009 2:58 PM -
Download form in word document
Hi,
Can i download the smartform in word document. I know it is possible in PDF, but my requirement is they want that form in word document.Hi,
you can find usefull documents from the following link
http://help.sap.com/saphelp_nw2004s/helpdata/en/ed/62073c44564d59e10000000a114084/frameset.htm
Hope it helps.
Regards.
Sukanya -
Exporting smartform into word document
how to export smartform into word document . i tried converting into pdf and then download but it showing run time error that conversion is not possible and also it tells that otf command // missing. is it not possible to export directly to word document instead of pdf.plz give clear description of what to be done exactly with sample codes.
marks will be rewarded.Hi Lavanya,
Converting the output from Spool to Word is possible.
Here is the sample code.
I cut pasted a code from a link i got in the website, see if it helps.
ZSPOOL2WORD
Genera un fichero Word a partir de una orden de spool
MÓDULO : FI *
TIPO : Listado *
TITULO : Generación fichero Word
DESCRIPCION : Genera un fichero Word a partir de una orden de spool
AUTOR: Andres Picazo FECHA: 24/03/2003 *
MODIFICACIONES *
FECHA NOMBRE DESCRIPCION *
REPORT ZSPOOL2WORD
NO STANDARD PAGE HEADING
LINE-COUNT 065
LINE-SIZE 080.
INCLUDE OLE2INCL.
*----TABLAS/ESTRUCTURAS--
*----TABLAS INTERNAS--
DATA I_BUFFER(132) OCCURS 1000000 WITH HEADER LINE.
*----VARIABLES--
*----PARAMETER/SELECT-OPTIONS EN PANTALLA--
SELECTION-SCREEN BEGIN OF BLOCK BLK_PAR WITH FRAME TITLE TEXT-SEL. "Pará
PARAMETERS: P_SPOOL LIKE TSP01-RQIDENT OBLIGATORY.
SELECTION-SCREEN END OF BLOCK BLK_PAR.
SELECTION-SCREEN BEGIN OF BLOCK BLK_WOR WITH FRAME TITLE TEXT-WOR.
PARAMETERS: P_WORD AS CHECKBOX DEFAULT 'X'.
PARAMETERS: P_FWOR LIKE RLGRAP-FILENAME DEFAULT 'C:MAYOR.DOC'.
PARAMETERS: P_PLAN LIKE RLGRAP-FILENAME
DEFAULT 'D:DATOSAPISMAYORPLANTILLA LIBRO MAYOR.DOC'.
SELECTION-SCREEN END OF BLOCK BLK_WOR.
SELECTION-SCREEN BEGIN OF BLOCK BLK_FIC WITH FRAME TITLE TEXT-FIC.
PARAMETERS: P_CTXT AS CHECKBOX DEFAULT ''.
PARAMETERS: P_FTXT LIKE RLGRAP-FILENAME DEFAULT 'C:MAYOR.TXT'.
SELECTION-SCREEN END OF BLOCK BLK_FIC.
LOGICA DEL PROGRAMA
INITIALIZATION
INITIALIZATION.
START-OF-SELECTION.
START-OF-SELECTION.
PERFORM LEER_SPOOL.
IF NOT P_CTXT IS INITIAL.
PERFORM GRABA_FICHERO.
ENDIF.
IF NOT P_WORD IS INITIAL.
PERFORM LANZA_WORD.
ENDIF.
FORMS ADICIONALES
*& Form LEER_SPOOL
Lee la orden de spool en el buffer
FORM LEER_SPOOL.
CALL FUNCTION 'RSPO_RETURN_ABAP_SPOOLJOB'
EXPORTING
RQIDENT = P_SPOOL
FIRST_LINE = 1
LAST_LINE = 9999999
TABLES
BUFFER = I_BUFFER
EXCEPTIONS
NO_SUCH_JOB = 1
NOT_ABAP_LIST = 2
JOB_CONTAINS_NO_DATA = 3
SELECTION_EMPTY = 4
NO_PERMISSION = 5
CAN_NOT_ACCESS = 6
READ_ERROR = 7
OTHERS = 8.
IF SY-SUBRC NE 0.
MESSAGE E398(00) WITH 'Error' SY-SUBRC
'al leer la orden de spool' P_SPOOL.
ENDIF.
ENDFORM. " LEER_SPOOL
*& Form GRABA_FICHERO
Graba el contenido del spool a fichero de texto.
FORM GRABA_FICHERO.
CALL FUNCTION 'WS_DOWNLOAD'
EXPORTING
BIN_FILESIZE = ' '
CODEPAGE = ' '
FILENAME = P_FTXT
FILETYPE = 'ASC'
MODE = ' '
WK1_N_FORMAT = ' '
WK1_N_SIZE = ' '
WK1_T_FORMAT = ' '
WK1_T_SIZE = ' '
COL_SELECT = ' '
COL_SELECTMASK = ' '
NO_AUTH_CHECK = ' '
IMPORTING
FILELENGTH =
TABLES
DATA_TAB = I_BUFFER
FIELDNAMES =
EXCEPTIONS
FILE_OPEN_ERROR = 1
FILE_WRITE_ERROR = 2
INVALID_FILESIZE = 3
INVALID_TABLE_WIDTH = 4
INVALID_TYPE = 5
NO_BATCH = 6
UNKNOWN_ERROR = 7
GUI_REFUSE_FILETRANSFER = 8
OTHERS = 9.
IF SY-SUBRC NE 0.
MESSAGE E398(00) WITH 'Error' SY-SUBRC
'al grabar el fichero' P_FTXT.
ENDIF.
ENDFORM. " GRABA_FICHERO
*& Form LANZA_WORD
Abre la plantilla de Word y pega el contenido del portapapeles.
FORM LANZA_WORD.
DATA: WORDAPP TYPE OLE2_OBJECT,
DOCUMENT TYPE OLE2_OBJECT,
SELECTION TYPE OLE2_OBJECT.
Copia el contenido del buffer en el portapeles
CALL FUNCTION 'CLPB_EXPORT'
TABLES
DATA_TAB = I_BUFFER
EXCEPTIONS
CLPB_ERROR = 1
OTHERS = 2.
Abre Word
CREATE OBJECT WORDAPP 'word.application'.
IF SY-SUBRC NE 0.
MESSAGE E398(00) WITH 'No se ha podido abrir el Word'.
ENDIF.
Lo pone en visible
SET PROPERTY OF WORDAPP 'Visible' = 1.
Cogemes el objeto documento
CALL METHOD OF WORDAPP 'Documents' = DOCUMENT.
Abrimos el fichero plantilla
IF P_PLAN IS INITIAL.
CALL METHOD OF DOCUMENT 'Add'.
ELSE.
CALL METHOD OF DOCUMENT 'Open' EXPORTING #1 = P_PLAN.
IF SY-SUBRC NE 0.
MESSAGE E398(00) WITH 'Error al leer el fichero plantilla'.
ENDIF.
ENDIF.
Coge el objeto selección
CALL METHOD OF WORDAPP 'Selection' = SELECTION.
Pega el contenido del portapapeles
CALL METHOD OF SELECTION 'Paste'.
IF SY-SUBRC NE 0.
MESSAGE E398(00) WITH 'Error al pegar contenido del portapapeles'.
ENDIF.
Graba el fichero
CALL METHOD OF WORDAPP 'ActiveDocument' = DOCUMENT.
CALL METHOD OF DOCUMENT 'SaveAs' EXPORTING #1 = P_FWOR.
IF SY-SUBRC NE 0.
MESSAGE E398(00) WITH 'Error al grabar el nuevo documento'.
ENDIF.
Cierra Word
CALL METHOD OF WORDAPP 'Quit'.
IF SY-SUBRC NE 0.
MESSAGE E398(00) WITH 'Error al cerrar Word'.
ENDIF.
ENDFORM. " LANZA_WORD
check this also.................
By using FM RSPO_RETURN_ABAP_SPOOLJOB you will be able to get the ASCII text of your Spool, which you can download to your local HD and open with M$ Word.
Check the function module
CALL FUNCTION 'RSPO_DOWNLOAD_SPOOLJOB'
EXPORTING
id = p_spool
fname = p_file.
Give the file extn as .DOC. it will downlaod it as a
Word doc.But I fear you wont get the table formats and
all.
~~Guduri -
I downloaded the adobe XI software and it shows in my Adobe download assistant as downloaded but I can not open it and it is not a part of my applications. Very frustrating download process as I just want to convert a PDF file to an editable word document...
Odonnells52 you will still need to install Adobe Acrobat Professional prior to being able to make edits to PDF or utilize Acrobat. By default the installation files have been saved to your download folder.
If you continue to face difficulties with the Adobe Download Assistant then please see Troubleshoot Adobe Download Assistant.
You can also download the installation files directly from Download Acrobat products | Standard, Pro | XI, X if you are unable to locate the downloaded installation files.
Maybe you are looking for
-
Different Attachment extension(.xls,.txt) in sender mail adapter
Hi Experts Is it possible to use different type of attachment extension (e.g .xls,.txt) in the sender mail adapter? My requirement is , the attachment in the mail adapter will be used as the main payload.So I am using PayloadSwapBean adapter module.
-
Keyword FIND problem in CS3 Bridge (Windows XP Professional)
Select a large group of photos. File > File Info. In File Info dialogue box, enter Europe in the keyword field. Next, select a sub-group, add the keyword as above Italy. For another sub-group add the word France, and for a third sub-group add the wor
-
How do I save the contents of all of my saved mail folders?
How do I save the contents of all of my saved mail folders?
-
Why is my child's number receiving texts on my iPad?
All of a sudden I'm getting face time from my kid's assigned # Face time too! Why oh why
-
ORACLE_HOME/log/diag/clients folder with no ADR. What it is for?
Hi, I'm behind a troubleshooting in a 11.2.0.1 DB, and for it I enabled sqlnet trace level 16 for both server and client (since the issue is related with Nagios connections running on the same server). [So, this is my first time testing with traces]