2008 Aug 13 11:30 AM
Hi ,
My problem is that i have scheduled my abap program in background and the program reads some files which are in sequence and after that when it runs again the program has to know the file name which it has last read.How can this be achieved?
Thanks and Regards,
C.A
2008 Aug 13 11:37 AM
one way of doing is create a Z table and when u run the program as soon as it runs the first file, update the file name in the Z table and so...on till the program completes.
Now, when you are running for second time, read this Z table and you can find the file name and when it runs refresh the Z table data and once again add the file names...
2008 Aug 13 11:37 AM
one way of doing is create a Z table and when u run the program as soon as it runs the first file, update the file name in the Z table and so...on till the program completes.
Now, when you are running for second time, read this Z table and you can find the file name and when it runs refresh the Z table data and once again add the file names...
2008 Aug 13 11:37 AM
Hello,
Try IMPORT & EXPORT stmts for this. When you read the last file export the filename to the DB & before starting to read the files do an import.
DATA:
l_wa_indx TYPE indx.
* Before reading the files, export from DB
EXPORT l_v_filenam = l_v_filenam
TO DATABASE indx(xy)
FROM l_wa_indx
CLIENT sy-mandt ID 'test'.
* Reaf the files
* Last file read, then Import to DB
IMPORT l_v_filenam = l_v_filenam
FROM DATABASE indx(xy)
TO l_wa_indx
CLIENT sy-mandt ID 'test'.
Hope this is ok.
BR,
Suhas
2008 Aug 13 11:39 AM
another solution is to rename
the filename.
example: from /home/file123 to /home/file123.fin
A.
2008 Aug 13 11:53 AM
Thanks for the replies guys.
But i mean my problem is evryday the sequence of files change, i mean they start afresh with 1 .So do i have any option to handle it directly just by buffering it somewhere in memory and retrieving it instead of craeting a db table.
Regards,
C.A
2008 Aug 13 12:33 PM
Hello CA,
Did you see my bit of code? Thats what i have suggested. Store the last file read to the DB table INDX(cluster table) . You dont have to create any table if u use this soln.
BR,
Suhas