cancel
Showing results for 
Search instead for 
Did you mean: 

mapping non existent fields

Former Member
0 Kudos

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

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

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

former_member353483
Discoverer
0 Kudos

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.

Former Member
0 Kudos

Hi John,

how should this work?

Could you explain that a little more detailed?

Regards

Marc

Former Member
0 Kudos

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