2009 Nov 23 8:56 AM
Hi,
I have a requirement where i have to download the contents of the standard table(kna1) to the application server.
OPEN DATASET p_file FOR OUTPUT IN legacy TEXT MODE big endian.
But i am getting error.
Could anyone please help me.
Thanks & Regards
2009 Nov 23 9:16 AM
goto su53 and check the authorization,
check whether the path exists.
check the sy-subrc value after open dataset statement
try "
TMP\KNA1_DATA1.TXT"
Hi,
I have a requirement where i have to download the contents of the standard table(kna1) to the application server.
OPEN DATASET p_file FOR OUTPUT IN legacy TEXT MODE big endian.
But i am getting error.
Could anyone please help me.
Thanks & Regards
2009 Nov 23 9:06 AM
2009 Nov 23 9:09 AM
Hi,
I am getting the following error
Runtime Errors DATASET_NOT_OPEN
Short text
File "/TMP/KNA1_DATA1.TXT" is not open.
I feels its because the data volue is huge because its a standard table.
Thanks
2009 Nov 23 9:22 AM
2009 Nov 23 9:42 AM
Hi,
Thanks for the link!
Bit its not specified in the link for huge volume of records.
Could you please help me on that.
Thanks
2009 Nov 23 10:07 AM
Hi Divya,
check the reply by Vedavathy Kotak.. in the link provided. She mentions that the code she has specified works fine for any size of the file.
2009 Nov 23 9:16 AM
goto su53 and check the authorization,
check whether the path exists.
check the sy-subrc value after open dataset statement
try "
TMP\KNA1_DATA1.TXT"
2009 Nov 23 9:21 AM
Hi,
I have authorization , i checked in SU53.
I amgetting bthe file open error because the internal table data is huge.
Could you please suggest for that?
Thanks
2009 Nov 23 9:51 AM
if its of huge data
then spli the data to another data and use it.
2009 Nov 23 11:02 AM
2009 Nov 23 11:11 AM
Hi Divya,
The error is at the OPEN DATASET statement, right? This is the first statement for openning a file and at this point you have not even started writing to the file, so this error has nothing to do with internal table size or file size. It is also clear from the error you have received. Check whether you have specified the path correct.
Why are you using LEGACY TEXT MODE BIG ENDIAN? any specific reason?
Best Regards,
Loveline thomas.
2009 Nov 23 11:14 AM
Hi loveline,
Thnaks .
Yes i have an internal table which has all the contents of kna1 table.
IF p_kna1 = 'X'.
SELECT * INTO TABLE i_kna1 FROM kna1.
OPEN DATASET p_k1 FOR OUTPUT In TEXT MODE ENCODING DEFAULT.
if sy-subrc eq 0.
LOOP AT i_kna1.
CLEAR w_rec.
DO.
ASSIGN COMPONENT sy-index OF STRUCTURE i_kna1 to <fs>.
if sy-subrc <> 0.
EXIT.
ENDIF.
DESCRIBE FIELD <fs> TYPE l_type.
CONCATENATE w_rec <fs> INTO w_rec
SEPARATED BY ' '.
ENDDO.
TRANSFER w_rec to p_k1.
ENDLOOP.
endif.
This is the code i have given.
Code Formatted by: Alvaro Tejada Galindo on Jan 13, 2010 5:07 PM
2009 Nov 23 11:22 AM
Is SY-SUBRC EQ 0, after the OPEN DATASET statement?
If not, it means the file could not be open. Are you trying to write the file in TMP folder? Usually the administrator fix a size for this folder, if that size has reached you will not be able create any new file in this folder. So check with your system administrator about the folder size.
Best Regards,
Loveline Thomas.
2009 Nov 23 11:39 AM
Thanks .
yes my sy-subrc is 0 after open dataset statement.
In al11 i could see the file but when i clock on it , it says "Unable to display this file".
Any suggestions please.
2010 Jan 13 7:12 AM
2010 Jan 14 5:49 PM
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |