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: 

idoc inbound error - ASCII to unicode system

Former Member
0 Kudos

Hello,

I receive idoc file from a parnter.

I create a File Ports(WE21) : Non-unicode format and Checked 'Continue Despite Conversion Error'.

The partner send to us a file with ASCII-encoding including German NÄHER .

In WE02, I found the line with German NÄHER disordered. ÄH became char 腍 ,but I have set 'Continue Despite Conversion Error'.

like this:

PCKAR SACK NICHT N腍ER SPEZIFIZIERT 0

PCKNR 000SAC 8

ANZAR 00.000 0

VBELN 301866818 0

POSNR 00060 6

BTGEW 000.000 0

NTGEW .000 1

TARAG .000 K

GEWEI GM0

BTVOL .000 0

If the parnter don't want to change the encoding, Can I do something to make it worked ?

Thanks.

1 ACCEPTED SOLUTION

nils_buerckel
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Harry,

this is not a conversion error.

The file contains Latin-1 data with the special character "Ä".

Now I assume you use as logon language in the Unicode system ZH (or another Asian language) ... ?

Then the system evaluates SY-LANGU and converts the Non-Unicode file based on the Asian code page.

Then ÄH will be interpreted as 腍. Hence the system gets a word with 4 characters instead of 5.

This can lead to shiftings in the whole idoc and the idoc might be invalid.

Therefore I would propose to upload the idoc using logon language EN or change it via "setlocale " in abap code.

Best regards,

Nils Buerckel

SAP AG

2 REPLIES 2

nils_buerckel
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Harry,

this is not a conversion error.

The file contains Latin-1 data with the special character "Ä".

Now I assume you use as logon language in the Unicode system ZH (or another Asian language) ... ?

Then the system evaluates SY-LANGU and converts the Non-Unicode file based on the Asian code page.

Then ÄH will be interpreted as 腍. Hence the system gets a word with 4 characters instead of 5.

This can lead to shiftings in the whole idoc and the idoc might be invalid.

Therefore I would propose to upload the idoc using logon language EN or change it via "setlocale " in abap code.

Best regards,

Nils Buerckel

SAP AG

0 Kudos

Good answer.

I add this code before CALL FUNCTION 'EDI_DATA_INCOMING' and worked.

SET LOCALE LANGUAGE 'D'. "table t002