cancel
Showing results for 
Search instead for 
Did you mean: 

XI 7.0 Message mapping - Get Value from other node

Former Member
0 Kudos

Hello experts,

my problem is as shown below.

- Source message has n items.

- Each item contains an item number (MATERIAL) Language (LANGU) and description (MATL_DESC)

- Key is MATERIAL

- There should be a fallback language "English".

- MATL_DESC contains NO vlaue and language is DE, then value of MATL_DESC with the same material number and language EN should be selected.

- see below picture: for the empty field MATL_DESC the value of the "English" material (same MATERIAL) is to be used.

Who has an idea to solve this with graphic mapping?

Thank you in advance.


Best regards

Accepted Solutions (1)

Accepted Solutions (1)

pvishnuvardan_reddy
Active Contributor
0 Kudos

Hi Fabian,

I would prefer writing a udf for this requirement, as it becomes complicate or not possible using normal graphical functions.

I have written the udf for this requirement, please find below the code, check this and let me know if you struck anywhere.

String desc="";

for(int i=0;i<Matdes.length;i++)

{

       desc = Matdes[i];

       if(((Matdes[i]=="NULL") || (Matdes[i]=="")) &&  (Lang[i]=="DE"))

      {

             for(int j=0;j<Matnum.length;j++)

                      if((Matnum[i]==Matnum[j]) && (Lang[j]=="EN"))

                           desc = Matdes[j];

      }

      result.addValue(desc);

}

Regards

Vishnu

Former Member
0 Kudos

Hello Vishnu,

thank you for the tip!

In the meantime I wrote a simple XSL mapping which easily does the required mapping step 🙂

Best regards,

Fabian

pvishnuvardan_reddy
Active Contributor
0 Kudos

Hi Fabian,

Can you reward points if you found my answer is useful...

Yes, we can use XSLT mapping also for this requirement, but I am huge fan of graphical mapping..

Regards

Vishnu

iaki_vila
Active Contributor
0 Kudos

Hi all,

From my point of view it is better to try with graphical mapping, you should consider that the XSLT solution needs to call a XSLT processor from the JVM, and if you don't use a bad code in the UDF you are following a usual resolution without extra-classes load, GM solution should have a better performance.

Regards.

Answers (0)