cancel
Showing results for 
Search instead for 
Did you mean: 

Strange behavior of multilanguage in attribute view

Former Member
0 Kudos

Hi fellows!

I've faced the strange problem. Multilingual texts works properly only if i use single letter for language designation (SPRAS).

I prepared the example:

1)

Table1:


CREATE COLUMN TABLE "STUDENT01"."DEMO_CITY" (

"CITY_ID" INTEGER CS_INT NOT NULL,

PRIMARY KEY ("CITY_ID"));

with a single record:

insert into "STUDENT01"."DEMO_CITY" values('10');

Table2:

CREATE COLUMN TABLE "STUDENT01"."DEMO_CITY_V1" (

"CITY_ID" INTEGER CS_INT NOT NULL,

"SPRAS" VARCHAR(2) NOT NULL,

"CITY_DESCRIPTION" VARCHAR(128),

PRIMARY KEY ("CITY_ID","SPRAS"));

with tree records:

insert into "STUDENT01"."DEMO_CITY_V1" values('10','EN','New York');

insert into "STUDENT01"."DEMO_CITY_V1" values('10','RU','Нью Йорк');

insert into "STUDENT01"."DEMO_CITY_V1" values('10','RU','Nuova York');

2) After that create Attribute view with text join:

3) Text Join properties:

4) Attribute View Properties:

5) Preview after validation & activetion:

In that case i can't see anything!!! I changed Default Language in step 4, but it did't help.

Now change length for SPRAS column from 2 to 1 character:

drop table "STUDENT01"."DEMO_CITY_V1";

CREATE COLUMN TABLE "STUDENT01"."DEMO_CITY_V1" (

"CITY_ID" INTEGER CS_INT NOT NULL,

"SPRAS" VARCHAR(1) NOT NULL,

"CITY_DESCRIPTION" VARCHAR(128),

PRIMARY KEY ("CITY_ID","SPRAS"));

insert into "STUDENT01"."DEMO_CITY_V1" values('10','E','New York');

insert into "STUDENT01"."DEMO_CITY_V1" values('10','R','Нью Йорк');

insert into "STUDENT01"."DEMO_CITY_V1" values('10','I','Nuova York');

Repeate steps 4 and 5

And here is the result:

Now it WORKS! But why it didn't in previouse attempt?

Does anybody faced this problem?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

The text join bit in this presentation http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/1052f8d7-4b2a-2f10-6b9d-da8fbdc96... says the text join has been designed for ERP tables that are replicated into HANA and the SPRAS/LANG column in ERP is only 1 Character length.

The session Client (default client) option is also specific to ERP tables.

So the way I understand it, to extend the feature to custom tables that are directly created in HANA, the table field properties will need to align with the ERP design. Not sure if there is a work around here to extend this feature in cases where language column length is more than 1.

Hopefully this is changed in the future

Thanks,

Anooj

henrique_pinto
Active Contributor
0 Kudos

All available languages in SAP have a 1-long key in T002 table.

This key value is case sensitive, and it also accepts numbers and/or special char, so that one can represent more than 26 languages.

Answers (3)

Answers (3)

henrique_pinto
Active Contributor
0 Kudos

insert into "STUDENT01"."DEMO_CITY_V1" values('10','EN','New York');

insert into "STUDENT01"."DEMO_CITY_V1" values('10','RU','Нью Йорк');

insert into "STUDENT01"."DEMO_CITY_V1" values('10','RU','Nuova York');

How were you able to insert two entries with the same keys ('10' & 'EN')?

Was that a typo?

But notice that SPRAS, within SAP data model, is indeed a 1-char long field.

You can see that opening the Domain 'SPRAS' in tx SE11 in any AS ABAP based system.

The possible values can be seen in table T002.

It can be outputted to two-long codes (e.g. 'E' becomes 'EN' through the conversion routines mentioned in the Domain).

Best regards,

Henrique.

Former Member
0 Kudos

Hi Henrique!

Thanks for ansver. as you might see, table has composite key: PRIMARY KEY ("CITY_ID","SPRAS"));

henrique_pinto
Active Contributor
0 Kudos

Exactly the reason of my question, since both entries had the same key '10', 'RU'.

Former Member
0 Kudos

Oh! Sorry. You were right! It is my misprint.

The 3-rd record must be:

insert into "STUDENT01"."DEMO_CITY_V1" values('10','IT','Nuova York');

Thx!

Former Member
0 Kudos

Erhan, Anooj

Thanks for answers!

Former Member
0 Kudos

Hi,

Because SAP does not store languages like that. If you have an ABAP server you can check table T002. You query your table in iso format.