Hi,
1. I have created one web dynpro application, in which i am accessing rfc function.
2. Rfc function's output is XString type (Smart form).
3. In web dynpro i am using the following code to display the same.
byte[] text = null;
text = wdContext.currentOutputElement().getBin_File();
wdContext.currentContextElement().setCtx_va_att(convertXStringToUrl(text));
public static String convertXStringToUrl(byte[] docContent)
{
String url = "";
WDWebResourceType resourceType = WDWebResourceType.PDF;
IWDWebResource webResource = WDWebResource.getWebResource(docContent,resourceType);
try {
url = webResource.getURL();
} catch (WDURLException e) {
// TODO Auto-generated catch block
url = e.getMessage();
return url;
}
return url;
}
4.I am setting this url to Source attribute of iFrame.
5. But in the output, it displays only the empty iFrame component.
6. I am using ep6 & netweaver ver 7.0.09
7. Also tried using WebCacheResource. It opens the Acrobat reader but displays error File does not start with '%PDF'.
7. What could be the error?
Thanks in advance,
Nilesh