Skip to Content
0
Mar 24, 2011 at 08:14 PM

Message Mapping - SUM a field per unique combination of 2 other fields?

25 Views

I'm receiving a proxy with detail records, and I need to create a subtotals file. Here an example:

BEFORE MAPPING

<ROW>

<KOSTL>0000010300</KOSTL>

<POSID>DUMMY</POSID>

<FTE>0.51</FTE>

</ROW>

<ROW>

<KOSTL>0000010400</KOSTL>

<POSID>123</POSID>

<FTE>0.49</FTE>

</ROW>

<ROW>

<KOSTL>0000010400</KOSTL>

<POSID>DUMMY</POSID>

<FTE>0.72</FTE>

</ROW>

<ROW>

<KOSTL>0000010400</KOSTL>

<POSID>123</POSID>

<FTE>0.82</FTE>

</ROW>

<ROW>

<KOSTL>0000010300</KOSTL>

<POSID>DUMMY</POSID>

<FTE>0.18</FTE>

</ROW>

AFTER MAPPING:

<ROW>

<KOSTL>0000010300</KOSTL>

<POSID>DUMMY</POSID>

<FTE>0.59</FTE>

</ROW>

<ROW>

<KOSTL>0000010400</KOSTL>

<POSID>123</POSID>

<FTE>1.31</FTE>

</ROW>

<ROW>

<KOSTL>0000010400</KOSTL>

<POSID>DUMMY</POSID>

<FTE>0.72</FTE>

</ROW>

How do I create a new record for all unquie combinations of KOSTL and POSID? And total the FTE field for each line? Can this be done in a message mapping?