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

Seqential download

Former Member
0 Likes
642

Hi,

I am trying to download from internal table to application error.

in my open data set i am getting an syntax error.

error - in text mode the encoding addition must be specified.

below is part of my code.

START-OF-SELECTION.

SELECT lifnr

name1

land1 FROM lfa1 INTO TABLE i_lfa1.

  • Open the file

OPEN DATASET v_file FOR OUTPUT IN TEXT MODE.

CHECK sy-subrc EQ 0.

LOOP AT i_lfa1.

TRANSFER i_lfa1 TO v_file.

CLEAR : i_lfa1.

ENDLOOP.

Thanks in advance,

Shejal.

1 ACCEPTED SOLUTION
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
609

Since you are in a new version of SAP, you need the extension ENCODING.

OPEN DATASET v_file FOR OUTPUT IN TEXT MODE <b>encoding DEFAULT</b>.

Regards,

Rich Heilman

3 REPLIES 3
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
610

Since you are in a new version of SAP, you need the extension ENCODING.

OPEN DATASET v_file FOR OUTPUT IN TEXT MODE <b>encoding DEFAULT</b>.

Regards,

Rich Heilman

Read only

Former Member
0 Likes
609

hi shejal,

in unicode system u need to specify ENCODING DEFAULT.

OPEN DATASET v_file FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.

Read only

0 Likes
609

Thanks Priya and Rich.

The problem is solved.

Thanks once again.

Shejal Setty.