Skip to Content
0
May 09, 2011 at 10:14 PM

Problem with Simple Transformation

206 Views

Hi to all

I am working with ST, and have the following issue:

I have a highly nested xml structure, and, when I execute a abap program with a myself ST, only the last one data is passed to internal tables.

I want to know: how can I do to get that all the information from xml file to store to internal tables but not only the latest information structure?

For example I have the following xml file, and only the last occurence of <PSMService> is update in internal tables.

Thank you very much for your help.

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<InvoicingInformation>
<Services>
<PSMServices>
        <PSMService ContractCode="STF0996" InvoicePeriod="2011-01-31T00:00:00-06:00" ReceiptPointCode="347">
          <Transactions>
            <Transaction ReceiptPointCode="347" DeliveryPointCode="167" ExitTramoCode="15" SectorCode="SECTP_GNV">
            </Transaction>
          </Transactions>
          <DailyCharges>
            <DailyCharge ChargeCode="CHRGS_FIJO" Date="2011-01-01T00:00:00-06:00" Quantity="93" QuantityUnit="KPC">
            </DailyCharge>
            <DailyCharge ChargeCode="CHRGS_FIJO_COP" Date="2011-01-01T00:00:00-06:00" Quantity="93" QuantityUnit="KPC">
            </DailyCharge>
          </DailyCharges>
          <AggregateCharges>
            <AggregateCharge ChargeCode="CHRGS_DESVIO" IsTiered="false" Quantity="0" QuantityUnit="KPC" CurrencyCode="COP">
            </AggregateCharge>
            <AggregateCharge ChargeCode="CHRGS_DESVIO_US$" IsTiered="false" Quantity="0" QuantityUnit="KPC" CurrencyCode="USD">
            </AggregateCharge>
         </AggregateCharges>
        </PSMService>
        <PSMService ContractCode="STF0996" InvoicePeriod="2011-01-31T00:00:00-06:00" ReceiptPointCode="347">
          <Transactions>
            <Transaction ReceiptPointCode="347" DeliveryPointCode="192A" ExitTramoCode="16" SectorCode="SECTP_GNV">
            </Transaction>
          </Transactions>
          <DailyCharges>
            <DailyCharge ChargeCode="CHRGS_FIJO" Date="2011-01-01T00:00:00-06:00" Quantity="112" QuantityUnit="KPC">
            </DailyCharge>
            <DailyCharge ChargeCode="CHRGS_FIJO_COP" Date="2011-01-01T00:00:00-06:00" Quantity="112" QuantityUnit="KPC">
            </DailyCharge>
          </DailyCharges>
          <AggregateCharges>
            <AggregateCharge ChargeCode="CHRGS_FIJO" IsTiered="false" Quantity="560" QuantityUnit="KPC" CurrencyCode="USD">
            </AggregateCharge>
            <AggregateCharge ChargeCode="CHRGS_FIJO_COP" IsTiered="false" Quantity="560" QuantityUnit="KPC" CurrencyCode="COP">
            </AggregateCharge>
          </AggregateCharges>
        </PSMService>
        <PSMService ContractCode="STF0996" InvoicePeriod="2011-01-31T00:00:00-06:00" ReceiptPointCode="360">
          <Transactions>
            <Transaction ReceiptPointCode="260A" DeliveryPointCode="167" ExitTramoCode="15" SectorCode="SECTP_GNV">
            </Transaction>
            <Transaction ReceiptPointCode="260B" DeliveryPointCode="168" ExitTramoCode="15" SectorCode="SECTP_GNV"> 
            </Transaction>
          </Transactions>
          <DailyCharges>
            <DailyCharge ChargeCode="CHRGS_DESVIO" Date="2011-01-01T00:00:00-06:00" Quantity="0" QuantityUnit="KPC">
            </DailyCharge>
            <DailyCharge ChargeCode="CHRGS_DESVIO_US$" Date="2011-01-01T00:00:00-06:00" Quantity="0" QuantityUnit="KPC">
            </DailyCharge>
          </DailyCharges>
          <AggregateCharges>
            <AggregateCharge ChargeCode="CHRGS_DESVIO" IsTiered="false" Quantity="0" QuantityUnit="KPC" CurrencyCode="COP">
            </AggregateCharge>
            <AggregateCharge ChargeCode="CHRGS_DESVIO_US$" IsTiered="false" Quantity="0" QuantityUnit="KPC" CurrencyCode="USD">
            </AggregateCharge>
          </AggregateCharges>
        </PSMService>
 </PSMServices>
 </Services>
</InvoicingInformation>

Edited by: Thomas Zloch on May 10, 2011 12:46 PM - code tags added