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

Regarding Open dataset

Former Member
0 Likes
1,037

I am using open dataset in my abap program like this.

OPEN DATASET E_FILE FOR APPENDING IN TEXT MODE.

it works in 46B, but it wont work in Basis 620.

could you pls suggest me how i can make mutually work.

should i have to use any ENCODING statement with the above statement.

pls correct me.

ambichan.

1 ACCEPTED SOLUTION
Read only

athavanraja
Active Contributor
0 Likes
958

<i>it works in 46B, but it wont work in Basis 620.</i>

what is happenning? is it not appending? or is it appending junk characters?

Check out ABAP key word documentatin for open dataset - <b>mode</b> option.

Regards

Raja

8 REPLIES 8
Read only

athavanraja
Active Contributor
0 Likes
959

<i>it works in 46B, but it wont work in Basis 620.</i>

what is happenning? is it not appending? or is it appending junk characters?

Check out ABAP key word documentatin for open dataset - <b>mode</b> option.

Regards

Raja

Read only

0 Likes
958

hey,

sorry that i have no chance to test the program in 620 as of now. but my client says that if we add <b>"IN TEXT MODE ENCODING NON-UNICODE"</b> in Open dataset Stmt it works fine at 620.

Also he wants me to correct the abap program which should work in both environment..so i am just ...thinking..how it can be done..

ambichan

Read only

0 Likes
958

Just use the addition encoding default.

here is the details from ABAP docu

DEFAULT

In a Unicode system, the designation DEFAULT corresponds to the designation UTF-8, and the designation NON-UNICODE in a non-Unicode system.

UTF-8

The characters in the file are handled according to the Unicode character representation UTF-8.

NON-UNICODE

In a non-Unicode system, the data is read or written without being converted. In a Unicode system,the characters in the file are handled according to the non-Unicode-codepage that would be assigned to the current text environment according to the database table TCP0C, at the time of reading or writing in a non-Unicode system.

If the addition ENCODING is not specified in non-Unicode programs, the addition NON-UNICODE is used implicitly.

Regards

Raja

Read only

0 Likes
958

hey Raja,

I tried below statement in 46B.

OPEN DATASET E_FILE FOR APPENDING IN TEXT MODE ENCODING DEFAULT.

but giving compile time error..why.

ambichan.

Message was edited by: ambi chan

Read only

0 Likes
958

If you need your program to work in both environments make sure of the following:

in 6.20 make sure that the unicode attribute at program level is unchecked.

Your program should then work just like in 4.x

Enjoy

Read only

0 Likes
958

hey Brandelik,

thanks for ur reply,

could you pls confirm me where should i uncheck this unicode attribute...

any other alternative answer wouuld be great

ambichan

Read only

0 Likes
958

When you edit the program use the menu goto -- attributes

It should be on that screen.

Enjoy

Read only

0 Likes
958

Hey Brandelik,

I really thank that you gave me one way of solution for my problem.

But i really want to confirm this doubt with this SDN, Regardless of change in abap code or settings(attribute changes), cant we make one code to work with two different environment(46B&620)?

Bcoz, if we write one program at 46B, and to work with 620 if there is necessary to make changes in code or settings, then i dont think ABAP code is more efficient in this case..

Any solution for this...

ambichan