2013 Nov 25 10:29 AM
Hello Experts
I am new to ABAP development and I am experimenting with XSLT transformations. Particularly, I am developing a report for an "inside-out job" specifically transforming data within an internal table to a XML file.
To do so, I decided to resort to the following one:
CALL TRANSFORMATION ZPW_DIRECT
SOURCE (lt_data)
RESULT XML z_salva
OPTIONS XML_HEADER = 'no'.
I created "ZPW_DIRECT" like the following one:
<?sap.transform simple?>
<tt:transform xmlns:tt="http://www.sap.com/transformation-templates">
<tt:root name="FIRST_NAME" type="?" />
<tt:root name="LAST_NAME" type="?" />
<tt:root name="MEMB_ID" type="?" />
<tt:root name="VALUE" type="?" />
<tt:template>
<DATA>
<FN_CT_NAME>
<tt:value ref="FIRST_NAME" />
</FN_CT_NAME>
<LN_CT_SURNAME>
<tt:value ref="LAST_NAME"/>
</LN_CT_SURNAME>
<CT_SHOPPING_CARD_CODE>
<tt:value ref="MEMB_ID"/>
</CT_SHOPPING_CARD_CODE>
<TOTAL_POINTS>
<tt:value ref="VALUE"/>
</TOTAL_POINTS>
</DATA>
</tt:template>
</tt:transform>
I manage to achieve a XML output file without errors, however if I do not use the XML_HEADER='NO' I get duplicated xml header on both begging and ending of tags.
Anyone has experienced such annoying issue and solved ?
Thank you
Hello Experts
I am new to ABAP development and I am experimenting with XSLT transformations. Particularly, I am developing a report for an "inside-out job" specifically transforming data within an internal table to a XML file.
To do so, I decided to resort to the following one:
CALL TRANSFORMATION ZPW_DIRECT
SOURCE (lt_data)
RESULT XML z_salva
OPTIONS XML_HEADER = 'no'.
I created "ZPW_DIRECT" like the following one:
<?sap.transform simple?>
<tt:transform xmlns:tt="http://www.sap.com/transformation-templates">
<tt:root name="FIRST_NAME" type="?" />
<tt:root name="LAST_NAME" type="?" />
<tt:root name="MEMB_ID" type="?" />
<tt:root name="VALUE" type="?" />
<tt:template>
<DATA>
<FN_CT_NAME>
<tt:value ref="FIRST_NAME" />
</FN_CT_NAME>
<LN_CT_SURNAME>
<tt:value ref="LAST_NAME"/>
</LN_CT_SURNAME>
<CT_SHOPPING_CARD_CODE>
<tt:value ref="MEMB_ID"/>
</CT_SHOPPING_CARD_CODE>
<TOTAL_POINTS>
<tt:value ref="VALUE"/>
</TOTAL_POINTS>
</DATA>
</tt:template>
</tt:transform>
I manage to achieve a XML output file without errors, however if I do not use the XML_HEADER='NO' I get duplicated xml header on both begging and ending of tags.
Anyone has experienced such annoying issue and solved ?
Thank you
2013 Nov 28 5:00 PM
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |