on 12-29-2008 11:51 AM
Hi All,
Can you please give me solution for the following scenario.
In R/3 they are converting Word Template as XString type.
From RFC, i am getting XString type as export parameter.
Now i need to convert that xstring and open it as word document template in webdynpro java.
Regards,
Suresh T
Hi,
Use the following code:
byte[] wordFile = wdContext.currentRFC_Output.getXString(); // From your BAPI...
IWDCachedWebResource cachedWordResource = null;
cachedWordResource = getCachedWebResource(
wordFile, "sample.doc", WDWebResourceType.DOC);
cachedWordResource.getURL()
private IWDCachedWebResource getCachedWebResource(byte[] file, String name,
WDWebResourceType type) {
IWDCachedWebResource cachedWebResource = null;
if (file != null) {
cachedWebResource = WDWebResource.getWebResource(file, type);
cachedWebResource.setResourceName(name);
}
return cachedWebResource;
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Omri,
Already i tried using the following code,
byte[] docContent = wdContext.currentOutputElement().getE_Xstring();
WDDeployableObjectPart objPart = wdThis.wdGetAPI().getComponent().getDeployableObjectPart();
IWDCachedWebResource webCache = WDWebResource.getPublicCachedWebResource(docContent,WDWebResourceType.DOC,WDScopeType.APPLICATION_SCOPE,objPart,"DocGeneration");
wdComponentAPI.getWindowManager().createNonModalExternalWindow(webCache.getURL(),"DocGeneration").open();
After external browser is triggered, it is asking the Options 'Open', 'Save' & 'Cancel'.
But on clicking 'Open' it is throwing error Page cannot be displayed.
Regards,
Suresh T
User | Count |
---|---|
89 | |
10 | |
9 | |
9 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.