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

dump read dataset

Former Member
0 Likes
1,644

DATA: lv_file TYPE string.
lv_file = p_server.


DATA LV_xstring TYPE xstring.

OPEN DATASET lv_file FOR INPUT IN TEXT MODE ENCODING DEFAULT .

IF sy-subrc <> 0.
MESSAGE e999(zz) WITH 'error'.
ENDIF.

DO.
READ DATASET lv_file INTO LV_xstring. "DUMP
IF sy-subrc <> 0.
EXIT.
ENDIF.

"APPEND ls_string TO lt_string.
ENDDO.
CLOSE DATASET lv_file.

DUMP:

For the statement "READ DATASET ... INTO f" only character-type data objects are supported at the argument position "f". In this case. the operand "f" has the non-character-type "y". The current program is a Unicode program. In the Unicode context, the type 'X' or structures containing not only character-type components are regarded as non-character-type.

4 REPLIES 4
Read only

former_member1716
Active Contributor
0 Likes
1,398

Hello luca treva,

Change the datatype of LV_xstring to String as mentioned below and try:

        DATA: lv_xstring TYPE string.

Regards!

Read only

0 Likes
1,398

this is the dump try type string:

During conversion of a text from code page '4110' to code page '4103', one of the following occurred: - Characters were discovered that cannot be displayed in one of the code pages - The conversion could not be performed for some other reason (see below for more details). Excerpt from the source buffer from the first character that could not be converted, displayed in hexadecimal form (with the ASCII characters in brackets): "82 CF 6E 01 00 00 04 05 00 00 13 00 08 02 5B 43 (..n...........[C)" The system was forced to terminate the current ABAP program 'ZTESTPROVA' since the conversion would have produced incorrect data. There are 50 of these non-convertible characters. If this number is 0, the second of the two scenarios described above applies.

Read only

0 Likes
1,398

luca treva,

What is the data we are dealing with, any idea?

This issue is mainly due to certain invalid characters in the path mentioned.

Check from your end if you can find any invalid character in the destined path.

Regards!

Read only

Sandra_Rossi
Active Contributor