cancel
Showing results for 
Search instead for 
Did you mean: 

Upload / Download document to KM Content Server from WebDynpro Application

Former Member
0 Kudos

I have a requirement where I need to upload / download document into / from KM Content Server from my WebDynpro Application.

Is it technically possible and if Yes, can I get any Sample code for this.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Tahzeeb,

yes it is possible, for reading just put file into KM, and use java code in order to open the file (in the path cm is the root of KM):

FileReader f = new FileReader("/sapmnt/PCP/global/config/cm/etc/zdati.htm");

BufferedReader in = new BufferedReader(f);

String s = new String();

//Reading file by row

while ((s = in.readLine())!= null){

....

}

in.close();

f.close();

Do not forget the IOException management. For writing it's the same, just use the java code in order to create a new file in the right directory under KM, and then fill it.

Hope this help,

Vito