Xml file structure:
<InvoiceAddress>
<Name>Salauddin Fashion House</Name>
<PostalCode>1219</PostalCode>
<City>Dhaka</City>
<CountryCode>BD</CountryCode>
</InvoiceAddress>
XML file Transformation code:
" if invoice tag not available
<tt:cond s-check="not-initial(ref('INVOICEADD'))">
" if name tag not available.
<tt:cond s-check="not-initial(ref('INVOICEADD.NAME'))">
<Name tt:value-ref="INVOICEADD.NAME"/> </tt:cond>
" if name tag available.
<tt:cond s-check="initial(ref('INVOICEADD.NAME'))">
<Name tt:value-ref="INVOICEADD.NAME"/> </tt:cond>
</tt:cond>
<tt:cond s-check="initial(ref('INVOICEADD.POSTALCODE'))">
<PostalCode tt:value-ref="INVOICEADD.POSTALCODE"/> </tt:cond>
</tt:cond>
<tt:cond s-check="initial(ref('INVOICEADD.CITY'))">
<City tt:value-ref="INVOICEADD.CITY"/> </tt:cond>
</tt:cond>
<tt:cond s-check="initial(ref('INVOICEADD.COUNTRYCODE'))">
<CountryCode tt:value-ref="INVOICEADD.COUNTRYCODE"/> </tt:cond>
</tt:cond>
<tt:cond s-check="initial(ref('INVOICEADD.NAME'))">
<Name tt:value-ref="INVOICEADD.NAME"/> </tt:cond>
</tt:cond>
<tt:cond s-check="initial(ref('INVOICEADD.POSTALCODE'))">
<PostalCode tt:value-ref="INVOICEADD.POSTALCODE"/> </tt:cond>
</tt:cond>
<tt:cond s-check="initial(ref('INVOICEADD.CITY'))">
<City tt:value-ref="INVOICEADD.CITY"/> </tt:cond>
</tt:cond>
<tt:cond s-check="initial(ref('INVOICEADD.COUNTRYCODE'))">
<CountryCode tt:value-ref="INVOICEADD.COUNTRYCODE"/> </tt:cond>
Serkan AKKAVAK
Computer Engineer BSc
SAP Department Deputy Manager
Contact : serkurumsal@yandex.com
0 Comments