cancel
Showing results for 
Search instead for 
Did you mean: 

FRM type of document in Webdynpro

Former Member
0 Kudos

Hi All,

We have webdynpro application for Document Management System, there we need to FTP different types of document like Word Document, Excel Document. There we need to FTP FRM (FrameMaker) type of Document also. But when we are uploading it is not recognizing the extension of FRM document.

We have implemented the following code:

IWDResource resource = element.getResDocumentUpload();

String application = null;

application = resource.getResourceType().getFileExtension();

When i am priniting the variable 'application' it doesnot have any value. Is webdynpro support FRM type of Document as resource?

Please help me out. This is really urgent...

Thanks in advance!!!!!

Accepted Solutions (0)

Answers (1)

Answers (1)

chintan_virani
Active Contributor
0 Kudos

Looking at this [help|http://help.sap.com/javadocs/NW04S/current/wd/com/sap/tc/webdynpro/services/sal/url/api/WDWebResourceType.html] suggests that the file type you are trying to use is not supported.

But there is an UNKNOWN type. I am not sure why are you getting null though instead of UNKNOWN.

Chintan

Former Member
0 Kudos

Hi Chintan,

Thanks for the reply. That is what i was looking for. it should reflect that UNKNOWN type. But now we are fetching the extension by finding out the index of (".") and it is working.

Regards,

Gurmat

Former Member
0 Kudos

Hi Bhatia,

I am opening an word document dynamically using following code.

******************************************************************

try

{

File f=new File("NewDocument1.doc");

FileOutputStream fos=new FileOutputStream(f);

FileInputStream fis = new FileInputStream(f);

FileChannel fc = fis.getChannel();

byte[] data = new byte[(int)(fc.size())];

IWDCachedWebResource cachedWebResource=WDWebResource.getWebResource(data,WDWebResourceType.DOC);

cachedWebResource.setResourceName("NewDocument1.doc");

String url=cachedWebResource.getURL();

IWDWindow window=wdComponentAPI.getWindowManager().createExternalWindow(url,"cmps",true);

window.open();

}

catch(Exception ioe)

{

wdComponentAPI.getMessageManager().reportSuccess(ioe.getMessage());

wdComponentAPI.getMessageManager().reportException("Exception in Method cmps :::"+ioe.getMessage(),false);

}

*******************************************************************

Do u know how to close the word document dynamically and save it to the specified location.

It's very urgent.

Regards,

Rajesh