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

mapping non existent fields

Hi All,

I have the following XML-Structure:

<i>

<A><A1>a1_1</A1><A2>a2_1</A2></A>

<A><A1>a1_2</A1></A>

</i>

This structure should be mapped to another structure like

<i>

<B><B1>a1_1</B1><B2>a2_1</B2></B>

<B><B1>a1_2</B1><B2><b>dummy</b></B2></B>

</i>

So the value of A1 should map to B1 and the value of A2 shuold map to B2. The problem is that B2 should contain the constant 'dummy' if A2 does not exist.

I tried with 'exists' and 'if' but it dosen't work. It only ends up with an empty <B2 />.

I'm using XI2.0 SP05 and the graphical mapping tool.

Has anybody any ideas?

Thank you in advance

Marc

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Posted on Jun 16, 2004 at 02:23 PM

    Is it possible to have 2 mappings, the first map to assign 'dummy' to B2 and the second map to assign field to field. Haven't gotten very deep into the XI game but have some book knowledge.

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi marc,

      is ur problem is solved.?if it solve plz give me the solution..iam also having same type of reqirement.

      Iam presently doing on conversions realed to Finacial postings.my work in this task is "iam uploading an excel file from work station and save it in unix file,before sending into unix iam doing mapping of some financial realeted fields ".how can i map that fields.iam doing on the certain Strcture it is belonfg to the finacial batch interface.

      plz give sample example and code..?

      Map the certain strcture fields as GL-GL, GL-AP, GL-AR, AP-AP, AR-AR, etc posting Use the format as in SAP (date, number, leading 0-s)

      if it solved then send me to kiranlead@yahoo.com

  • author's profile photo Former Member
    Former Member
    Posted on Jun 18, 2004 at 07:19 AM

    Hi Marc,

    It does not seem to work with standard functions in XI2.0 (in XI3.0 it does work)

    But you can do it with the following advanced user-defined function:

    if (a.length>0)

    for (int i=0;i<a.length;i++) result.addValue(a<i>);

    else result.addValue(b[0]);

    where argument a - is the optional node, and b - is the constant.

    Regards,

    Alexey

    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.