Convert Smartform in WORD Document
Hi Gurus
How can i convert a smartform Output in a word document ??? and download into PC..
Regards
Gregory
There 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
Similar Messages
-
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 -
How do I download a Adobe PDF file and get it converted to a Word document?
How do I download a Adobe PDF file and get it converted to a Word document?
Download: you just download it as you would any other document.
Convert to Word: either using the ExportPDF online service, or Acrobat. -
How do I maintain my hyperlinks when converting a Microsoft Word Document to a PDF file?
How do I maintain my hyperlinks when converting a Microsoft Word document to a PDF file?
Hi Marbarrose,
When you make word file including hyperlinks then convert in pdf.
It will automatically maintain hyperlinks.
Regards,
Florence -
convert html to word document ,
I tried poi-3.0.2-FINAL,Apache POI - HWPF - Java API to Handle Microsoft Word Files
it is not working...My actual goal is convert html file into word document,
i posted into forum, some people are suggested HWPF just look,
I tried one by one program i not getting any answer for example one program,
HWPFDocument doc = new HWPFDocument (new FileInputStream ("c:\\temp.doc"));
Range r = doc.getRange();
System.out.println("Example you supplied:");
System.out.println("---------------------");
for (int x = 0; x < r.numSections(); x++)
Section s = r.getSection(x);
for (int y = 0; y < s.numParagraphs(); y++)
Paragraph p = s.getParagraph(y);
for (int z = 0; z < p.numCharacterRuns(); z++)
//character run
CharacterRun run = p.getCharacterRun(z);
//character run text
String text = run.text();
// show us the text
System.out.print(text);
// use a new line at the paragraph break
System.out.println();
}catch(NullPointerException exception){
exception.printStackTrace();
} catch (FileNotFoundException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
java.io.IOException: Invalid header signature; read 5789751444030890300, expected -2226271756974174256 -
I have a requiremnt to convert a smartform output generated to Word format. Apart from the font sizes, i have a logo generated in smartform which also needs to be converted in that word. Can anyone know about this or have done this requirement then please reply back.
Thanks & Regards,
Pankaj DwivediHi,
<u>A example for you</u>
CALL FUNCTION fm_name " '/1BCDWB/SF00000031'
EXPORTING
control_parameters = control_parameters
output_options = output_options
s_header = st_header
IMPORTING
job_output_info = output_data
TABLES
it_overdue = ITAB[]
EXCEPTIONS
formatting_error = 1
internal_error = 2
send_error = 3
user_canceled = 4
OTHERS = 5
now convert the final document (OTF format) into PDF
format
CALL FUNCTION 'CONVERT_OTF'
EXPORTING
format = 'DOC'
IMPORTING
bin_filesize = v_pdf_len
TABLES
otf = output_data-otfdata
lines = pdf_table
EXCEPTIONS
err_max_linewidth = 1
err_format = 2
err_conv_not_possible = 3
err_bad_otf = 4
OTHERS = 5.
Downloading the PDF file to the local Server
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
FILENAME = L_FILENAME
FILETYPE = C_BIN_FILETYPE
TABLES
DATA_TAB = lt_pdf_nuc_data
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.
Hope this helps you
Regards
Sudheer -
Convert Smartform to WORD by OLE
I developed a quotation form with smartforms and now I'm working hard to convert this form to a WORD document by OLE
I'm in trouble because it works quite fine in WORD 2000 but it doesn't work with WORD 97. I implemented the method cl_gui_frontend_services=>registry_get_value to get the WORD version from frontend but I can't find out what the diefference is. Macros look similar in both versions.
Has anybody got an idea what the difference is ?
Thanks in advance, UlrikeHi Ulrike,
as an alternative way, you can try CONVERT_TEXT function.
http://help.sap.com/saphelp_erp2004/helpdata/en/d6/0dba8f494511d182b70000e829fbfe/frameset.htm
In DOI approach,
do you succeded in converting TABLES to word format?
As I know, unfortunately there are limited number of tools in abap for such conversion.
regards,
Ahmet Sahan -
Acrobat XI Pro Won't Convert 206 Page Word Document into PDF
Hi there
As menetioned above, Acrobat XI Pro Won't Convert my 206 Page Word Document into a PDF. The Word document was originally a PDF file that I converted to Word and it has split all the text into sections.
It sounds like converting a PDF into Word isn't the best way to edit, re-format and then save as a PDF again. I would love to hear your advice on this.
Thanks very much for your help!
FionaFirst before you recreate the PDF from the Word Document.
In word: Open Document
Next open a new Blank docment
switch back to Word click on the ¶ button
scroll to of go to very end of docment.
click just to right of the perion in the last sentence.
now go to very beginning of document
Hold down the Shift and click to the right of first letter in document.
Now choose copy.
Now switch to Blank document
Choose Paste special.
Now choose Text only.
If works all the words will be there spaced correct but with no ¶'s.
Now insert returns as desired.
Now save as a docx file under a different name.
IF you are on a Mac use the following directions:
go to File menu > Print > PDF Hold down PDF button until Context menu pops up.
Choose adobe PDF.
follow steps when the first window opens.
Save as PDF in desired location.
Now open the PDF in Acrobat. Document should be properly formatted and ready to go.
AS you've found The conversion is not seamless. Acrobat doesn't distingish between automatic end of line breaks and Returns and you have to put the pieces back again. I wish Adobe and MS would get over the jealouscy of each other and share howcode works so Thatapplications could work seamlessly together. BUt they never will. -
Acrobat Adobe 9; editing converted pdf to word document
I have acrobat adobe 9 standard and I have converted my document from pdf to microsoft word where
I am suppose to be able to edit it as a word document. It shows up as an image and I am not able to edit it. Does anyone know what I am doing wrong
or can help me.How did you convert?
Acrobat → http://forums.adobe.com/community/acrobat/creating__editing_%26_exporting_pdfs
ExportPDF → http://forums.adobe.com/community/exportpdf -
Adobe Acrobat 8 Standard Question - Converting PDF to word document
Question: I currently have Adobe Acrobat 8. I need to convert a PDF to word document. I know how to do that but the outcome of the word document sometimes varies as to retaining the exact formatting. How can I retain exact formatting? Is there something that I'm not doing that I need to be doing in order to retain the formatting. Also do newer versions (Adobe Acrobat 11 (Standard or Pro?)) do a better job of converting and retaining formatting?
Retaining the exact formatting is not possible in practice or in theory because Word documents are nothing like PDFs. For example, Word will cheerfully reflow text onto new lines or pages, while this will never happen with a PDF.
That said, Adobe keep trying to get closer to what people need. Sometimes this results in complex parts of the file being made into an uneditable graphic or text box.
Bottom line is you can get the basics into Word and then (according to your time, experience, and the abilities of Word) you might be able to reconstruct.
On no account convert official forms to Word. -
How do I convert a microsoft word document to a pdf?
I need help to submit an assignment for school but I can't figure out how to convert word to a pdf. My old computer was easy. All I had to do was right click and convert, not with this computer. Can anyone shed some light? Thank you
Hey cherelle,
You might need to open the word document and choose 'PDFMaker' from the menubar or 'Adobe PDF' printer option from the Files menu for the same.
Hope this helps.
Regards,
Anubha -
How do I convert pdf to word document
I have a pdf file and I want to convert it to a word document. How do I do this.
Hi Auntie Faye,
If you have a subscription to ExportPDF, the process is very straightforward. Here's some getting started info: Getting Started with ExportPDF
If you'd like information about subscribing, please see Acrobat Pro, PDF Pack, Export PDF & More | Acrobat Document Solutions.
Best,
Sara -
How do I edit a scanned file converted to a word document?
How do you take a scanned document to a word document & then edit it?
Many scanners have the ability to save as PDF. If you scan your document to a PDF file, you can then use the ExportPDF service to convert that file to a Word document. The ExportPDF service will perform optical character recognition (OCR) on your document to try to identify the text as actual text instead of an image. You should then be able to edit the file.
Please let us know if you have any questions.
-David -
I'm trying to convert a PFD file into a word processing Word Document. Don't know if this is the right place, but if anyone can tell me how to do it, or direct me a software program, I would appreciate it.
Thank you
PeterHello Peter,
Perhaps this utility can assist you with this task.
http://echoone.com/filejuicer/pdf-to-word
Or this one.
http://www.nemopdf.con/products/pdftoword.html
A simple Google search for "convert PDF to Word" search should give you a plethora of sites as well.
Hope this helps.
B-rock -
Converting pdf into word document
I have just signed up for adobe. how do i convert a pdf into a word document?
Hi Ali,
Welcome to ExportPDF!
Here is a handy 'getting started' guide that should assist you.
Let me know if that helps.
Looking forward to hearing back from you.
Regards, Stacy
Maybe you are looking for
-
I Was updating my i5 phone and it shows picture of iTunes and plug what am I to do? i Can't use my phone and shutting on and off won't help.
-
What are the drawbacks of Selective color vs. curves?
What are the drawbacks of Selective color vs. curves?
-
Script out SSIS packages from SSISDB using powershell
Hi, I was able to script out the packages that are on msdb but I was unable to script out that are in Integration services catalog. Does anyone has any idea on how to do this???? Is this possible at all??? Thanks in advance....
-
im new to apple but I know about computers just not a lot I guess but I had an old 4g DDR ram chip from my dell and I tried to put in in my apple and the apple work fine before but now the power light just blinks and it just beeps now nothing else
-
App organization in iTunes does not transfer to iPhone
I have an iPhone 3G and just purchased a new Mac Pro. I successfully transferred all my songs and apps from my old Mac to the new one. However, when I synched my iPhone for the first time, it placed all of my apps in alphabetical order (except for th