on 08-15-2006 9:46 AM
Hi All,
Im getting the following problem.
My scenario is Filetoidoc.
Problem:
In the interface mapping Im able to see all the values are populated correctly for Idoc.but when I see in IDX5 or SXMB_MONI one value instead of populating correctly replacing , in that field.
Im using Java mapping program also to convert the file in to desired structure.
Thanks in advance.
Venu.
Hi All,
Actually the above problem is coming bcz some apostrophe's are coming in one of the fields.
So i have used the following java code.
char[] specialCharacters = { '&', '<', '>', '\'' };
String[] replacementStrings = { "&", "<", ">", "'" };
public String sanitizeText( String text )
{
StringBuffer buffer = new StringBuffer( text );
for( int i = 0; i < buffer.length(); i++ )
{
for( int k = 0; k < specialCharacters.length; k++ )
{
if( buffer.charAt(i) == specialCharacters[k] )
{
buffer.replace( i, i + 1, replacementStrings[k] );
i += replacementStrings[k].length();
}
/*else if( (int)buffer.charAt(i) > 128 )
{
String replacement = "&#" + (int)buffer.charAt(i) + ";";
buffer.replace( i, i + 1, replacement );
i += replacement.length();
}*/
}
}
return buffer.toString();
}
Thanks,
venu.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi All,
The out put from the above java program is.
<?xml version='1.0' encoding='UTF-8'?><ns0:MT_MeterReading_IntermediateForm xmlns:ns0="urn://MVP_SR3_01/MVP/MeterReading"><Recordset><H1><Recordid>H1</Recordid><RouteNumber>10151G</RouteNumber><MetReaderId>002</MetReaderId><TotRead>000015</TotRead><TotDevUploaded>000016</TotDevUploaded></H1></Recordset><Recordset><H1><Recordid>H1</Recordid><RouteNumber>10151G</RouteNumber><MetReaderId>SYSADMIN</MetReaderId><TotRead>000000</TotRead><TotDevUploaded>000000</TotDevUploaded></H1><Item><D1><HMetReaderId>SYSADMIN</HMetReaderId><HTotDevicesUploaded>000000</HTotDevicesUploaded><AccountNumber>6205</AccountNumber><MeterReadCode>0000001495</MeterReadCode><ReadDate>20060819</ReadDate><TroubleCode></TroubleCode></D1><D2><ChgdSplInstr>IN FOOTPATH DOG BITES information for service order</ChgdSplInstr></D2><U2><Data>33333300100451</Data></U2><UC><Data><u>SKIP TEST COMMENTS FROM METER READER FOR 4000734 MRo with RR '09'</u> </Data></UC></Item></Recordset></ns0:MT_MeterReading_IntermediateForm>
In abobe result last Data field value is populated correctly . the above result is from interface mapping.
but when the idoc is generated in XI. I'm unable to see the value.
Thanks,
venu.
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.