cancel
Showing results for 
Search instead for 
Did you mean: 

Read data from text file and displaying on Webdynpro

Former Member
0 Kudos

Hi all,

I need some help. I have a text file with set of name, phonenumbers . I want to know how to display the data using Webdynpro. Could some one help me. help is appreciated and I promise to award points for right answer.

Thank you

Maruti

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi

Please refer the below link for complete details on how to read the data from a text file:

http://help.sap.com/saphelp_nw04/helpdata/en/9e/093aeec9b8634789fa07b3301f1a44/frameset.htm

Thanks & Regards,

Amar Bhagat Challa

Former Member
0 Kudos

Hi Maruti,

just open the file and loop on the rows, here an example::

import java.io.BufferedReader;

import java.io.FileReader;

import java.io.IOException;

.......

FileReader f = new FileReader("c:
FileName.ext");

while ((s = in.readLine()) != null)

{

//Here you can put the line into a WD context structure, i.e:

wdContext.currentContoEconomicoFormElement().setField(s);

........

}catch (Exception e) {.....}

in.close();

f.close();

For any others questions, please, let me know.

Vito