Skip to Content
0
Jul 30, 2019 at 06:54 PM

Summarize file in PI Mapping

64 Views

Hello

I have output file like this

<ns0:MT_ForeignBatch xmlns:ns0="http://ca.tbs/sap"> <RecordSet> <Header> <ApplicationID>R</ApplicationID> <BatchID>38061211</BatchID> <YearPeriod> </YearPeriod> <TransactionType>RE</TransactionType> <TransactionDate>190612</TransactionDate> <SupplyContractNumber> </SupplyContractNumber> <SlipControlAmount1> 0000000000</SlipControlAmount1> <SlipControlAmount2> 0000000000</SlipControlAmount2> <SlipControlAmount3> 0000000000</SlipControlAmount3> <BatchControlAmount1> 0000000000</BatchControlAmount1> <BatchControlAmount2> 0000000000</BatchControlAmount2> <BatchControlAmount3> 0000000000</BatchControlAmount3> <TransactionCount> 000</TransactionCount> <ErrorCount> 000</ErrorCount> <Filler> </Filler> <PrgramName>TBS </PrgramName> <ReCalcIndicator> </ReCalcIndicator> <WarningIndicator> </WarningIndicator> <ErrorIndicator> </ErrorIndicator> </Header> <Item> <ApplicationID>R</ApplicationID> <BatchID>38061211</BatchID> <GLAccount>103402</GLAccount> <CostCenter> </CostCenter> <InternalOrder> </InternalOrder> <Fund>319999 </Fund> <BusinessArea>CITY</BusinessArea> <QuantityAmount>00000.00</QuantityAmount> <RateAmount>00000.0000</RateAmount> <Amount>-490</Amount> <Description>Box Office Visa 6038921</Description> <Reference>TBS </Reference> <Reference2>0010006038921 </Reference2> <RecordType> </RecordType> <WBSElement> </WBSElement> <Network> </Network> <Activity> </Activity> <Filler> </Filler> </Item> <Item> <ApplicationID>R</ApplicationID> <BatchID>38061211</BatchID> <GLAccount>112520</GLAccount> <CostCenter> </CostCenter> <InternalOrder> </InternalOrder> <Fund>310000 </Fund> <BusinessArea>CITY</BusinessArea> <QuantityAmount>00000.00</QuantityAmount> <RateAmount>00000.0000</RateAmount> <Amount>-80</Amount> <Description>Box Office Masterca 6038921</Description> <Reference>TBS </Reference> <Reference2>0020006038921 </Reference2> <RecordType> </RecordType> <WBSElement> </WBSElement> <Network> </Network> <Activity> </Activity> <Filler> </Filler> </Item> <Item> <ApplicationID>R</ApplicationID> <BatchID>38061511</BatchID> <GLAccount>103402</GLAccount> <CostCenter> </CostCenter> <InternalOrder> </InternalOrder> <Fund>319999 </Fund> <BusinessArea>CITY</BusinessArea> <QuantityAmount>00000.00</QuantityAmount> <RateAmount>00000.0000</RateAmount> <Amount>-288</Amount> <Description>Box Office Visa 6038921</Description> <Reference>TBS </Reference> <Reference2>0010006038921 </Reference2> <RecordType> </RecordType> <WBSElement> </WBSElement> <Network> </Network> <Activity> </Activity> <Filler> </Filler> </Item> <Item> <ApplicationID>R</ApplicationID> <BatchID>38051211</BatchID> <GLAccount>112555</GLAccount> <CostCenter> </CostCenter> <InternalOrder> </InternalOrder> <Fund>310000 </Fund> <BusinessArea>CITY</BusinessArea> <QuantityAmount>00000.00</QuantityAmount> <RateAmount>00000.0000</RateAmount> <Amount>-135</Amount> <Description>Box Office Masterca 6038921</Description> <Reference>TBS </Reference> <Reference2>0020006038921 </Reference2> <RecordType> </RecordType> <WBSElement> </WBSElement> <Network> </Network> <Activity> </Activity> <Filler> </Filler> </Item> </RecordSet> </ns0:MT_ForeignBatch>

I have to summarize line items based on

If GLAccount and Description are identical then amount should be summarized.

Thank you

John