on 2006 Apr 17 11:38 PM
Hello all
I am planning to write a program that send the out put displayed on webdynpro view to a MS word document.So I request you if you have any plans to solve my problems or any helpfull URLs. Thank you for your time in advance
Regards
Maruti
hi maruti try this It will solve your prob.
create a single view with Text area,a button and a LinkTOUrl UI element. Write the following code on click of button. and set the refrence property of LinktoUrl equals to Url.
Note : Here Doc and Url are the value attribute of string type.
public void onActionConvert(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
{
//@@begin onActionConvert(ServerEvent)
final String formattedStr = wdContext.currentContextElement().getDoc();
try
{
final IWDCachedWebResource resource = WDWebResource.getWebResource
(
formattedStr.getBytes("UTF-8"), WDWebResourceType.DOC
);
resource.setResourceName("WordDoc.doc");
wdContext.currentContextElement().setUrl( resource.getAbsoluteURL() );
}
catch (final Exception ex)
{
wdComponentAPI.getMessageManager().reportException( new WDNonFatalException(ex), false );
}
//@@end
}
Regards
Jitender
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
57 | |
10 | |
7 | |
6 | |
6 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.