Application Development and Automation 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: 
Read only

Help Document linked to Transaction

IanStubbings
Active Participant
0 Likes
648

Afternoon all

I wish to link a word document to a pushbutton on my toolbar in a new transaction I am writing. I would like to upload the document to SAP so that I do not have to worry about file systems etc. How would I achieve this?

Would I use the web repository?

Any help greatly appreciated.

Ian

Afternoon all

I wish to link a word document to a pushbutton on my toolbar in a new transaction I am writing. I would like to upload the document to SAP so that I do not have to worry about file systems etc. How would I achieve this?

Would I use the web repository?

Any help greatly appreciated.

Ian

3 REPLIES 3
Read only

athavanraja
Active Contributor
0 Likes
561

you can load the document into BDS (Business Document system) using transaction OAOR and use them in your transaction.

for example your report name is "Y_TEST_REPORT"

go to transaction OAOR

enter class name as "REPORT"

and class type as "BO"

and object key as "Y_TEST_REPORT"

from the resulting screen upload your document.

within your report just call the following function module.


call function 'SWU_OBJECT_PUBLISH'
       exporting
            objtype           = 'REPORT'
            objkey            = 'Y_TEST_REPORT'
       exceptions
            objtype_not_found = 1
            others            = 2.

run the program and see , now from your program also you can upload documents into BDS. all the documents will be associated with the corresponding report.

Regards

Raja

Read only

0 Likes
561

Durairaj

That is very helpful thank you. I think I have misled you with my use of 'link' however. What I wish to do is to the store the document - now done but then display it directly from the transaction without going via the links menu. Is there a way this can be achieved?

Ian

Read only

0 Likes
561

Now sorted.

I used the classes CL_BDS_DOCUMENT_SET and CL_BDS_DOCUMENT to obtain the doc_id and then display it.

Many thanks for pointing me in the right direction.

Cheers

Ian