09-03-2009 1:13 PM
Hello ,
this is my requirement:
From sap I have to open a .doc document and write some data inside. After, the user can modify this document, and once the .doc is modified by user, I have to archive this document in the external container and make a link inside SAP.
So, the first step is not hard (I think and I hope - I can use OLE technolgy ), but I don't know how to make the second step - I mean
from .doc document modified, archive it on the external container and make a link into SAP.
Some idea ??
Tks in advance.
09-03-2009 1:33 PM
Can you check the program SAPRDEMOOFFICEINTEGRATION ? might be of some use. Word Doc is stored in BDS
09-03-2009 1:33 PM
Can you check the program SAPRDEMOOFFICEINTEGRATION ? might be of some use. Word Doc is stored in BDS
09-03-2009 1:58 PM
09-03-2009 3:43 PM
Business Document Service. Sorry, I don't have much idea on that.. you can try searching in SAP help.
Regards,
Aj
09-14-2009 9:17 PM
You can use OLE technology and generate Word document.
There is also DOI technology to develop connection of Mail-merge
technology of Microsoft and SAP ABAP class i_oi_document_proxy,with interfaceget_mail_merge_interface.
http://help.sap.com/saphelp_nw2004s/helpdata/EN/e9/0be775408e11d1893b0000e8323c4f/frameset.htm
Sample code:
http://www.sap2word.de/abap.html
After generation of the Word document, you can save this document in SAP as an attachment to standard transaction in BDS technology - check transaction /NOAOR.
You can save there this document in apropriate class and document number
using method cl_bds_document_set=>create_with_table.
This class let you also to save next generated Word for the same SAP document as new version, with storing all history of changes with method: cl_bds_document_set=>create_version_with_table
Hope it helps
Edited by: Dimmy Kiir on Sep 15, 2009 7:00 PM
09-17-2009 2:42 PM
After modifying the word document try with the below steps to store the document in the BDS server:
1. Use the method get_with_url of BDS instance(CL_BDS_DOCUMENT_SET) to get the BDS address in the URL form:
CONSTANTS:
lc_docu TYPE sbdst_classname VALUE 'SOFFICEINTEGRATION',
lc_type TYPE sbdst_classtype VALUE 'OT',
lc_doc_ok TYPE sbdst_object_key VALUE 'SOFFICEINTEGRATION'.
ls_doc_signature-prop_name = 'DESCRIPTION'.
ls_doc_signature-prop_value = 'DOCUMENT NAME'.
APPEND ls_doc_signature TO li_doc_signature.
CALL METHOD gcl_bds_inst->get_with_url
EXPORTING
classname = lc_docu
classtype = lc_type
object_key = lc_doc_ok
CHANGING
Uris = li_doc_uris
signature = li_doc_signature
EXCEPTIONS
nothing_found = 1
error_kpro = 2
internal_error = 3
parameter_error = 4
not_authorized = 5
not_allowed = 6
OTHERS = 7.
2. Now use the method save_document_to_url of document instance(I_OI_DOCUMENT_PROXY) by passing the URL obtained from thestructure li_doc_uris.
Regards,
Kiran Bobbala