04-01-2009 7:39 AM
Hi,
I want to read stat.dat file from AL11 transaction.
The file contents are not in readable format, how can i read such file ?
can anyone tell me where these files are saved in appl. server.
Thanks
Jaya
04-01-2009 7:45 AM
Hi Jayak,
You need to use DATASET Concept to read such files.
Press F1 on DATASET or use ABAPDOCU transactions to know more about App Server Programs.
Hope it helps
Thanks,
Babu Kilari
04-01-2009 7:45 AM
Hi, In AL11 files will be saved in folders, so u need to knowthe path for a particular file. Once you get the path, just use OPEN DATASET, READ DATASET and CLOSE DATASET to get the file content into some internal table..
Hope this helps you...
04-01-2009 7:55 AM
Hi,
Please have a look to file content. It's showning content like below pasted line.
*##############c#S#E###S#A##0##### #t#5#B#7#2#1#C#D#E#8#4#5#E#F#1*
How can i read such file in readable plain format (by doing some decodeing to it)
Thanks
Jaya
04-01-2009 8:02 AM
First of all try to rename the file with .txt format.
Then try reading it. If still the problem persists, use UNICODE concept to read the characters.
Hope this is useful pointer
04-01-2009 9:11 AM
Not getting any helpful information about using UNICODE.
can you help me. can you please send some sample program.
04-01-2009 9:21 AM
Try Searching in SDN itself. You should get it.
Also, Did u make sure that the file with .dat is not corrupted one.
Because, when you rename the file from .dat to .txt if the data is in readable format .txt should also be in readable.
And about UNICODE, even I have never tried but thot of helping u by giving someguidline because it can handle more number of characters set than the ordinary ones.
04-01-2009 7:46 AM
Hi:
It can be done by using open dataset. for details
have a look
[Link|http://help.sap.com/saphelp_nw04/Helpdata/EN/fc/eb3ca6358411d1829f0000e829fbfe/content.htm]
Regards
Shashi
04-01-2009 7:54 AM
Hi
First of all you need to save the file in .TXT (tab delimited) format in AL11.
Then go for the following code:
OPEN DATASET <filename> FOR INPUT IN TEXT MODE ENCODING DEFAULT.
IF sy-subrc NE 0.
MESSAGE 'Error while opening dataset ' TYPE 'E'.
ELSE.
DO.
READ DATASET <filename> INTO wa_upload." MAXIMUM LENGTH 8000 .
IF sy-subrc NE 0.
EXIT.
ENDIF.
APPEND wa_upload TO it_upload.
CLEAR : wa_upload.
ENDDO.
Closing the file
CLOSE DATASET <filename>.
ENDIF.
Hope this helps,
Regards,
Arnab.
04-01-2009 11:11 AM
First you have to check the file type. You can use OPEN DATASET, READ DATASET and CLOSE DATASET.You can save the data into an internal table.
Regards,
Joan