2007 Jul 09 7:04 AM
This is the first time i am using ole.How do i use the functions.what is actually ole application and what are the fuctions which are called using the handler?how is it that the word file accessed???
Please do help me out.Thanks in advance
2007 Jul 09 8:00 AM
Go to Se38 . In Menu ENVIRONMENT>EXAMPLES>CONTROLs EXAMPLES..
You will get some of the examples of OLE Examples.
some ex: are as follows..
in Se38 check these
1. SAPRDEMODOCUMENTCONTAINER
2.RSDEMO01
3. RSOLETT1.
Reward if usefull..
2007 Jul 09 7:06 AM
Hi,
Check this 1.
http://help.sap.com/saphelp_46c/helpdata/en/59/ae3c98488f11d189490000e829fbbd/frameset.htm
Reward if useful!
2007 Jul 09 7:24 AM
Hi,
Through its Open Object Interface, ABAP supports the OLE2 Automation technique. Desktop applications that provide their functionality in the form of an OLE2 Automation Server (such as Excel or WinWord) can be thus be integrated into R/3.
All applications controlled by ABAP must be registered in R/3.
The following ABAP key words control the applications:
<b>CREATE OBJECT
SET PROPERTY
GET PROPERTY
CALL METHOD
FREE OBJECT</b>
When called from an ABAP program, the SAPGUI acts as OLE client, and the desktop application as the OLE server.
while working with ole, you must <b>include OLE2iNCL</b> program and define each object of type <b>OLE2_OBJECT</b>
<b>for more information follow these links.</b>
http://help.sap.com/saphelp_46c/helpdata/en/59/ae3c98488f11d189490000e829fbbd/frameset.htm
sample program on excel
http://help.sap.com/saphelp_46c/helpdata/en/72/90fd343603c95ee10000009b38f844/frameset.htm
regards,
Ashok Reddy
2007 Jul 09 9:51 AM
my requirement is that there is a word document,where there is a value as &word& and this should be replaced by the value passed from sap.Is this possible.If possible how,Could you please give the code.this is done using ole
2007 Aug 14 10:47 AM
hi nisha,
I am alos having the same requirement.
Can you plz send me a sample code @ doshivinod@gmail.com.
I will be gr8 help for me.
2007 Jul 09 7:49 AM
how do i get to know what are the functions available for the application used?
2007 Jul 09 8:00 AM
Go to Se38 . In Menu ENVIRONMENT>EXAMPLES>CONTROLs EXAMPLES..
You will get some of the examples of OLE Examples.
some ex: are as follows..
in Se38 check these
1. SAPRDEMODOCUMENTCONTAINER
2.RSDEMO01
3. RSOLETT1.
Reward if usefull..
2007 Aug 25 7:32 AM
* word declarations
DATA: WORD TYPE OLE2_OBJECT.
DATA: DOCUMENTS TYPE OLE2_OBJECT.
DATA: ACTDOC TYPE OLE2_OBJECT.
DATA: SELECTION TYPE OLE2_OBJECT.
DATA: FIND TYPE OLE2_OBJECT.
CREATE OBJECT WORD 'WORD.APPLICATION' .
IF SY-SUBRC NE 0 .
MESSAGE S000(SU) WITH 'Error while creating OLE object!'.
LEAVE PROGRAM .
ENDIF .
*--setting object's visibility property
SET PROPERTY OF WORD 'visible' = '1' .
GET PROPERTY OF WORD 'documents' = DOCUMENTS.
CALL METHOD OF DOCUMENTS 'Open'
EXPORTING
#1 = 'C:file.doc'. " your current doc
*--Getting active document handle
GET PROPERTY OF WORD 'activedocument' = ACTDOC .
*--Getting applications handle
GET PROPERTY OF ACTDOC 'application' = APPLICATION .
GET PROPERTY OF APPLICATION 'Selection' = SELECTION.
* find
GET PROPERTY OF SELECTION 'find' = FIND.
SET PROPERTY OF FIND 'Text' = '&word&'.
do 10 times.
CALL METHOD OF FIND 'Execute'.
CALL METHOD OF selection 'TypeText'
EXPORTING
#1 = 'some value'.
enddo.