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

Open dataset

Former Member
0 Likes
931

Hi,

My code is like this:

<b>DATA : unix_file TYPE rlgrap-filename.</b>

<b> OPEN DATASET unix_file FOR OUTPUT IN TEXT MODE encoding default.</b>

I get an error like this :

<b>"TYPE ...", "FILTER ...", "MESSAGE ..." or "AT POSITION ..." expected

after "MODE". </b>

Can anyone please solve this?

Message was edited by:

ramana peddu

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
900

Hi,

Please remove encoding default.

It is not working in 4.6C.

I think it is for unicode purposes.

Check this link for more information.

/people/ulrich.brink/blog/2005/08/18/unicode-file-handling-in-abap

Regards,

Ferry Lianto

8 REPLIES 8
Read only

Former Member
0 Likes
900

This looks correct; are you sure there is no typo anywhere?

Read only

Former Member
0 Likes
900

In 4.7, I get no syntax error with this.

rob

Read only

0 Likes
900

I am in 4.6c

Read only

Former Member
0 Likes
900

Hi,

Have you have assigned file name and path to unix_file workarea?

If you did then please try this ...

DATA : unix_file TYPE rlgrap-filename.

OPEN DATASET unix_file FOR OUTPUT IN TEXT MODE.

Regards,

Ferry Lianto

Read only

0 Likes
900

Hi Ferry,

I have done the same code as u mentioned but I placed the <b>encoding default</b>

Is it a mistake? Please explain what is the use of <b>encoding default</b>

Read only

Former Member
0 Likes
900

Hi,

I believe the encoding default addition is not available in 4.6C..Remove that..

DATA : unix_file TYPE rlgrap-filename.

OPEN DATASET unix_file FOR OUTPUT IN TEXT MODE <b><u>encoding default</u></b>.

Thanks,

Naren

Read only

Former Member
0 Likes
901

Hi,

Please remove encoding default.

It is not working in 4.6C.

I think it is for unicode purposes.

Check this link for more information.

/people/ulrich.brink/blog/2005/08/18/unicode-file-handling-in-abap

Regards,

Ferry Lianto

Read only

raviprakash
Product and Topic Expert
Product and Topic Expert
0 Likes
900

Hi Ramana,

I too encountered the same problem. Then i removed the "ENCODING DEFAULT" keyword and it worked.

DATA : unix_file TYPE rlgrap-filename.

OPEN DATASET unix_file FOR OUTPUT IN TEXT MODE.

<b>This problem you wont encounter in releases greater than and equal to 620.

The keyword "ENCODING" doesnt work for releases less than or equal to 46C.</b>

Thus the problem occurs because your system release is less than 620.

NOTE: PLease reward points if you feel that my explanation is relevant and

helpful :).

Thanks and regards,

Ravi .