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

Mapping issue with mapWithDefault

Well i am a liitle confused: i have following mapping for target field:

/MT_NC_ART_edit/ARTRecordSet/ARTDetailsStruct/sAfoBez=replaceString(oneToMany(concat([delimeter=]/ZBC14_ARTIKEL/IDOC/ZBC14_ARTIKEL/ZBC14_ARTIKEL_VORNR/SAFOBEZ=, const([value=:]))), const([value=null]), const([value=]))

Actually i need the case now that when getting no value for sAfoBez there should be a ":" in target field. Therefore i tried with mapWithDefault giving a default-value. But funny thing is XI does not take it!

i tired this:

/MT_NC_ART_edit/ARTRecordSet/ARTDetailsStruct/sAfoBez=replaceString(oneToMany(concat([delimeter=]mapWithDefault([default_value=:]/ZBC14_ARTIKEL/IDOC/ZBC14_ARTIKEL/ZBC14_ARTIKEL_VORNR/SAFOBEZ=), const([value=:]))), const([value=null]), const([value=]))

The UDF inside the mapping is:

String[] store = new String[1];
for(int i=0;i<SAFONR.length;i++)
store[0] = store[0]+SAFONR<i>;

Can somebody give a hand?!


Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Aug 13, 2008 at 06:29 PM

    Hi Fritz,

    I couldn't understand your mapping. At what point are you using the 'mapwithdefault' function and whr does the UDF come into picture?

    Idealy it should take whatever constant you specify when the desired field is not present. Its a simple mapping.

    Can you elaborate it a little it?



    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.