‎2008 Jun 23 9:39 AM
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
‎2008 Jun 23 9:40 AM
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.
‎2008 Jun 23 9:41 AM
‎2008 Jun 23 9:45 AM
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