Skip to Content
author's profile photo Former Member
Former Member

Using Value Mapping feature during JavaMapping


does anybody has experience to the executing of value mappings during a java mapping in XI.

I have the problem, that the funktion

public abstract String query( IRepresentation source,

IRepresentation target)

return null for a enquired object-key. In the Directory I have entered the value mapping table.

Here are the inserts:

Source-System: EU_OPTO_SAPR3

Source-Objecttyp: Name

Source-Namespace: urn:sap-com:document:sap:idoc:messages

Source-Key: UsedName

Target-System: EU_OPTO_TEST

Traget-Objecttyp: Name


Traget-Key: KeyValue

Here is the source-code:


KeyMappingService s = KeyMappingService.getInstance();

IRepresentation rIn = s.newRepresentation ("EU_OPTO_SAPR3", "Name", "urn:sap-com:document:sap:idoc:messages", "UsedName");

IRepresentation rOut = s.newRepresentation("EU_OPTO_TEST", "Name", "");

String usedIniFile = s.query( rIn, rOut );

generateTrace( "reading key-Mapping [" + usedIniFile + "]-[" + rOut.getKey() + "]", TRACELEVEL_INFO, false );

} catch( Exception e ){

generateTrace( "Exception reading key-Mapping " + e.toString(), TRACELEVEL_INFO, false );


Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Best Answer
    Posted on Jun 14, 2004 at 01:08 PM


    Which version of XI do you use? I use 2.0 - I hope SAP doesn't change the signature of "newRepresentation" function between XI versions.

    You've got the wrong order of parameters in "newRepresentation" function: you put the object type on the namespace place.

    Here is a simple example:

    IRepresentation source = s.newRepresentation(sourceSystem, sourceNamespace, sourceObjectType, sourceKey);

    IRepresentation target = s.newRepresentation(targetSystem, targetNamespace, targetObjectType);

    Have a nice day,

    Andrzej Filusz

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.