on 06-10-2015 1:23 PM
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.