Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Big Endian Format

Former Member
0 Likes
2,143

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

1 ACCEPTED SOLUTION
Read only

kesavadas_thekkillath
Active Contributor
0 Likes
2,070

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"

15 REPLIES 15
Read only

former_member206377
Active Contributor
0 Likes
2,070

Hi Divya,

Can you mention the error please!

Read only

0 Likes
2,070

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

Read only

0 Likes
2,070

Have you specified the right path ?

For problem with huge data refer this link

Read only

0 Likes
2,070

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

Read only

0 Likes
2,070

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.

Read only

kesavadas_thekkillath
Active Contributor
0 Likes
2,071

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"

Read only

0 Likes
2,070

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

Read only

kesavadas_thekkillath
Active Contributor
0 Likes
2,070

if its of huge data

then spli the data to another data and use it.

Read only

former_member206377
Active Contributor
0 Likes
2,070

Hi Divya,

Is your issue resolved?

Read only

Former Member
0 Likes
2,070

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.

Read only

0 Likes
2,070

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

Read only

Former Member
0 Likes
2,070

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.

Read only

0 Likes
2,070

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.

Read only

Former Member
0 Likes
2,070

answered

Read only

0 Likes
2,070

Hi Divya,

What was the solution ?