Skip to Content

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

How to save text as txt file ?


when I create a string = "this si my country" in webDynpro .

I want save this as a *.txt file . and save this in my computer or open this txt file at once, how to come out this funciton ?


Former Member
Former Member replied

Hi Doke,

You can simply create a button on click of which you can write the following code and test your application. It will be saved as text file.

String abc = "what ever you want to save to text file save it in the string format";



IWDCachedWebResource resource = WDWebResource.getWebResource


abc.getBytes("UTF-8"), WDWebResourceType.UNKNOWN



IWDWindow window = wdComponentAPI.getWindowManager().createNonModalExternalWindow(




catch(Exception ex)


wdComponentAPI.getMessageManager().reportException( new WDNonFatalException(ex), false );


Hope this will help you.


Sagar Ingalwar

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