cancel
Showing results for 
Search instead for 
Did you mean: 

Multilanguage API on Java

Former Member
0 Kudos

Hello guys:

I need to access MDM multilanguage capabilities on Java. I do this as login:

String server = "server";

int port = 2000;

String user = "admin";

String password = "";

String language = "English [US]";

int minConnections = 1;

int maxConnections = 10;

int timeOut = 10000;

String logFile = "C:/mdmLogFile.log";

mdmConnector = new CatalogData();

mdmConnector.SetCodeRegion(language);

int connection = mdmConnector.Login(server, port, user, password, language,

minConnections, maxConnections, timeOut, logFile);

and it goes ok.... however, I try using

String language = "German [DE]";

and I get:

a2i.core.StringException: Region 'German [DE]' is missing a code for table ID 1, field ID 554.

at a2i.common.CatalogData.LoadCatalogData(Unknown Source)

at a2i.common.CatalogData.Login(Unknown Source)

at sap.com.cemex.MDMBridge.connect(MDMBridge.java:100)

at sap.com.cemex.MDMBridge.main(MDMBridge.java:262)

Error code: 0xfffffffa

Error message : No message for RC (0xfffffffa

I do have another language to test it on... Japanese... if I do:

String language = "Japanese [JP]";

it goes ok too... so I guess it's the German tag the problem.... have you guys experienced a similar problem, perhaps instead of German I should write Deutsch?

Thanks!

Alejandro

<b></b><i></i><u></u>

<b></b>

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Alejandro,

When you use the "SetCodeRegion" command, you must ensure that EVERY table name and field name exists for the language you have specified. If one or more is missing, you will get the exception which you have posted.

The "Code Region" is used to access tables and fields via the API.

The language of the data is determined by the Language parameter in the Login function.

So, in your case, if you want to manipulate German data, you would leave the CodeRegion as "English [US]", but specify "German [DE]" as the language in the Login function.


int connection = mdmConnector.Login(server, port, user, password, "German [DE]", minConnections, maxConnections, timeOut, logFile);

See the following <a href="/people/walter.kahn/blog/2005/11/07/mdm-55-api-tips-and-tricks--parlez-vous-deutsch-accessing-multilingual-repositories for more info.

Regards,

Walter

Former Member
0 Kudos

Hello Walter:

I see what you mean.... now when I choose "English " on both the login and region code, it is ok. Now on German, I get the issue.

I found out that I'm trying to access just one table ("Vendors") and I have data and table description on both English and German. However, on all the other tables, I only have English, do you mean that all tables should be translated, even tough I don't use them at all?

having English as login language, and German as RegionCode, I get this:

a2i.core.StringException: Invalid parameter fieldName: Verkäuferzahl

Having German as login language and english as region code:

a2i.core.StringException: Region 'German ' is missing a code for table ID 4.

Having both German yields the same result. The thing is that I need to get the table schema, such as table name and fields on German as well as the data..... is that so?

Thanks a lot! I read the blog too

Kind Regards

Alejandro

Former Member
0 Kudos

I just noticed the <b>getCode()</b> method instead of <b>getName()</b>. This correctly retrieves the table schema in the correct language, I hope it's the same with the data

Thanks!

Former Member
0 Kudos

Hi Alejandro,

Some clarifications:

1) When you use SetRegionCode() every table and field must be available in that language.

2) The language specified in the Login function determines the language of the DATA you will be working with.

3) For ALL schema operations and access to table and fields, use the getCode() and setCode() functions. You can use the "getName()" function to display translated field and table names to users but you should always use the 'code' rather than the 'name' in API functions.

Note: As of SP4 there is a "CODE" field in the schema for tables and fields which makes life a lot easier for application developers using the API's because this becomes the "internal" identifier for tables and fields.

Note that any current applications written with the API's will continue to work seamlessly because the getCode() function will access this code name automatically.

Walter

Former Member
0 Kudos

Great, just for the future and clarifications from my side, internally I must use <b>getCode()</b>, that is, an internal representation, language independent.

For UI and display purposes, I should use <b>getName()</b>, which should give me the Translated name for that table.

I must not take one of the getName() for internal purposes, otherwise I get the exceptions stated above

Thanks, it's working now.

Kind Regards

Alejandro

Former Member
0 Kudos

I don't see anything in the COM API that has SetCodeRegion, getCode, getName, etc.... is it not available, not needed in the COM API?

The answer is no.

/people/walter.kahn/blog/2005/11/07/mdm-55-api-tips-and-tricks--parlez-vous-deutsch-accessing-multilingual-repositories

Message was edited by: Mike Malloy

Former Member
0 Kudos

Hi guys

We are have a similiar issue between connecting between Spanish and English but we are using .Net.

Any suggestions?

Answers (0)