Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

XML XSLT With Abap

Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 19

XML XSLT with ABAP

Create ABAP coding


At first we create the internal table TYPES and DATA definition, we want to fill with the XML data. I have
declared the table "it_airplus" like the structure from XML file definition for a better overview, because it is a
long XML Definition (see the XSD file in the sample ZIP container by airplus.com)
REPORT ZFI_AIRPLUS.

TYPE-POOLS: abap, ixml.

TYPES: BEGIN OF t_xml_line,


data(256) TYPE x,
END OF t_xml_line.

*Typdefinition für Airplus


*READ THE DOCUMENTATION "LASG_XML_INVOICE_BTM"!!!
*VARs beginning with "a_*" are ATTRIBUTES
TYPES: BEGIN OF t_inv_number,
number(30),
extension(3),
sequence(1),
END OF t_inv_number.

TYPES: BEGIN OF t_inv_part_address,


addressline(50),
post_code(6),
city(12),
state_code(6),
country_code(6),
country(12),
END OF t_inv_part_address.

TYPES: BEGIN OF t_inv_part_payee,


partycode(10),
address TYPE t_inv_part_address,
END OF t_inv_part_payee.

TYPES: BEGIN OF t_inv_part_invoicee,


billing_level(50),
partycode(10),
address TYPE t_inv_part_address,
END OF t_inv_part_invoicee.

TYPES: BEGIN OF t_inv_parties,


payee TYPE t_inv_part_payee,
invoicee TYPE t_inv_part_invoicee,
END OF t_inv_parties.

TYPES: BEGIN OF t_ap_head,


a_language(5),
a_direct_debit_qual(3),
inv_date(8),

1
inv_number TYPE t_inv_number,
credit_debit_qualifier(1),
credit_debit_label(10),
billing_currency(3),
base_currency(3),
due_date(8),
inv_parties TYPE t_inv_parties,
inv_qualifier(4),
END OF t_ap_head.

*---------------------------------------->

TYPES: BEGIN OF t_det_customer,


cardnumber(50),
name(50),
END OF t_det_customer.
TYPES: BEGIN OF t_det_serv_prov,
code(15),
companyname(50),
street(50),
place(50),
tax_code(50),
END OF t_det_serv_prov.
TYPES: BEGIN OF t_det_cust_dat,
personal_id(50),
dep_code(30),
cost_center(30),
acc_unit(30),
acc_number(30),
file_date(8),
proj_number(30),
order_number(30),
action_code(15),
destination(30),
txn_ref(15),
cust_ref(30),
dom_tag(5),
END OF t_det_cust_dat.

TYPES: BEGIN OF t_det_values_sum,


a_rate(5),
vat_value(15),
net_value(15),
END OF t_det_values_sum.
TYPES: BEGIN OF t_det_values,
a_sale_to_base_rate,
currency(3),
net_value(15),
vat_value(15),
gross_value(15),
add_ins_val(15),
line_gross_val(15),
vat_sum TYPE t_det_values_sum,
END OF t_det_values.

2
TYPES: BEGIN OF t_desc_sal_prov,
agency(30),
branch(15),
END OF t_desc_sal_prov.
TYPES: BEGIN OF t_desc_db_travel,
start_stat(50),
dest_stat(50),
db_class(15),
adults(2),
children(2),
END OF t_desc_db_travel.
TYPES: BEGIN OF t_desc_ht_book,
start_date(8),
end_date(8),
amount(2),
END OF t_desc_ht_book.
TYPES: BEGIN OF t_desc_serv_desc,
date(8),
doc_number(30),
voucher_number(30),
cc_code(15),
class(10),
txn_type_detail(3),
etix_qual(1),
flight_tax(15),
a_add_info_line(5),
add_info(50),
db_travel_data TYPE t_desc_db_travel,
ht_book_data TYPE t_desc_ht_book,
END OF t_desc_serv_desc.

TYPES: BEGIN OF t_det_det_desc_line,


sales_prov TYPE t_desc_sal_prov,
sale_val TYPE t_det_values,
bill_val TYPE t_det_values,
serv_desc TYPE t_desc_serv_desc,
END OF t_det_det_desc_line.

TYPES: BEGIN OF t_det_det_desc,


detail_desc TYPE t_det_det_desc_line,
END OF t_det_det_desc.

TYPES: BEGIN OF t_ap_detail,


a_line(5),
a_typ(30),
customer TYPE t_det_customer,
service_prov TYPE t_det_serv_prov,
customer_dat TYPE t_det_cust_dat,
sales_date(8),
proce_date(8),
onl_ord_ref(50),
sale_values TYPE t_det_values,

3
bill_values TYPE t_det_values,
det_descrip TYPE t_det_det_desc,
END OF t_ap_detail.

TYPES: BEGIN OF t_ap_details,


inv_detail TYPE t_ap_detail,
END OF t_ap_details.

*-------------------------------------------------->

TYPES: BEGIN OF t_sum_vat_sum,


a_rate(5),
net_value(15),
vat_value(15),
END OF t_sum_vat_sum.
TYPES: BEGIN OF t_sum_total_sale,
a_currency(3),
net_total(15),
vat_total(15),
vat_sum TYPE t_sum_vat_sum,
END OF t_sum_total_sale.
TYPES: BEGIN OF t_sum_total_bill,
net_total(15),
vat_total(15),
vat_sum TYPE t_sum_vat_sum,
add_ins_val(15),
total_bill_amount(15),
END OF t_sum_total_bill.

TYPES: BEGIN OF t_ap_summary,


a_num_inv_det(5),
total_sale_values TYPE t_sum_total_sale,
total_bill_values TYPE t_sum_total_bill,
END OF t_ap_summary.
*-------------------------------------------------->
TYPES: BEGIN OF t_ap,
head TYPE t_ap_head,
details TYPE t_ap_details,
summary TYPE t_ap_summary,
END OF t_ap.

DATA: l_ixml TYPE REF TO if_ixml,


l_streamfactory TYPE REF TO if_ixml_stream_factory,
l_parser TYPE REF TO if_ixml_parser,
l_istream TYPE REF TO if_ixml_istream,
l_document TYPE REF TO if_ixml_document,
l_node TYPE REF TO if_ixml_node,
l_xmldata TYPE string.

DATA: l_xml_table TYPE TABLE OF t_xml_line,


l_xml_line TYPE t_xml_line,
l_xml_table_size TYPE i.
DATA: l_filename TYPE string.

4
DATA: l_xml_x1 TYPE xstring.

*airplus tables
DATA: it_airplus TYPE STANDARD TABLE OF t_ap,
wa_airplus TYPE t_ap
.

*Errorvariables
DATA: xslt_err TYPE REF TO cx_xslt_exception,
err_string TYPE string
.

PARAMETERS: pa_file TYPE char1024 DEFAULT 'c:\HOTEL_TEST.XML'.

START-OF-SELECTION.

* Creating the main iXML factory


l_ixml = cl_ixml=>create( ).

* Creating a stream factory


l_streamfactory = l_ixml->create_stream_factory( ).

PERFORM get_xml_table CHANGING l_xml_table_size l_xml_table.

* wrap the table containing the file into a stream


l_istream = l_streamfactory->create_istream_itable( table = l_xml_table
size = l_xml_table_size ).

* Creating a document
l_document = l_ixml->create_document( ).

* Create a Parser
l_parser = l_ixml->create_parser( stream_factory = l_streamfactory
istream = l_istream
document = l_document ).

* Validate a document
IF pa_val EQ 'X'.
l_parser->set_validating( mode = if_ixml_parser=>co_validate ).
ENDIF.

* Process the document


IF l_parser->is_dom_generating( ) EQ 'X'.

* here we use the CALL TRANSFORMATION method which calls


* the XSLT program "ZFI_AIRPLUS_XSLT"
TRY.
CALL TRANSFORMATION ZFI_AIRPLUS_XSLT
SOURCE xml l_xml_x1
RESULT xml_output = it_airplus
.
* catch any error, very helpful if the XSLT isn't correct
CATCH cx_xslt_exception INTO xslt_err.

5
err_string = xslt_err->get_text( ).
WRITE: / 'Transformation error: ', err_string.
EXIT.
ENDTRY.* setting a breakpoint to watch the workarea
* by the internal table "it_airplus"
break-point.

LOOP AT it_airplus INTO wa_airplus.


ENDLOOP.

Create XSLT program


There are two options to create a XSLT program:

1. Tcode: SE80 -> create/choose packet -> right click on it | Create -> Others -> XSL Transformation
2. Tcode: XSLT_TOOL

For a quick overview you can watch at the SXSLTDEMO* programs.

In this example we already use the three XSLT options explained later.
As you can see we define a XSL and ASX (ABAP) tags to handle the ABAP and XML variables/tags. After
"<asx:values>" we create the XML_OUTPUT tag, but in this case we also could speak about a container. In
fact the XML_OUTPUT tag comprise the structure of the internal table "it_airplus" which where moved by
the CALL TRANSFORMATION in the report.

This coding shows you a complete XSLT program with loops and variables.

XSLT programs can be used to read out and generate XML files.

As you can see in the first part of this program I used variables and later at description tag I used the
explicit command to refer the right tag in the XML file.

<xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:sap="http://www.sap.com/sapxsl" version="1.0">
<xsl:template match="INVOICES_BTM">
<asx:abap xmlns:asx="http://www.sap.com/abapxml" version="1.0">
<asx:values>
<XML_OUTPUT>
<xsl:for-each select="INVOICE_BTM">
<INVOICE_BTM>
<HEAD>
<xsl:variable name="head" select="INVOICE_HEAD" />
<A_LANGUAGE> <xsl:value-of select="$head/@LANGUAGE" />
</A_LANGUAGE>
<A_DIRECT_DEBIT_QUAL> <xsl:value-of select="$head/@DIRECT_DEBIT_QUALIFIER" />
</A_DIRECT_DEBIT_QUAL>
<INV_DATE> <xsl:value-of select="$head/INVOICE_DATE"/></INV_DATE>
<INV_NUMBER>
<xsl:variable name="number" select="$head/INVOICE_NUMBER" />
<NUMBER> <xsl:value-of select="$number/NUMBER"/> </NUMBER>
<EXTENSION><xsl:value-of select="$number/EXTENSION"/></EXTENSION>
<SEQUENCE> <xsl:value-of select="$number/SEQUENCE"/> </SEQUENCE>
</INV_NUMBER>
<CREDIT_DEBIT_QUALIFIER> <xsl:value-of
select="$head/CREDIT_DEBIT_QUALIFIER"/></CREDIT_DEBIT_QUALIFIER>

6
<CREDIT_DEBIT_LABEL> <xsl:value-of select="$head/CREDIT_DEBIT_LABEL"/>
</CREDIT_DEBIT_LABEL>
<BILLING_CURRENCY> <xsl:value-of select="$head/BILLING_CURRENCY"/>
</BILLING_CURRENCY>
<BASE_CURRENCY> <xsl:value-of select="$head/BASE_CURRENCY"/>
</BASE_CURRENCY>
<DUE_DATE> <xsl:value-of select="$head/DUE_DATE"/>
</DUE_DATE>

<INV_PARTIES>
<xsl:variable name="inv_parties" select="$head/INVOICE_PARTIES" />
<PAYEE>
<xsl:variable name="payee" select="$inv_parties/PAYEE" />
<PARTYCODE><xsl:value-of select="$payee/PARTYCODE"/></PARTYCODE>
<ADDRESS>
<xsl:variable name="address" select="$payee" />

<xsl:for-each select="$address/ADDRESSLINE">
<ADDRESSLINE> <xsl:value-of select="."/> </ADDRESSLINE>
</xsl:for-each>
<POST_CODE> <xsl:value-of
select="INVOICE_HEAD/INVOICE_PARTIES/PAYEE/ADDRESS/POST_CODE"/></POST_CODE>
<CITY> <xsl:value-of
select="INVOICE_HEAD/INVOICE_PARTIES/PAYEE/ADDRESS/CITY"/></CITY>
<STATE_CODE> <xsl:value-of
select="INVOICE_HEAD/INVOICE_PARTIES/PAYEE/ADDRESS/STATE_CODE"/></STATE_CODE>
<COUNTRY_CODE> <xsl:value-of
select="INVOICE_HEAD/INVOICE_PARTIES/PAYEE/ADDRESS/COUNTRY_CODE"/></COUNTRY_CODE>
<COUNTRY> <xsl:value-of
select="INVOICE_HEAD/INVOICE_PARTIES/PAYEE/ADDRESS/COUNTRY"/></COUNTRY>
</ADDRESS>
</PAYEE>
<INVOICEE>
<xsl:variable name="invoicee" select="$inv_parties/INVOICEE" />
<BILLING_LEVEL><xsl:value-of select="$invoicee/BILLING_LEVEL"/></BILLING_LEVEL>
<PARTYCODE> <xsl:value-of select="$invoicee/PARTYCODE"/></PARTYCODE>
<ADDRESS>
<xsl:variable name="address" select="$invoicee/ADDRESS" />
<xsl:for-each select="$address/ADDRESSLINE">
<ADDRESSLINE> <xsl:value-of select="."/></ADDRESSLINE>
</xsl:for-each>
<POST_CODE> <xsl:value-of select="$address/POST_CODE"/></POST_CODE>
<CITY> <xsl:value-of select="$address/CITY"/></CITY>
<STATE_CODE> <xsl:value-of select="$address/STATE_CODE"/></STATE_CODE>
<COUNTRY_CODE> <xsl:value-of select="$address/COUNTRY_CODE"/></COUNTRY_CODE>
<COUNTRY> <xsl:value-of select="$address/COUNTRY"/></COUNTRY>
</ADDRESS>
</INVOICEE>
</INV_PARTIES>
<INV_QUALIFIER><xsl:value-of select="$head/INVOICE_QUALIFIER"/></INV_QUALIFIER>

</HEAD>

<DETAILS>

7
<xsl:for-each select="INVOICE_DETAILS/INVOICE_DETAIL">
<xsl:variable name="inv_detail" select="." />

<INV_DETAIL>
<A_LINE><xsl:value-of select="$inv_detail/@LINE"/></A_LINE>
<A_TYP> <xsl:value-of select="$inv_detail/@TYP" /></A_TYP>
<CUSTOMER>
<xsl:variable name="customer" select="$inv_detail/CUSTOMER" />
<CARDNUMBER> <xsl:value-of select="$customer/CARDNUMBER"/></CARDNUMBER>
<NAME> <xsl:value-of select="$customer/NAME"/></NAME>
</CUSTOMER>
<SERVICE_PROV>
<xsl:variable name="service_prov" select="$inv_detail/SERVICE_PROVIDER" />
<CODE> <xsl:value-of select="$service_prov/CODE"/></CODE>
<COMPANYNAME> <xsl:value-of select="$service_prov/COMPANYCODE"/></COMPANYNAME>
<STREET> <xsl:value-of select="$service_prov/STREET"/></STREET>
<PLACE> <xsl:value-of select="$service_prov/PLACE"/></PLACE>
<TAX_CODE> <xsl:value-of select="$service_prov/TAX_CODE"/></TAX_CODE>
</SERVICE_PROV>
<CUSTOMER_DAT>
<xsl:variable name="customer_dat" select="$inv_detail/CUSTOMER_DATA" />
<PERSONAL_ID> <xsl:value-of select="$customer_dat/PERSONAL_ID"/></PERSONAL_ID>
<DEP_CODE> <xsl:value-of select="$customer_dat/DEPARTMENT_CODE"/></DEP_CODE>
<COST_CENTER> <xsl:value-of select="$customer_dat/COST_CENTER"/></COST_CENTER>
<ACC_UNIT> <xsl:value-of select="$customer_dat/ACCOUNTING_UNIT"/></ACC_UNIT>
<ACC_NUMBER> <xsl:value-of select="$customer_dat/ACCOUNT_NUMBER"/></ACC_NUMBER>
<FILE_DATE> <xsl:value-of select="$customer_dat/FILE_DATE"/></FILE_DATE>
<PROJ_NUMBER> <xsl:value-of select="$customer_dat/PROJECT_NUMBER"/></PROJ_NUMBER>
<ORDER_NUMBER> <xsl:value-of select="$customer_dat/ORDER_NUMBER"/></ORDER_NUMBER>
<ACTION_CODE> <xsl:value-of select="$customer_dat/ACTION_CODE"/></ACTION_CODE>
<DESTINATION> <xsl:value-of select="$customer_dat/DESTINATION"/></DESTINATION>
<TXN_REF> <xsl:value-of select="$customer_dat/TXN_REF"/></TXN_REF>
<CUST_REF> <xsl:value-of select="$customer_dat/CUSTOMER_REF"/></CUST_REF>
<DOM_TAG> <xsl:value-of select="$customer_dat/DOM_TAG"/></DOM_TAG>
</CUSTOMER_DAT>

<SALES_DATE> <xsl:value-of select="$inv_detail/SALES_DATE"/></SALES_DATE>


<PROCE_DATE> <xsl:value-of select="$inv_detail/PROCESSING_DATE"/></PROCE_DATE>
<ONL_ORD_REF> <xsl:value-of select="$inv_detail/ONLINE_ORDER_REF"/></ONL_ORD_REF>

<SALE_VALUES>
<xsl:variable name="sale_values" select="$inv_detail/SALE_VALUES" />
<A_SALE_TO_BASE_RATE><xsl:value-of select="$sale_values/@SALE_TO_BASE_RATE"
/></A_SALE_TO_BASE_RATE>
<CURRENCY> <xsl:value-of select="$sale_values/CURRENCY"/></CURRENCY>
<NET_VALUE> <xsl:value-of select="$sale_values/NET_VALUE"/></NET_VALUE>
<VAT_VALUE> <xsl:value-of select="$sale_values/VAT_VALUE"/></VAT_VALUE>
<GROSS_VALUE> <xsl:value-of select="$sale_values/GROSS_VALUE"/></GROSS_VALUE>
<ADD_INS_VAL> <xsl:value-of
select="$sale_values/ADDITIONAL_INSURANCE_VALUE"/></ADD_INS_VAL>
<LINE_GROSS_VAL><xsl:value-of
select="$sale_values/LINE_GROSS_VALUE"/></LINE_GROSS_VAL>
<xsl:variable name="vat_sum" select="$sale_values/VAT_SUMMARY" />
<xsl:for-each select="$sale_values/VAT_SUMMARY">

8
<VAT_SUM>

<A_RATE> <xsl:value-of select="$vat_sum/@RATE" /> </A_RATE>

<VAT_VALUE> <xsl:value-of select="$vat_sum/VAT_VALUE"/> </VAT_VALUE>


<NET_VALUE> <xsl:value-of select="$vat_sum/NET_VALUE"/> </NET_VALUE>

</VAT_SUM></xsl:for-each>
</SALE_VALUES>

<BILL_VALUES>
<xsl:variable name="bill_values" select="$inv_detail/BILLING_VALUES" />
<CURRENCY> <xsl:value-of select="$bill_values/CURRENCY"/></CURRENCY>
<NET_VALUE> <xsl:value-of select="$bill_values/NET_VALUE"/></NET_VALUE>
<VAT_VALUE> <xsl:value-of select="$bill_values/VAT_VALUE"/></VAT_VALUE>
<GROSS_VALUE> <xsl:value-of select="$bill_values/GROSS_VALUE"/></GROSS_VALUE>
<ADD_INS_VAL> <xsl:value-of
select="$bill_values/ADDITIONAL_INSURANCE_VALUE"/></ADD_INS_VAL>
<LINE_GROSS_VAL><xsl:value-of
select="$bill_values/LINE_GROSS_VALUE"/></LINE_GROSS_VAL>

<xsl:for-each select="$bill_values/VAT_SUMMARY">
<xsl:variable name="vat_sum" select="$bill_values/VAT_SUMMARY" />
<VAT_SUM>

<A_RATE> <xsl:value-of select="$vat_sum/@RATE" /> </A_RATE>


<VAT_VALUE> <xsl:value-of select="$vat_sum/VAT_VALUE"/> </VAT_VALUE>
<NET_VALUE> <xsl:value-of select="$vat_sum/NET_VALUE"/> </NET_VALUE>

</VAT_SUM></xsl:for-each>

</BILL_VALUES>

<DET_DESCRIP>
<xsl:for-each
select="INVOICE_DETAILS/INVOICE_DETAIL/DETAIL_DESCRIPTIONS/DETAIL_DESCRIPTION">
<DETAIL_DESC>
<A_LINE><xsl:value-of
select="INVOICE_DETAILS/INVOICE_DETAIL/DETAIL_DESCRIPTIONS/DETAIL_DESCRIPTION/@LINE" /></A_LINE>
<SALES_PROV>
<AGENCY> <xsl:value-of
select="INVOICE_DETAILS/INVOICE_DETAIL/DETAIL_DESCRIPTIONS/DETAIL_DESCRIPTION/SALES_PROVIDER/AGENCY"
/></AGENCY>
<BRANCH> <xsl:value-of
select="INVOICE_DETAILS/INVOICE_DETAIL/DETAIL_DESCRIPTIONS/DETAIL_DESCRIPTION/SALES_PROVIDER/BRANCH"
/></BRANCH>
</SALES_PROV>
<SALE_VAL>
<A_SALE_TO_BASE_RATE><xsl:value-of
select="INVOICE_DETAILS/INVOICE_DETAIL/DETAIL_DESCRIPTIONS/DETAIL_DESCRIPTION/SALE_VALUES/@SALE_TO_B
ASE_RATE" /></A_SALE_TO_BASE_RATE>

9
<CURRENCY> <xsl:value-of
select="INVOICE_DETAILS/INVOICE_DETAIL/DETAIL_DESCRIPTIONS/DETAIL_DESCRIPTION/SALE_VALUES/CURRENCY"/
></CURRENCY>
<NET_VALUE> <xsl:value-of
select="INVOICE_DETAILS/INVOICE_DETAIL/DETAIL_DESCRIPTIONS/DETAIL_DESCRIPTION/SALE_VALUES/NET_VALUE"
/></NET_VALUE>
<VAT_VALUE> <xsl:value-of
select="INVOICE_DETAILS/INVOICE_DETAIL/DETAIL_DESCRIPTIONS/DETAIL_DESCRIPTION/SALE_VALUES/VAT_VALUE"
/></VAT_VALUE>
<GROSS_VALUE> <xsl:value-of
select="INVOICE_DETAILS/INVOICE_DETAIL/DETAIL_DESCRIPTIONS/DETAIL_DESCRIPTION/SALE_VALUES/GROSS_VALU
E"/></GROSS_VALUE>
<ADD_INS_VAL> <xsl:value-of
select="INVOICE_DETAILS/INVOICE_DETAIL/DETAIL_DESCRIPTIONS/DETAIL_DESCRIPTION/SALE_VALUES/ADDITIONAL
_INSURANCE_VALUE"/></ADD_INS_VAL>
<LINE_GROSS_VAL><xsl:value-of
select="INVOICE_DETAILS/INVOICE_DETAIL/DETAIL_DESCRIPTIONS/DETAIL_DESCRIPTION/SALE_VALUES/LINE_GROSS
_VALUE"/></LINE_GROSS_VAL>
<VAT_SUM>

<xsl:for-each select="">
<VAT_VALUE><xsl:value-of
select="INVOICE_DETAILS/INVOICE_DETAIL/DETAIL_DESCRIPTIONS/DETAIL_DESCRIPTION/SALE_VALUES/VAT_SUMMAR
Y/VAT_VALUE"/></VAT_VALUE>
</xsl:for-each>
<xsl:for-each select="">
<NET_VALUE><xsl:value-of
select="INVOICE_DETAILS/INVOICE_DETAIL/DETAIL_DESCRIPTIONS/DETAIL_DESCRIPTION/SALE_VALUES/VAT_SUMMAR
Y/NET_VALUE"/></NET_VALUE>
</xsl:for-each>
</VAT_SUM>
</SALE_VAL>
<BILL_VAL>
<CURRENCY> <xsl:value-of
select="INVOICE_DETAILS/INVOICE_DETAIL/DETAIL_DESCRIPTIONS/DETAIL_DESCRIPTION/BILLING_VALUES/CURRENC
Y"/></CURRENCY>
<NET_VALUE> <xsl:value-of
select="INVOICE_DETAILS/INVOICE_DETAIL/DETAIL_DESCRIPTIONS/DETAIL_DESCRIPTION/BILLING_VALUES/NET_VAL
UE"/></NET_VALUE>
<VAT_VALUE> <xsl:value-of
select="INVOICE_DETAILS/INVOICE_DETAIL/DETAIL_DESCRIPTIONS/DETAIL_DESCRIPTION/BILLING_VALUES/VAT_VAL
UE"/></VAT_VALUE>
<GROSS_VALUE> <xsl:value-of
select="INVOICE_DETAILS/INVOICE_DETAIL/DETAIL_DESCRIPTIONS/DETAIL_DESCRIPTION/BILLING_VALUES/GROSS_V
ALUE"/></GROSS_VALUE>
<ADD_INS_VAL> <xsl:value-of
select="INVOICE_DETAILS/INVOICE_DETAIL/DETAIL_DESCRIPTIONS/DETAIL_DESCRIPTION/BILLING_VALUES/ADDITIO
NAL_INSURANCE_VALUE"/></ADD_INS_VAL>
<LINE_GROSS_VAL><xsl:value-of
select="INVOICE_DETAILS/INVOICE_DETAIL/DETAIL_DESCRIPTIONS/DETAIL_DESCRIPTION/BILLING_VALUES/LINE_GR
OSS_VALUE"/></LINE_GROSS_VAL>
<VAT_SUM>
<A_RATE><xsl:value-of
select="INVOICE_DETAILS/INVOICE_DETAIL/DETAIL_DESCRIPTIONS/DETAIL_DESCRIPTION/BILLING_VALUES/VAT_SUM
MARY/@RATE" /></A_RATE>

10
<xsl:for-each select="">
<VAT_VALUE><xsl:value-of
select="INVOICE_DETAILS/INVOICE_DETAIL/DETAIL_DESCRIPTIONS/DETAIL_DESCRIPTION/BILLING_VALUES/VAT_SUM
MARY/VAT_VALUE"/></VAT_VALUE>
</xsl:for-each>
<xsl:for-each select="">
<NET_VALUE><xsl:value-of
select="INVOICE_DETAILS/INVOICE_DETAIL/DETAIL_DESCRIPTIONS/DETAIL_DESCRIPTION/BILLING_VALUES/VAT_SUM
MARY/NET_VALUE"/></NET_VALUE>
</xsl:for-each>
</VAT_SUM>

</BILL_VAL>
<SERV_DESC>
<DATE> <xsl:value-of
select="INVOICE_DETAILS/INVOICE_DETAIL/DETAIL_DESCRIPTIONS/DETAIL_DESCRIPTION/SERVICE_DESCRIPTION/DA
TE"/></DATE>
<DOC_NUMBER> <xsl:value-of
select="INVOICE_DETAILS/INVOICE_DETAIL/DETAIL_DESCRIPTIONS/DETAIL_DESCRIPTION/SERVICE_DESCRIPTION/DO
CUMENT_NUMBER"/></DOC_NUMBER>
<VOUCHER_NUMBER> <xsl:value-of
select="INVOICE_DETAILS/INVOICE_DETAIL/DETAIL_DESCRIPTIONS/DETAIL_DESCRIPTION/SERVICE_DESCRIPTION/VO
UCHER_NUMBER"/></VOUCHER_NUMBER>
<CC_CODE> <xsl:value-of
select="INVOICE_DETAILS/INVOICE_DETAIL/DETAIL_DESCRIPTIONS/DETAIL_DESCRIPTION/SERVICE_DESCRIPTION/CC
_CODE"/></CC_CODE>
<CLASS> <xsl:value-of
select="INVOICE_DETAILS/INVOICE_DETAIL/DETAIL_DESCRIPTIONS/DETAIL_DESCRIPTION/SERVICE_DESCRIPTION/CL
ASS"/></CLASS>
<TXN_TYPE_DETAIL><xsl:value-of
select="INVOICE_DETAILS/INVOICE_DETAIL/DETAIL_DESCRIPTIONS/DETAIL_DESCRIPTION/SERVICE_DESCRIPTION/TX
N_TYPE_DETAIL"/></TXN_TYPE_DETAIL>
<ETIX_QUAL> <xsl:value-of
select="INVOICE_DETAILS/INVOICE_DETAIL/DETAIL_DESCRIPTIONS/DETAIL_DESCRIPTION/SERVICE_DESCRIPTION/ET
IX_QUALIFIER"/></ETIX_QUAL>
<FLIGHT_TAX> <xsl:value-of
select="INVOICE_DETAILS/INVOICE_DETAIL/DETAIL_DESCRIPTIONS/DETAIL_DESCRIPTION/SERVICE_DESCRIPTION/FL
IGHT_TAX"/></FLIGHT_TAX>
<A_ADD_INFO_LINE><xsl:value-of
select="INVOICE_DETAILS/INVOICE_DETAIL/DETAIL_DESCRIPTIONS/DETAIL_DESCRIPTION/SERVICE_DESCRIPTION/AD
DITIONAL_INFO/@LINE"/></A_ADD_INFO_LINE>
<xsl:for-each
select="INVOICE_DETAILS/INVOICE_DETAIL/DETAIL_DESCRIPTIONS/DETAIL_DESCRIPTION/SERVICE_DESCRIPTION/AD
DITIONAL_INFO">
<ADD_INFO> <xsl:value-of select="."/></ADD_INFO>
</xsl:for-each>
<DB_TRAVEL_DATA>
<START_STATION> <xsl:value-of
select="INVOICE_DETAILS/INVOICE_DETAIL/DETAIL_DESCRIPTIONS/DETAIL_DESCRIPTION/SERVICE_DESCRIPTION/DB
_TRAVEL_DATA/START_STATION"/></START_STATION>
<DEST_STATION> <xsl:value-of
select="INVOICE_DETAILS/INVOICE_DETAIL/DETAIL_DESCRIPTIONS/DETAIL_DESCRIPTION/SERVICE_DESCRIPTION/DB
_TRAVEL_DATA/DEST_STATION"/></DEST_STATION>

11
<DB_CLASS> <xsl:value-of
select="INVOICE_DETAILS/INVOICE_DETAIL/DETAIL_DESCRIPTIONS/DETAIL_DESCRIPTION/SERVICE_DESCRIPTION/DB
_TRAVEL_DATA/DB_CLASS"/></DB_CLASS>
<ADULTS> <xsl:value-of
select="INVOICE_DETAILS/INVOICE_DETAIL/DETAIL_DESCRIPTIONS/DETAIL_DESCRIPTION/SERVICE_DESCRIPTION/DB
_TRAVEL_DATA/ADULTS"/></ADULTS>
<CHILDREN> <xsl:value-of
select="INVOICE_DETAILS/INVOICE_DETAIL/DETAIL_DESCRIPTIONS/DETAIL_DESCRIPTION/SERVICE_DESCRIPTION/DB
_TRAVEL_DATA/CHILDREN"/></CHILDREN>

</DB_TRAVEL_DATA>
<HT_BOOK_DATA>
<START_DATE> <xsl:value-of
select="INVOICE_DETAILS/INVOICE_DETAIL/DETAIL_DESCRIPTIONS/DETAIL_DESCRIPTION/SERVICE_DESCRIPTION/HT
_BOOKING_DATA/START_DATE"/></START_DATE>
<END_DATE> <xsl:value-of
select="INVOICE_DETAILS/INVOICE_DETAIL/DETAIL_DESCRIPTIONS/DETAIL_DESCRIPTION/SERVICE_DESCRIPTION/HT
_BOOKING_DATA/END_DATE"/></END_DATE>
<AMOUNT> <xsl:value-of
select="INVOICE_DETAILS/INVOICE_DETAIL/DETAIL_DESCRIPTIONS/DETAIL_DESCRIPTION/SERVICE_DESCRIPTION/HT
_BOOKING_DATA/AMOUNT"/></AMOUNT>
</HT_BOOK_DATA>

</SERV_DESC>
</DETAIL_DESC>
</xsl:for-each>
</DET_DESCRIP>
</INV_DETAIL>
</xsl:for-each>
</DETAILS>

<!--
NUMBER_OF_INVOICE_DETAIL
<xsl:for-each select="INVOICE_SUMMARY/TOTAL_SALE_VALUES/VAT_SUMMARY">
</xsl:for-each>
<xsl:for-each select="INVOICE_SUMMARY/TOTAL_BILLING_VALUES/VAT_SUMMARY">
<xsl:attribute name="NUMBER_OF_INVOICE_DETAIL" >
</xsl:attribute>
<xsl:attribute name="RATE" ></xsl:attribute>
-->

<SUMMARY>
<xsl:variable name="summary" select="INVOICE_SUMMARY" />
<A_NUM_INV_DET><xsl:value-of select="$summary/@NUMBER_OF_INVOICE_DETAIL"
/></A_NUM_INV_DET>

<xsl:for-each select="$summary/TOTAL_SALE_VALUES">
<TOTAL_SALE_VALUES>
<xsl:variable name="total_sale_values" select="$summary" />
<A_CURRENCY><xsl:value-of select="$total_sale_values/@CURRENCY"/></A_CURRENCY>
<NET_TOTAL> <xsl:value-of select="$total_sale_values/NET_TOTAL"/></NET_TOTAL>
<VAT_TOTAL> <xsl:value-of select="$total_sale_values/VAT_TOTAL"/></VAT_TOTAL>

<xsl:for-each select="INVOICE_SUMMARY/TOTAL_SALE_VALUES/VAT_SUMMARY">

12
<VAT_SUM>
<xsl:variable name="vat_sum" select="$total_sale_values/VAT_SUMMARY" />
<A_RATE><xsl:value-of select="$vat_sum/@RATE" /></A_RATE>
<NET_VALUE><xsl:value-of select="."/></NET_VALUE>
<VAT_VALUE><xsl:value-of select="."/></VAT_VALUE>
</VAT_SUM></xsl:for-each>

</TOTAL_SALE_VALUES>
</xsl:for-each>

<TOTAL_BILL_VALUES>
<NET_TOTAL> <xsl:value-of
select="INVOICE_SUMMARY/TOTAL_BILLING_VALUES/NET_TOTAL"/></NET_TOTAL>
<VAT_TOTAL> <xsl:value-of
select="INVOICE_SUMMARY/TOTAL_BILLING_VALUES/VAT_TOTAL"/></VAT_TOTAL>

<VAT_SUM>
<A_RATE><xsl:value-of
select="INVOICE_SUMMARY/TOTAL_BILLING_VALUES/VAT_SUMMARY/@RATE" /></A_RATE>

<xsl:for-each
select="INVOICE_SUMMARY/TOTAL_BILLING_VALUES/VAT_SUMMARY/NET_VALUE">
<NET_VALUE><xsl:value-of select="."/></NET_VALUE>
</xsl:for-each>
<xsl:for-each
select="INVOICE_SUMMARY/TOTAL_BILLING_VALUES/VAT_SUMMARY/VAT_VALUE">
<VAT_VALUE><xsl:value-of select="."/></VAT_VALUE>
</xsl:for-each>
</VAT_SUM>

<ADD_INS_VAL> <xsl:value-of
select="INVOICE_SUMMARY/TOTAL_BILLING_VALUES/ADDITIONAL_INSURANCE_TOTAL"/></ADD_INS_VAL>
<TOTAL_BILL_AMOUNT> <xsl:value-of
select="INVOICE_SUMMARY/TOTAL_BILLING_VALUES/TOTAL_BILLING_AMOUNT"/></TOTAL_BILL_AMOUNT>
</TOTAL_BILL_VALUES>
</SUMMARY>

</INVOICE_BTM>
</xsl:for-each>
</XML_OUTPUT>
</asx:values>
</asx:abap>
</xsl:template>

</xsl:transform>

XSLT options
Here are the relevant XSLT elements in order of you could need it in your own program. For a good XSLT
reference look at W3Schools.com - reference. In a XSLT program it is also possible to to write comments
with the standard HTML commentfunction "<!>".

13
<xsl:value-of>

to catch the value from the element/attribute and move it to the ABAP variable

<ABAP_FIELD>

<xsl:value-of select="INVOICE/PARTNER/ADDRESS/street" />

</ABAP_FIELD>

<xsl:for-each>

use this element to make loops over your XML Tags, maybe if you have more than one XML tag (street) in
your XML-File

<xsl:for-each select="INVOICE/PARTNER/ADDRESS/street">

<ABAP_FIELD> <xsl:value-of select="." /> </ABAP_FIELD>

</xsl:for-each>

<xsl:variable>

create a variable for access to the XML element. It is just a nice shortcut. Note that you can close this XSL
element it self, look at the slash before the >

<xsl:variable name="var1" select="the_xml_element" />

continuative the "for-each" element you can write it like this:

<xsl:variable name="address" select="INVOICE/PARTNER/ADDRESS" /><xsl:for-each


select="$address/street">

<ABAP_FIELD> <xsl:value-of select="." /> </ABAP_FIELD>

</xsl:for-each>

XML sample file


We take the sample file from Airplus. You can load the sample ZIP container by Airplus at: airplus.com ->
products -> pay -> airplus electronic billing -> XML.

<?xml version="1.0" encoding="ISO-8859-1"?>


<!-- edited with XMLSPY v2004 rel. 3 U (http://www.xmlspy.com) by BOFH (Lufthansa Airplus
Servicekarten GmbH) -->
<?xml-stylesheet type="text/xsl" href="invoice_btm.xsl" ?>
<INVOICES_BTM xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="invoice_btm.xsd">
<INVOICE_BTM>
<INVOICE_HEAD LANGUAGE="DE" DIRECT_DEBIT_QUALIFIER="NO">
<INVOICE_DATE>20040112</INVOICE_DATE>
<INVOICE_NUMBER>
<NUMBER>0306299999</NUMBER>
<EXTENSION>0</EXTENSION>
<SEQUENCE>0</SEQUENCE>
</INVOICE_NUMBER>
<CREDIT_DEBIT_QUALIFIER>R</CREDIT_DEBIT_QUALIFIER>
<CREDIT_DEBIT_LABEL>Rechnung</CREDIT_DEBIT_LABEL>
<BILLING_CURRENCY>EUR</BILLING_CURRENCY>
<BASE_CURRENCY BILLING_TO_BASE_RATE="1.00000">EUR</BASE_CURRENCY>
<DUE_DATE>20040201</DUE_DATE>
<INVOICE_PARTIES>

14
<PAYEE>
<PARTYCODE>LASG</PARTYCODE>
<ADDRESS>
<ADDRESSLINE LINE="1">Lufthansa AirPlus
Servicekarten GmbH</ADDRESSLINE>
<ADDRESSLINE LINE="2">Postfach
1552</ADDRESSLINE>
<POST_CODE>63235</POST_CODE>
<CITY>Neu-Isenburg</CITY>
<COUNTRY_CODE>D</COUNTRY_CODE>
<COUNTRY>Deutschland</COUNTRY>
</ADDRESS>
</PAYEE>
<INVOICEE>
<BILLING_LEVEL>122000201089999</BILLING_LEVEL>
<PARTYCODE>DTA9999</PARTYCODE>
<ADDRESS>
<ADDRESSLINE LINE="1">Test Company
GmbH</ADDRESSLINE>
<ADDRESSLINE LINE="2">Frau Verthika
Kaur</ADDRESSLINE>
<ADDRESSLINE LINE="3">Frankfurter Str.
9</ADDRESSLINE>
<POST_CODE>63233</POST_CODE>
<CITY>Oberursel</CITY>
</ADDRESS>
</INVOICEE>
</INVOICE_PARTIES>
<INVOICE_QUALIFIER>TEST</INVOICE_QUALIFIER>
</INVOICE_HEAD>
<INVOICE_DETAILS>
<INVOICE_DETAIL LINE="1" TYP="HOTEL">
<CUSTOMER>
<CARDNUMBER>122000201089999</CARDNUMBER>
<NAME>Test Company GmbH</NAME>
</CUSTOMER>
<SERVICE_PROVIDER>
<COMPANYNAME>Steigenberger Mannheimer
Hof</COMPANYNAME>
<STREET>Augustaanlage 4 - 8</STREET>
<PLACE>Mannheim</PLACE>
<TAX_CODE>114216731</TAX_CODE>
</SERVICE_PROVIDER>
<CUSTOMER_DATA>
<DEPARTMENT_CODE>XX9823483</DEPARTMENT_CODE>
<FILE_DATE>20031230</FILE_DATE>
</CUSTOMER_DATA>
<SALES_DATE>20031230</SALES_DATE>
<PROCESSING_DATE>20040108</PROCESSING_DATE>
<ONLINE_ORDER_REF> no </ONLINE_ORDER_REF>
<SALE_VALUES SALE_TO_BASE_RATE="1.00000">
<CURRENCY>EUR</CURRENCY>
<NET_VALUE>235.55</NET_VALUE>
<VAT_VALUE>88.33</VAT_VALUE>
<GROSS_VALUE>980.50</GROSS_VALUE>

15
<VAT_SUMMARY RATE="16.00">
<NET_VALUE>616.16</NET_VALUE>
<VAT_VALUE>016.32</VAT_VALUE>
</VAT_SUMMARY>
<VAT_SUMMARY RATE="32.00">
<NET_VALUE>632.32</NET_VALUE>
<VAT_VALUE>032.48</VAT_VALUE>
</VAT_SUMMARY>
</SALE_VALUES>
<BILLING_VALUES>
<NET_VALUE>845.25</NET_VALUE>
<VAT_VALUE>135.25</VAT_VALUE>
<GROSS_VALUE>980.50</GROSS_VALUE>

<ADDITIONAL_INSURANCE_VALUE>0.00</ADDITIONAL_INSURANCE_VALUE>
<LINE_GROSS_VALUE>980.50</LINE_GROSS_VALUE>
<VAT_SUMMARY RATE="11.00">
<NET_VALUE>111.11</NET_VALUE>
<VAT_VALUE>011.22</VAT_VALUE>
</VAT_SUMMARY>
<VAT_SUMMARY RATE="22.00">
<NET_VALUE>222.22</NET_VALUE>
<VAT_VALUE>022.33</VAT_VALUE>
</VAT_SUMMARY>
<VAT_SUMMARY RATE="33.00">
<NET_VALUE>333.33</NET_VALUE>
<VAT_VALUE>033.44</VAT_VALUE>
</VAT_SUMMARY>
</BILLING_VALUES>
<DETAIL_DESCRIPTIONS NUMBER_OF_DETAIL_DESCRIPTIONS="5">
<DETAIL_DESCRIPTION LINE="1">
<SALE_VALUES SALE_TO_BASE_RATE="1.00000">
<NET_VALUE>180.17</NET_VALUE>
<VAT_VALUE>28.83</VAT_VALUE>
<GROSS_VALUE>209.00</GROSS_VALUE>
<VAT_SUMMARY RATE="16.00">

<NET_VALUE>180.17</NET_VALUE>

<VAT_VALUE>28.83</VAT_VALUE>
</VAT_SUMMARY>
</SALE_VALUES>
<SERVICE_DESCRIPTION>
<DATE>20031211</DATE>

<DOCUMENT_NUMBER>00255999</DOCUMENT_NUMBER>

<VOUCHER_NUMBER>00204999</VOUCHER_NUMBER>

<TXN_TYPE_DETAIL>V</TXN_TYPE_DETAIL>
<ADDITIONAL_INFO
LINE="1">Restaurant Avalon Getränk</ADDITIONAL_INFO>
<ADDITIONAL_INFO
LINE="2">Rechnung#000400010999</ADDITIONAL_INFO>
<HT_BOOKING_DATA>

<START_DATE>20031211</START_DATE>

16
<END_DATE>20031212</END_DATE>
<AMOUNT>9</AMOUNT>
</HT_BOOKING_DATA>
</SERVICE_DESCRIPTION>
</DETAIL_DESCRIPTION>
<DETAIL_DESCRIPTION LINE="2">
<SALE_VALUES SALE_TO_BASE_RATE="1.00000">
<NET_VALUE>172.41</NET_VALUE>
<VAT_VALUE>27.59</VAT_VALUE>
<GROSS_VALUE>200.00</GROSS_VALUE>
<VAT_SUMMARY RATE="16.00">

<NET_VALUE>172.41</NET_VALUE>

<VAT_VALUE>27.59</VAT_VALUE>
</VAT_SUMMARY>
</SALE_VALUES>
<SERVICE_DESCRIPTION>
<DATE>20031211</DATE>

<DOCUMENT_NUMBER>00255999</DOCUMENT_NUMBER>

<VOUCHER_NUMBER>00204999</VOUCHER_NUMBER>

<TXN_TYPE_DETAIL>V</TXN_TYPE_DETAIL>
<ADDITIONAL_INFO
LINE="1">Restaurant Avalon Speisen</ADDITIONAL_INFO>
<ADDITIONAL_INFO
LINE="2">Rechnung#000400010999</ADDITIONAL_INFO>
<HT_BOOKING_DATA>

<START_DATE>20031211</START_DATE>

<END_DATE>20031212</END_DATE>
<AMOUNT>9</AMOUNT>
</HT_BOOKING_DATA>
</SERVICE_DESCRIPTION>
</DETAIL_DESCRIPTION>
<DETAIL_DESCRIPTION LINE="3">
<SALE_VALUES SALE_TO_BASE_RATE="1.00000">
<NET_VALUE>95.26</NET_VALUE>
<VAT_VALUE>15.24</VAT_VALUE>
<GROSS_VALUE>110.50</GROSS_VALUE>
<VAT_SUMMARY RATE="16.00">

<NET_VALUE>95.26</NET_VALUE>

<VAT_VALUE>15.24</VAT_VALUE>
</VAT_SUMMARY>
</SALE_VALUES>
<SERVICE_DESCRIPTION>
<DATE>20031211</DATE>

<DOCUMENT_NUMBER>00255999</DOCUMENT_NUMBER>

<VOUCHER_NUMBER>00204999</VOUCHER_NUMBER>

<TXN_TYPE_DETAIL>V</TXN_TYPE_DETAIL>

17
<ADDITIONAL_INFO
LINE="1">Restaurant Avalon Getränk</ADDITIONAL_INFO>
<ADDITIONAL_INFO
LINE="2">Rechnung#000400010999</ADDITIONAL_INFO>
<HT_BOOKING_DATA>

<START_DATE>20031211</START_DATE>

<END_DATE>20031212</END_DATE>
<AMOUNT>9</AMOUNT>
</HT_BOOKING_DATA>
</SERVICE_DESCRIPTION>
</DETAIL_DESCRIPTION>
<DETAIL_DESCRIPTION LINE="4">
<SALE_VALUES SALE_TO_BASE_RATE="1.00000">
<NET_VALUE>25.00</NET_VALUE>
<VAT_VALUE>4.00</VAT_VALUE>
<GROSS_VALUE>29.00</GROSS_VALUE>
<VAT_SUMMARY RATE="16.00">

<NET_VALUE>25.00</NET_VALUE>

<VAT_VALUE>4.00</VAT_VALUE>
</VAT_SUMMARY>
</SALE_VALUES>
<SERVICE_DESCRIPTION>
<DATE>20031212</DATE>

<DOCUMENT_NUMBER>00255999</DOCUMENT_NUMBER>

<VOUCHER_NUMBER>00204999</VOUCHER_NUMBER>

<TXN_TYPE_DETAIL>V</TXN_TYPE_DETAIL>
<ADDITIONAL_INFO
LINE="1">Restaurant Avalon Getränk</ADDITIONAL_INFO>
<ADDITIONAL_INFO
LINE="2">Rechnung#000500009999</ADDITIONAL_INFO>
<HT_BOOKING_DATA>

<START_DATE>20031211</START_DATE>

<END_DATE>20031212</END_DATE>
<AMOUNT>9</AMOUNT>
</HT_BOOKING_DATA>
</SERVICE_DESCRIPTION>
</DETAIL_DESCRIPTION>
<DETAIL_DESCRIPTION LINE="5">
<SALE_VALUES SALE_TO_BASE_RATE="1.00000">
<NET_VALUE>372.41</NET_VALUE>
<VAT_VALUE>59.59</VAT_VALUE>
<GROSS_VALUE>432.00</GROSS_VALUE>
<VAT_SUMMARY RATE="16.00">

<NET_VALUE>372.41</NET_VALUE>

<VAT_VALUE>59.59</VAT_VALUE>
</VAT_SUMMARY>
</SALE_VALUES>
<SERVICE_DESCRIPTION>

18
<DATE>20031220</DATE>

<DOCUMENT_NUMBER>00255894</DOCUMENT_NUMBER>

<VOUCHER_NUMBER>00204401</VOUCHER_NUMBER>

<TXN_TYPE_DETAIL>V</TXN_TYPE_DETAIL>
<ADDITIONAL_INFO
LINE="1">Tagespauschale</ADDITIONAL_INFO>
<ADDITIONAL_INFO
LINE="2">12.12.03</ADDITIONAL_INFO>
<HT_BOOKING_DATA>

<START_DATE>20031211</START_DATE>

<END_DATE>20031212</END_DATE>
<AMOUNT>9</AMOUNT>
</HT_BOOKING_DATA>
</SERVICE_DESCRIPTION>
</DETAIL_DESCRIPTION>
</DETAIL_DESCRIPTIONS>
</INVOICE_DETAIL>
</INVOICE_DETAILS>
<INVOICE_SUMMARY NUMBER_OF_INVOICE_DETAIL="00001">
<TOTAL_SALE_VALUES CURRENCY="EUR">
<NET_TOTAL>845.25</NET_TOTAL>
<VAT_TOTAL>135.25</VAT_TOTAL>
<VAT_SUMMARY RATE="16.00">
<NET_VALUE>845.25</NET_VALUE>
<VAT_VALUE>135.25</VAT_VALUE>
</VAT_SUMMARY>
<VAT_SUMMARY RATE="15.00">
<NET_VALUE>745.15</NET_VALUE>
<VAT_VALUE>035.15</VAT_VALUE>
</VAT_SUMMARY>
</TOTAL_SALE_VALUES>
<TOTAL_BILLING_VALUES>
<NET_TOTAL>845.25</NET_TOTAL>
<VAT_TOTAL>135.25</VAT_TOTAL>
<VAT_SUMMARY RATE="16.00">
<NET_VALUE>845.25</NET_VALUE>
<VAT_VALUE>135.25</VAT_VALUE>
</VAT_SUMMARY>
<TOTAL_BILLING_AMOUNT>980.50</TOTAL_BILLING_AMOUNT>
</TOTAL_BILLING_VALUES>
</INVOICE_SUMMARY>
</INVOICE_BTM>
</INVOICES_BTM>

19

You might also like