Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

offline Interactive Webdynpro

Hello SDN,

Im trying to implement offline Interactive webdynpro scenario which is given in SDN. In download View I have filedownload UI element. And I have my interactive form is saved in my local machine.

(Bascially user sould be able to download the interactive form)

While writing coding in the implementation part for download view, which path I should give for my "pdf" file. I have tried all possible ways but once I execute Im getting following error:

"A file or directory in the path name does not exist."

the following is the code in init ()

IWDModifiableBinaryType binaryType = (IWDModifiableBinaryType) type;

binaryType.setFileName("Test.pdf");

binaryType.setMimeType(WDWebResourceType.PDF);

String fileName = "
OfflineTest
src
mimes
Components
com.xxx.OfflineTest
Test.pdf";

File file = new File(fileName);

FileInputStream in = new FileInputStream(file);

ByteArrayOutputStream out = new ByteArrayOutputStream();

int length;

byte[] part = new byte [10 * 1024];

while ((length = in.read(part)) != -1)

{

out.write(part, 0, length);

}

can some one tell me where i went wrong.

J.Smitha

Not what you were looking for? View more on this topic or Ask a question