Insert SAP ICONS into from SAP into Word document (OLE)
Hi ,
I want to Insert SAP ICONS into from SAP into Word document (OLE) .
Please let me know how can I do it? I would really appreciate it.
Regards,
Sanjeev
Hello,
Try this out:
(1) Copy program DD_ADD_PICTURE into your own version called ZDD_ADD_PICTURE. Make sure
you select all the checkboxes (including GUI Status and screens).
(2) Paste the modified code at the end of this reply into your ZZ_ADD_PICTURE program.
(3) Run ZZ_ADD_PICTURE for a range of Icons (e.g. enter Icon name ICON_IN* on the selection screen)
(4) When you get the result list, type in ok-code EXPO directly in the ok-code
field (you could also add a button for this function in the GUI status).
(5) Download all the displayed icons as .gif files into a Windows folder
that you have created to hold the icon .gif files (e.g. C:SAPICONS)
(6) Now you can work with the icon files as you would any .gif file. (e.g. In a Word doc, use menu path
Insert -> Picture -> From file.)
Here is the code:
REPORT dd_add_picture.
TYPE-POOLS: sdydo.
DATA: do TYPE REF TO cl_dd_document.
DATA: is_displayed.
TABLES: icont.
DATA: BEGIN OF icontab OCCURS 0.
INCLUDE STRUCTURE icon.
DATA: END OF icontab.
select-options: s_icon for icontab-name obligatory.
SELECT * FROM icon INTO TABLE icontab WHERE locked NE 'X'
AND name in s_icon.
* Event Handler Definition, handling changes of GUI fonts, colors,...
CLASS cl_my_event_handler DEFINITION.
PUBLIC SECTION.
METHODS:
use_new_resources FOR EVENT resources_changed OF cl_gui_resources.
ENDCLASS.
DATA: my_handler TYPE REF TO cl_my_event_handler.
CREATE OBJECT my_handler.
* Call Screen
CALL SCREEN 100.
*& Module STATUS_0100 OUTPUT
MODULE status_0100 OUTPUT.
IF is_displayed IS INITIAL.
SET PF-STATUS 'BRP'.
SET HANDLER my_handler->use_new_resources.
* create document
CREATE OBJECT do.
* fill document
PERFORM dd_add_icon USING do.
* merge document
CALL METHOD do->merge_document.
* display document .
CALL METHOD do->display_document
EXPORTING container = 'HTML'
EXCEPTIONS html_display_error = 1.
" do some exception handling ...
is_displayed = 'X'.
ENDIF.
ENDMODULE. " STATUS_0100 OUTPUT
MODULE user_command_0100 INPUT.
CASE sy-ucomm.
WHEN 'BACK'. "Beenden
LEAVE PROGRAM.
WHEN 'PRN'.
CALL METHOD do->print_document
EXPORTING reuse_control = 'X'.
WHEN 'PRN_NEW'.
DATA text TYPE sdydo_text_element.
CALL METHOD do->initialize_document.
text = 'Dies Dokument wurde speziell fürs Drucken erstellt!' &
' Druckdatum: '(500).
CALL METHOD do->add_text EXPORTING
text = text
sap_fontsize = cl_dd_area=>large.
WRITE sy-datum TO text DD/MM/YYYY.
CALL METHOD do->add_text EXPORTING text = text .
CALL METHOD do->new_line EXPORTING repeat = 2.
PERFORM dd_add_icon USING do.
CALL METHOD do->merge_document.
CALL METHOD do->print_document.
WHEN 'EXPO'.
CALL METHOD do->export_document EXPORTING to_filesystem = 'X'.
ENDCASE.
CLEAR sy-ucomm.
ENDMODULE. " USER_COMMAND_0100 INPUT
*& Form DD_ADD_ICON
* text
FORM dd_add_icon USING p_do TYPE REF TO cl_dd_document.
DATA ta TYPE REF TO cl_dd_table_element.
DATA col1 TYPE REF TO cl_dd_area.
DATA col2 TYPE REF TO cl_dd_area.
DATA col3 TYPE REF TO cl_dd_area.
DATA text TYPE sdydo_text_element.
* set Heading
text = ' Bilder in Dynamischen Dokumenten'(001).
CALL METHOD p_do->add_text EXPORTING text = text
sap_style = 'heading'.
CALL METHOD p_do->new_line.
CALL METHOD p_do->new_line.
CALL METHOD p_do->add_table EXPORTING with_heading = 'X'
no_of_columns = 3
width = '100%'
IMPORTING table = ta.
* set columns
text = 'Ikone'(011).
CALL METHOD ta->add_column EXPORTING heading = text
IMPORTING column = col1.
* fill table
LOOP AT icontab.
SELECT SINGLE * FROM icont WHERE langu = sy-langu
AND id = icontab-id.
CALL METHOD col1->add_icon EXPORTING sap_icon = icontab-name
sap_color = 'LIST_GROUP'.
ENDLOOP.
ENDFORM. " DD_ADD_ICON
* CLASS cl_my_event_handler IMPLEMENTATION.
CLASS cl_my_event_handler IMPLEMENTATION.
METHOD use_new_resources.
IF is_displayed EQ 'X'.
* initialize document
CALL METHOD do->initialize_document.
* fill document
PERFORM dd_add_icon USING do.
* merge document
CALL METHOD do->merge_document.
* display document
CALL METHOD do->display_document
EXPORTING reuse_control = 'X'
reuse_registration = 'X'.
ENDIF.
ENDMETHOD.
ENDCLASS.
Regards,
Vasanth
Similar Messages
-
Insert IPA symbols into Word document
Hi,
Does anyone know what is required to insert IPA symbols into a Word (v. X) document. The type of symbols I'm looking for can be found here, but I can't get them into my Word documents. I'm afraid I'm missing some special font or symbol library, but I have no idea which ones. Does anyone know what I might need to get symbols into my documents? Thanks very much.
-NifflerXThe openoffice spreadsheets work and when I save them
as .xls files and open them in NeoOffice they still
work, but if I open them in Word v. X I get no
symbols. However, if I open the NeoOffice created
files in 2004 I have no problems whatsoever. So I
think for my local stuff I'll use NeoOffice, but I'll
have to get Word 2004 to interact with my co-workers.
There is nothing you can do to make this work with WordX, which is not compatible with Unicode IPA. Getting Word2004 will not help. If your co-workers only have WordX, then you have to also use WordX yourself and download the special non-Unicode fonts from SIL. WordX and Word2004 use two different standards for what codes generate what symbols. And the standard used by WordX is obsolete, or almost so. -
Inserting my photos into Word document
I am putting together a document of my family history and want to insert some photos I've taken into it. But the photos are each about 2.2MB - 2.9 MB and when I copied & pasted the photos into the Word doc the Word doc ended up at 124MB! W/out these photos the Word doc is 11MB!
These are photos I've taken and are in my iPhoto. I've inserted other photos for which I don't have the original so I've scanned these and then inserted into the doc - they are much smaller and range from 24KB to 264KB depending on the size of the original. How do I get around this problem?
Many thanksTerence
Again thanks for yr advice. Having played around with the various options you gave in yr response to my other posting, I think the best method for me inserting my photos in the Word doc is to export to desktop as that way I can alter the size of the file.
By scaling the photo to a smaller size, the file size is much smaller. I found if I just dragged the photo to the desktop and then into my Word doc, then the photo was still about 2.2MB. By scaling it down as it was exported, and then dragging into Word doc it was only 224KB.
Does this approach sound right to you? -
Am unable to insert table and graphs into word document in labwindow/CVI? can any one help me ?
Are you using the Word Report Generation instrument? You can find it in toolslib\activex\word\wordreport.fp under the CVI directory.
The instrument comes with a sample project that shows how to include table and graphs in a Word document: see samples\activex\word\wordrpt.cws in the samples foder of your CVI installation.
Proud to use LW/CVI from 3.1 on.
My contributions to the Developer Zone Community
If I have helped you, why not giving me a kudos? -
Any ideas how I can insert a pdf into word, using the insert object option. However the pdf i want to insert has text and lines annotated, but once inserted the comments don't appear???? any help would be greatly appreciated.
You will need to find a forum for MS Word since that is the software that you are trying to manipulate in this. If you think the processing/creation of the PDF plays a role then you should ask in the forum for the software that you are using to create the PDF.
This forum is for issue regarding downloading and installing Adobe trial products, so in any circumstance, your issue does not fit in this forum. -
Illustrator JPGs turn into Black box when pasted into Word documents
I have made JPGs of my letter headding to paste into Word documents. When I paste them they look like a big black box. It doesn't even seem consistant, sometimes it works mostly it doesn't. How can I fix this issue?
How are you "pasting" them? If you are exporting JPG from Illustrator use Worst's Insert > Picture > From File. PNG would probably be a better option for your export, though.
-
Turning PDF Documents into Word Documents
Can I use my Adobe Creative Suite 6 to turn PDF documents into Word Documents?
Acrobat comes with most versions of Creative Suite and it is capable of converting PDFs to Word documents. The quality of the results depend on a number of things. If the PDF was originally generated from a Word source and it's well tagged, you will get much better results. More complicated layouts will generally have worse results and there will be considerable cleanup in Word needed. Exporting to text is sometimes better.
For the future, there is a better forum for this type of question: http://forums.adobe.com/community/acrobat/creating__editing_%26_exporting_pdfs?view=discus sions -
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 can I convert my Open Source document files into Word document files? I cannot download Pages since my Macbook Air does not have the most recent software. I downloaded open office to my mac to try and save money. It worked well for a while. Now I get this pop-up message that asks me to "Reopen" and when I select the option, nothing happens. I cannot save my documents anymore and I cannot convert them to word. Help!
dwb wrote:
Does OpenOffice output Word documents by default or do you have to select it manually?
You have 17 options to save as in Open Office, one of which is .doc files, yes it needs to be saved manually.
You may be able to default to DOC, but have not tried same.
Since Open Office is 99% same as Word, I use it, or Word, either one. Open Office is a bit less buggy than Word 11' -
I've become increasingly frustrated with the ipad adobe app. I've subscribed to be able to convert my pdf files into word documents and it has yet to work I've paid for a service that does not work which in turn makes me a disgruntled customer to say the least very disappointed with such horrible service
Which service did you subscribe to? Adobe PDF Pack?
Once I know the service that you subscribed to, I can move this post to the right forum so that you can get in touch with the folks who can assist you. -
How do you convert a jpeg file into word document so i can edit it?
How do you convert a jpeg file into word document so i can edit it?
http://office.microsoft.com/en-us/mac-word-help/training-edit-pictures-in-office -for-mac-2011-RZ103709558.aspx
-
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 any way to insert a sharp into excel through OLE?
Dear Expert,
Is there any way to insert a sharp into excel through OLE ?If have , Would you please give a sample code?
BR EdwardHi,
Check this link..[OLE2, Excel, WinWord |http://translate.google.com/translate?hl=en&sl=ru&u=http://www.sapnet.ru/] you can find the code snippets. -
How to insert Tab Pages into a document
I have a print job, where I need to insert tab pages into a document. Is there a tab template that I can insert into the Indesign document? If not, how can I create tab pages in Indesign?
When I used to do tabs I would set up a page that was as wide as the tab sheet including the tab, then add text frames in each tab position.
-
How do I copy and paste text from a converted Word document?
I just converted a pdf file into word. I want to copy and paste the informatiuon into another document. How do I do that?
Hi Sara. Tanks for responding. If I cannot figure this out (I was up
until 2am last night), I want to cancel my subscription.
Here are two files you can check on/help me with. When I try again, it
comes up 'an error has occurred when trying to access the service.'
Please advise.
Pat Tomassi
In a message dated 11/1/2014 12:55:23 A.M. Eastern Daylight Time,
[email protected] writes:
How do I copy and paste text from a converted Word document?
created by Sara.Forsberg (https://forums.adobe.com/people/Sara.Forsberg)
in Adobe Acrobat.com Services - View the full discussion
(https://forums.adobe.com/message/6888908#6888908)
Maybe you are looking for
-
This pops up when exporting in iMovie "Unable to prepare project for publishing: The project could not be prepared for publishing because an error occurred. (ParamErr: error in user parameter list)" I have turned off my Time Machine in terminal yet i
-
I can't hook my phone to computer via USB
When I attach my phone to my PC... I get a USB error. The computer is not recognizing my phone. What can I do?
-
In report value are comming but itz a old one but we required new one
hello expert , I am developing a report related to payroll , one field desiznation of employee field value are comming but itz a old one . ie if any employee got promotion , it dosn't showing updated field . i checked pa30 for this e
-
Default values in cascading prompts
Hi, We are using Crystal Reports 2008 and our environment is Business Objects XI 3.1. We have certain crystal reports with dynamic cascading prompts. Is there anyway where we can set the default value in the child parameter based upon the value selec
-
Stopped Initial download for Bupa_Main in CRM in between
Hi Experts, We have a problem in CRM. The initial download for the object BUPA_MAIN was accidently started by one of collegues. The job ran for almost 24 hour adn was still running. The queues went as high as to 40000 entries & the outbound queues st