Application Development 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: 

Seqential download

Former Member
0 Kudos

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

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos

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

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos

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

Former Member
0 Kudos

hi shejal,

in unicode system u need to specify ENCODING DEFAULT.

OPEN DATASET v_file FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.

0 Kudos

Thanks Priya and Rich.

The problem is solved.

Thanks once again.

Shejal Setty.