on 09-15-2006 10:41 AM
Hello,
I have created a xml file "data.xml" with a string page
attribut "xml" and the following page layout.
<?xml version='1.0' encoding='iso-8859-1'?>
<%@page language="abap"%>
<%=xml%>
in the event handler "On Request" I set the xml variable
with the following SELECT statement
SELECT matkl, bez .....
REPLACE '<' IN bez WITH ' kl '.
REPLACE '>' IN bez WITH ' gr '.
CONCATENATE item '<ITEM>' '<VAL>' matkl '</VAL>' '<DES>' bez '</DES>' '</ITEM>' INTO item.
ENDSELECT.
CONCATENATE '<GOODSGROUPS>' item '</GOODSGROUPS>' INTO xml.
As you can see I use the character encoding "iso-8859-1"
http://www.validome.org/doc/HTML_ge/inter/zeichensaetze.htm
My problem is that there are some characters that cannot
be viewed. Why? And which one? (I found out that there
are problems to view "<" and ">" and I REPLACED this one)
Error message in Web browser
<?xml version="1.0" encoding="iso-8859-1" ?>
- <GOODSGROUPS>
- <ITEM>
<VAL />
<DES />
</ITEM>
- <ITEM>
<VAL>1AA</VAL>
<DES>Si Scheiben kl150mm</DES>
</ITEM>
- <ITEM>
<VAL>4BF</VAL>
<DES>geloescht</DES>
</ITEM>
The XML page cannot be displayed
Cannot view XML input using XSL style sheet. Please correct the error and then click the Refresh button, or try again later.
-
A semi colon character was expected. Error processing resource 'http://vies12ex.vih.infineon.com:1080/sap/bc/bsp/sap/y_data...
<ITEM><VAL>5BD</VAL><DES>E undV Pressen</DES></ITEM><ITEM><VAL>5BE</VAL&g...
Give us the whole XML. Open the file via notepad and copy it.
For a better overview, restrict the select for one line, so that we can see the minimum xml.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
bellow u can see the whole abap code in the event handler (OnRequest). the variable "xml" contains the whole xml code, which is dynamically generated.
-
DATA: matkl TYPE T023-MATKL,
wgbez TYPE T023T-WGBEZ,
item TYPE string,
bez TYPE string,
schar.
item = ''.
SELECT FMATKL PWGBEZ
INTO (matkl, wgbez)
FROM T023 AS F JOIN T023T AS P
ON FMATKL = PMATKL AND
FMANDT = PMANDT
WHERE P~SPRAS = SY-LANGU.
bez = wgbez.
REPLACE '<' IN bez WITH ' kl '.
REPLACE '>' IN bez WITH ' gr '.
CONCATENATE item '<ITEM>' '<VAL>' matkl '</VAL>' '<DES>' bez '</DES>' '</ITEM>' INTO item.
ENDSELECT.
CONCATENATE '<GOODSGROUPS>' item '</GOODSGROUPS>' INTO xml.
-
the thing is, everything works without
the column "wgbez", only in this column are some characters
which cause troubles. But also in this column there are
only characters from ISO-8859-1 (Latin-1) character set.
Thx 4 help!
BR,
Rene.
User | Count |
---|---|
80 | |
9 | |
9 | |
7 | |
7 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.