10-24-2013 12:39 PM
Hello All
I am using the open dataset command for opening the file from the server,
My requirement is to read the last statement of the file directly, instead of checking the whole file contents.
Can anybody tell me how I can achieve this ??
10-24-2013 12:50 PM
Hi Sachin,
Anyway your data will be in internal table only after reading from application server.
Then count the number of records in the internal table by using DESCRIBE into variable 'count'.
Then read that internal table with the index of 'count'.
then it will read the last record of the file.
Regards
Mani
10-24-2013 1:21 PM
Hello Mani
I am not transferring the data of the file into internal table.
We can get any structure ( variables fields ) in the file.(it is Dynamic )
Is there any other way to do that.
10-24-2013 1:00 PM
Hi SACHIN JAIN,
First find the number of records in the file using
DESCRIBE TABLE it_itab LINES wa_lines.
Now read the last line
read table it_itab index w_lines.