cancel
Showing results for 
Search instead for 
Did you mean: 

Webdynpro ABAP application to open a document saved in KM

Former Member
0 Kudos

Hi All,

Need your help.

I have the following scenario to work on it:

My client wants to upload the form16 of all employee to EP and and wants to give a link in ess for that file to it's employees. The form16 will in PDF format and the total number of files will be 30,000 as my client have 30,000 employeess and there will be one form16 file for each employee. My client wants to upload all forms16 (30,000 files) to EP every year by replacing the old one for previous year.

I understand that mass upload of files is required as one by one file upload is not possible for 30,000 files. I also understand that after uploading the files to KM, I will need a Web Dynpro ABAP application to download a perticular file from KM to local pc and open it for the logged in employee. And for that the file name should be the employee number so we can get a perticular file for perticular employee.

now, I have the following questions:

1) What solution should I provide to my client for mass upload of 30,000 files to KM so that they can upload those files every year and remove the old files.

2) In Web Dynpro ABAP how can I down load the single file related to loggin user from KM to local (user's) pc and open it in adobe acrobat reader.

I request you to suggest me in this matter.

Thanks in advance.

Vikrant

Accepted Solutions (1)

Accepted Solutions (1)

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

>1) What solution should I provide to my client for mass upload of 30,000 files to KM so that they can upload those files every year and remove the old files.

This questions has nothing to do with Web Dynpro ABAP and therefore doesn't belong in this forum. You should ask this in one of the Portal forums since you are talking about uploads to Portal KM.

>2) In Web Dynpro ABAP how can I down load the single file related to loggin user from KM to local (user's) pc and open it in adobe acrobat reader.

You just need a URL to the file in KM. You don't need to download it. You would just calculate the URL and use the LinkToURL UI element. If the path is know and the filename is something dynamic but calculatable (like employee id) then you could build the URL in ABAP without any need to connect to or interface with KM.

Former Member
0 Kudos

Hi Thomas,

thank you.

1) What solution should I provide to my client for mass upload of 30,000 files to KM so that they can upload those files every year and remove the old files.

I will put my above question to portal forum.

2) In Web Dynpro ABAP how can I down load the single file related to loggin user from KM to local (user's) pc and open it in adobe acrobat reader.

For my 2nd question, thank for the solution. I have tried with LinkToURL elemtnt and it worked. But I have one more question about the same. I have uploaded one pdf file to km and tried to open this file using LinkToURL element in Web Dynpro ABAP. In the 'reference' property of LinkToURL element I have given path to the document. This path I got from portal when I opened the settings->property of uploaded file, which was something like this:

http://<%hostname%>/irj/go/km/docs/documents/RComm/PDF%20Files/FAQs%20CTC.pdf

In this I have replaced the

<%hostname%>

with actual host name:port number.

So in this case I have hardcoded the hostname:port number.

Is there any way or function module using which I can get the host name and the port number of the portal so in future, if

it changes, I will not need to change the code.

Thanks again.

Vikrant

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

I don't know of any API that will give you the portal hostname and port. The main WD Portal API is if_wd_portal_integration. It can return the portal version, but not other information about the portal. I would just suggest creating a class of your own that has the hostname and port as a constant. Have all of your applications call a method of this class to get the information. That way you only have one place to change.

Former Member
0 Kudos

Thanks Thomas.

Former Member
0 Kudos

try this FM inthis way:

CALL FUNCTION 'RSWR_PORTAL_CONFIG_GET'

IMPORTING

E_URL_PREFIX = url.

this FM will return url and port of portal which is connected to your SAP system

Answers (1)

Answers (1)

saravanakumar_mac
Participant
0 Kudos

Dear All,

This document for KM content file upload & download procedure. I have used web dynpro ABAP for frontend screen. Displayed using

Webdynpro adobe interactive form.

Using class web service we can upload & download file.

Enjoy with this document.......