cancel
Showing results for 
Search instead for 
Did you mean: 

Cannot update items with Eszett (ß) in code via Impex

former_member597
Participant
0 Kudos

Hello experts,

I want to update items in my SAP Commerce Cloud system via an impex file but some of them have an eszett (ß) in their 'code'.

My header is like this:

UPDATE Product; code[unique=true]; customValue;
code1 ; thisCodeWorks
codeß2 ; thisCodeDoesntWork

When I try to execute the impex it says:

 ,,,,no existing item found for update

The encoding of the impex file is 'UTF-8' and an import via the impex console in the HAC also does not work.

I double checked the 'code'-property of the affected items and copied it straight to my impex file without success.

Thanks in advance!

0 Kudos

Hi Felix,

From the result that you posted, looks like Hybris can not find the items you are trying to update. Maybe because of the catalog version.

Which Catalog Item are you trying to execute? I can not see in the query the catalogVersion attribute.

Have you try it to execute, INSERT_UPDATE and check the result?

Best Regards,

former_member597
Participant
0 Kudos

svetlin_serafimov I don't think it has something to do with the catalog version because in my actual impex file all the lines without eszetts have been updated successfully. And I dont use Product but a custom itemtype, independent from a catalog.

Would I use INSERT_UPDATE instead, it will always create a new item with the same (!) code, event though its [unique=true]

Accepted Solutions (0)

Answers (2)

Answers (2)

0 Kudos

Hi Felix.

First, in the posted script are missing semicolon as geff.h.n.chang posted.

Second if you don't specify catalog version you will probably face the error like

,,,,More than one item of type Product

Third, it is aways good to know which version you are trying to update. Basically is aways good to update the stage version of the product.

One more the INSERT_UPDATE will create a product only if the product doesn't exist. This means that will create eventually a new product with the same code which I am sciptic that you will be able to insert it.
Most probably then you will get an error related with the catalog version.

Something like that ...
type Product requires missing column [catalogVersion]

Hope this helps.

Best Regards,

former_member597
Participant

I forgot to use semicola in my sample script in the question only, my actual ImpEx script is syntactically correct
It updated 80 lines successfully, only the ones that contain an 'ß' were skipped, because no items were found. It probably has something to do with encoding. The issue is reproducable on Version 1808, but not on 1905 and higher.

geffchang
Active Contributor
0 Kudos

There is nothing wrong with the impex. The error message says Hybris cannot find an instance of the type (e.g. Product, although you said you are using a different custom type). i.e. Hybris cannot find an instance of Product that has a code of "codeß2". Have you confirmed that this instance exists? Can you find it via FlexSearch in HAC or via Backoffice?

If the instance does not exist, then UPDATE will not work, because UPDATE can be used for existing instances only. If the instance does not exist, use INSERT_UPDATE or INSERT instead.

former_member597
Participant
0 Kudos

The instance exists definitely, I can search it via FlexibleSearch and Backoffice. I copied the value for 'code' straight from the FlexibleSearch result to my Impex Script

geffchang
Active Contributor
0 Kudos

f.schildmann Do you get any result for this query? SELECT * FROM {Product} WHERE {code} = 'codeß2'

(Change the Type/attribute as needed)

former_member597
Participant
0 Kudos

@ geff.h.n.chang yes, it returns the correct item

geffchang
Active Contributor
0 Kudos

f.schildmann That's weird, man.

Have you tried putting it in double quotes, like this?

UPDATE Product;code[unique=true];customValue
;"code1";thisCodeWorks
;"codeß2";thisCodeDoesntWork

Also, make sure your impex is correct. In your question, the 2nd and 3rd line is missing a semicolon at the start.

former_member597
Participant
0 Kudos

geff.h.n.chang I also tried putting it in double quotes, unfortunately didnt work. In my actual script I used semicola, I forgot them only in my example script in the question.

Maybe this is a bug in SAP Commerce Cloud 1808?

geffchang
Active Contributor
0 Kudos

f.schildmann It's working on my machine using 1905.17.

What 1808 patch are you using? Have you tried the latest patch?

former_member597
Participant
0 Kudos

geff.h.n.chang it's version 1808.3. It works on 1905 but I need a workaround for my current version.

geffchang
Active Contributor
0 Kudos

f.schildmann Oh, that's quite old. Check if you can get it fixed with 1808.30. If so, you might want to consider upgrading.

former_member597
Participant
0 Kudos

geff.h.n.chang Unfortunately I can't update the SAP Commerce Cloud since it's a customer system and has lots of features that wouldnt work on a later version. Can I fix my problem by creating a custom encodingFilter? If so where do I have to attach it?

geffchang
Active Contributor

f.schildmann I'm not sure, but I'd try to debug this:

de.hybris.platform.commerceservices.setup.impl.DefaultSetupImpexService.importImpexFile(String, boolean, boolean)

... and see what is happening.

former_member597
Participant
0 Kudos

geff.h.n.chang apparently it replaces the ß-character with ß. Encoding is set to 'utf-8' and locale is 'de'.

geffchang
Active Contributor
0 Kudos

f.schildmann How was the "codeß2" record created? Was it via impex also? It would be strange if it was OK for INSERT_UPDATE, but not for UPDATE. Also, check that the encoding of the file is UTF-8.