cancel
Showing results for 
Search instead for 
Did you mean: 

Graphical mapping issue

Former Member
0 Kudos

Hi gurus,

we need help for following graphical mapping problem.

Our input message structure and payload is like;


	
<MT_INPUT>
	<Header>
		<VendorName>GREEN IT</VendorName>
	</Header>
	<Records>
		<MType>T</MType>
		<Unit>KG</Unit>
		<MS>40</MS>
	</Records>
	<Records>
		<MType>S</MType>
		<Unit>STK</Unit>
		<MS>2</MS>
	</Records>
	<Records>
		<MType>S</MType>
		<Unit>STK</Unit>
		<MS>5</MS>
	</Records>
	<Records>
		<MType>T</MType>
		<Unit>KG</Unit>
		<MS>30</MS>
	</Records>
	<Records>
		<MType>S</MType>
		<Unit>STK</Unit>
		<MS>3</MS>
	</Records>
</MT_INPUT>

We need only the values with Mtype = T

needed output message is like;

 
	
<MT_OUTPUT>
	<Header>
		<VendorName>GREEN IT</VendorName>
	</Header>
	<Records>
		<Type>Total</Type>
		<Unit>KG</Unit>
		<VALUE>40</VALUE>
	</Records>
	<Records>
		<Type>Total</Type>
	</Records>
	<Records>
		<Type>Total</Type>
	</Records>
	<Records>
		<Type>Total</Type>
		<Unit>KG</Unit>
		<VALUE>30</VALUE>
	</Records>
	<Records>
		<Type>Total</Type>
	</Records>
</MT_OUTPUT>

Kind Regards,

PM

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

MType---
------      equals-----if withoutelse(Unit----then) ------UNIT
Constant("T")---


MType---
------      equals-----if withoutelse(ms----then) ------VALUE
Constant("T")---

Former Member
0 Kudos

Yes but we need to create also Records for Mtype = S but without value!

Former Member
0 Kudos

Hi,

How do you populate field "Records" ? is simple . link one to one and apply the above solution "ifWithoutelse" function.

Regards.

Luis

Former Member
0 Kudos

do a one to one mapping for Records and Type field...

Answers (1)

Answers (1)

Shabarish_Nair
Active Contributor
0 Kudos

you should be ideally able to hande this with simple IF -ELSE function.

what is the problem you are running into?