Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Read a file from application server

Former Member
0 Likes
401

Hey guys,

Can we read a particular row from a file in the appn server.I dont want to read the whole file but just need to read contents of a row into a string.It is a .xls file.

Is this possible?

Regards

Ankit Harish

3 REPLIES 3
Read only

Former Member
0 Likes
385

Ankit,

Am not sure about we can read a perticuler line from App server.

you have to read only entire file first then do nesserry functions by reading perticuler line by using open dataset command.

Amit.

Read only

former_member156446
Active Contributor
0 Likes
385

its not possible..

Read only

Former Member
0 Likes
385

hiii

use code given below.it will solve your problem

OPEN DATASET FNAME FOR inPUT in text mode encoding default.
LOOP AT TAB INTO LIN.  *** here give index number or condition
  READ DATASET FNAME INTO LIN.
  IF SY-SUBRC <> 0.
    EXIT.
  ENDIF.
  WRITE: / LIN-COL1, LIN-COL2.
  ENDLOOP.

here in the above code use condition or index with LOOP & read particular line.

reward if useful

thx

twinkal