Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Sap - Word - Sap - How make a link ?

Former Member
0 Kudos

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.

1 ACCEPTED SOLUTION

former_member195698
Active Contributor
0 Kudos

Can you check the program SAPRDEMOOFFICEINTEGRATION ? might be of some use. Word Doc is stored in BDS

5 REPLIES 5

former_member195698
Active Contributor
0 Kudos

Can you check the program SAPRDEMOOFFICEINTEGRATION ? might be of some use. Word Doc is stored in BDS

0 Kudos

Hello and thank for reply,

what do you mean with BDS ?

Tks.

0 Kudos

Business Document Service. Sorry, I don't have much idea on that.. you can try searching in SAP help.

Regards,

Aj

0 Kudos

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

Former Member
0 Kudos

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