** The XML output file is unreadable in SAP ECC 6.0 (Working fine in 4.6c)

Hi Friends,
I am working in SAP Technical upgrade Project from 4.6C to SAP ECC 6.0. In 4.6c one Z program is there, the output of Z program is to generate output XML file in the application Server. We checked and downloaded that the output file is readable and the XML is valid.
When we run the same program in ECC 6.0. (after unicode check & changes done), the output xml file is generated and it is in unreadable form. (XML contains some machine characters). When we open the XML in Altova Spy, it shows the error XML is invalid. The erorr is 'character #x3F3C is grammatically unexpected'. 
In 4.6c, they used the encoding <?xml version="1.0" encoding="ISO-8859-1" ?> . We changed the encoding to UTF-8 in ECC 6.0 since we are doing unicode conversion.  (
<?xml version="1.0" encoding="UTF-8" ?> ). After this change also, the output file is not generated correctly. It is unreadable form. (Some Machine Characters).
Friends, What could be the problem ? . Can you help me to identify this problem.
Kind regards,
Jegathees P.

I troubleshooted that, the reason is that conversion of X to C (Hexadecimal to C) in the ASSIGN statement is not working correctly in ECC 6.0. Then, we replaced the code with our custom Function Module to convert xstring to string. After this, we got the XML correctly, readable and well-formed XML.

Similar Messages

  • Ns0 in all the element tag of the XML output file

    Hi Gurus,
      I'm performing a mapping in the Integration Builder. The target structure is based on an imported xsd file via External Definitions.
    However, in the output file, I'm getting a ns0 prefix in all the name of the elements.
    Below is an example of how the output file looks like.
    <ns0:Document xmlns:ns0="urn:iso:std:iso:20022:tech:xsd:pain.001.001.02">
    <ns0:pain.001.001.02>
    <ns0:GrpHdr>
      <ns0:MsgId>0000000000247040099700</ns0:MsgId>
      <ns0:CreDtTm>29-07-2008 16 44 06</ns0:CreDtTm>
      <ns0:Authstn />
      <ns0:BtchBookg>M</ns0:BtchBookg>
      <ns0:NbOfTxs>1</ns0:NbOfTxs>
      <ns0:Grpg>GRPD</ns0:Grpg>
    Is there any way to get rid of the ns0? Issit some namespace definition which i need to specify somewhere?
    Thanks in advance.

    Hi,
    It does not matter whether your namespace prefix is ns, ns0, xyz or whatever.
    When your mapping doesn't work there must be another reason.
    Just try and paste the payload from moni and test ur mapping.
    The namespace prefic ns0 is only a placeholder for the namespace urn:iso:std:iso:20022:tech:xsd:pain.001.001.02. This namespace can also be represented by another prefix or even by the empty prefix.
    However, it is not possible to model the target payload via a Message type in the Integration Repository.
    Message types are simply not suitable to model a document as you have posted. However, there is simple help. Just download the schema for the Message type to your local file system. Add attribute elementFormDefault="qualified" to the root tag of that schema. Upload that schema as External Definition. This External Definition will have one External Message. Define your mapping using that schema.
    Thanks
    Swarup

  • Add XML tag to the XML output File

    Experts,
    My Scenario is JDBC to File
    For the resultant xml file i have to append a line <?Test Line?> after
    <?xml version="1.0" encoding="UTF-8" ?> while passing it to legacy system ?
    From SDN I found that a XSLT Mapping(as second mapping in the Interface mapping) will do the above requirement,
    I got some XSLT Code from SDN to do this
    1) 
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
      <xsl:output method="xml" />
      <xsl:template match="/">
    <!--  add processing instruction -->
      <xsl:processing-instruction
    name="POSTEN">SND="SE03220037090" SNDKVAL="1" REC="SE03220669500" MSGTYPE="ORDERS"</xsl:processing-instruction>
    <!--  copy payload -->
      <xsl:copy-of select="." />
      </xsl:template>
      </xsl:stylesheet>
    2) 
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
      <xsl:output method="xml" />
      <xsl:template match="/">
    <!--  add processing instruction -->
      <xsl:processing-instruction
    name="POSTEN">SND="SE03220037090" SNDKVAL="1" REC="SE03220669500" MSGTYPE="ORDERS"</xsl:processing-instruction>
    <!--  copy payload -->
      <xsl:copy-of select="." />
      </xsl:template>
      </xsl:stylesheet>
    But none of them worked for me, the additional tag does not appear on the o/p xml file
    Any help would be appreciated
    Srinivas

    Hello Srinivas,
    I had achieved the same using java mapping:
    Suppose your XML structure is:
    <?xml version="1.0" encoding="UTF-8" ?>
    <Root Element>----
    </Root Element>
    you can use the following code:
              import java.io.*;
              import java.util.*;
              import com.sap.aii.mapping.api.*;
              public class AddCommentInXML implements StreamTransformation {
              String record=null;
              String comment=null;
              public void execute(InputStream in, OutputStream out) {
              try {
              DataInputStream stdin = new DataInputStream(in);
              int length = getLengthFromStream(stdin);
              stdin.reset();
              byte[] buffer = getBytesFromStream(stdin);
              String str = new String(buffer);
              record = "<Root Element>";
              comment ="<!Test Line><Root Element>";
              str = str.replaceAll(record,comment);
              out.write(str.getBytes());
              out.close();
              } catch (IOException e) {
              public int getLengthFromStream(InputStream is ) throws
              IOException{
              int i = 0;
              int length = 0;
              try{
              while ((i = is.read())> 0){
              length ++;
              }catch (ArrayIndexOutOfBoundsException e) {
              e.printStackTrace();
              return length;
              public byte[] getBytesFromStream(InputStream is) throws
              IOException {
    //             Create the byte array to hold the data
              byte[] bytes = new byte[getLengthFromStream(is)];
              is.reset();
    //             Read in the bytes
              int offset = 0;
              int tmp = 0;
              while (offset < bytes.length
              && (is.read(bytes, offset, offset +
              (tmp = is.available()))) > 0) {
              offset += tmp;
    //             Ensure all the bytes have been read in
              if (offset < bytes.length) {
              throw new IOException("Could not completely read Inputstream");
    //             Close the input stream and return bytes
              is.close();
              return bytes;
              public void setParameter(Map param) {
    Hope this helps.
    Regards,
    Shweta

  • When running an xml publisher report the xml output leads to 9 mb and the excel output file leads to 20 mb.But the output records is originally 4000 records. When copy to new excel it is showing 3.5 mb only. Does anyone knows the answer for this issue?

    When running an xml publisher report the xml output leads to 9 mb and the excel output file leads to 20 mb. The records contained in excel file is 4000 records. When taking the excel records and copy to new excel file the excel file size is 3.5 mb only.Why does the oracle software generates 20mb file?
    Does any one knows the answer please advice?

    Hello,
    This issue is because the Excel output from BI Publisher is MHTML (XML Publisher generates XHTML) not binary .xls.
    MHTML and XHTML are more verbose formats than binary .xls.
    It will be large because the current Excel output is just an HTML and not compressed like PDF. Please use the workaround (save it as .xls file).  This is a known limitation of RTF layout templates.
    BI Publisher Enterprise has a new feature True Excel Templates. The layouts generate binary Excel output.
    Excel Output File Size Generated By BI Publisher is Very Large (Doc ID 760437.1)
    Bogdan

  • Need to reference file name within the XML Output

    Not sure if this is possible, as I'm new to the livecycle/XML world. But I need to be able to reference a file within the XML output from the PDF.
    The Scenario is that a pdf form of a business card will be issued to 50 franchisees for them to type in their names and mobiles, click submit and the XML file to be sent to myself, and be imported in to InDesign populating their data ready for printing. Up to here I have it working perfectly.
    However as each franchisee have a combination of up to 5 logos to place in the bottom corner to save having to have various templates with different combinations of logos and having to ensure the correct templates are used. I intend to reference each companies combination as an EPS and make the reference within the xml out and have it import directly in with the other data. I can type the code directly within the xml but I would like to have the form reference it directly in the xml output. Is this possible or am expecting to much of livecycle? Any help/advice greatly appreciated.
    David

    Hi MadhavaGanji,
    I have post how to validate the file name, header row against definition table which stored the file name and column definition. 
    Take a look and see if this is helpful.
    http://sqlage.blogspot.com/2013/11/ssis-validate-file-header-against.html
    http://sqlage.blogspot.com/

  • ns0 Prefix in XML output file

    Dear Gurus,
    I am working on a scenario where vendor master is triggered from  SAP-XI--FTP.
    when i am posting the vendor master on FTP.. i am getting
    the xml output with prefix as below
    <ns0:VENDORID>0000100000</ns0:VENDORID>at each element in vendor master xml file.
    Instead of  <VENDORID>0000100000</VENDORID>
    could anyone tell how to fix this prefix at each level.
    Does i need to add any module in file receiver adapter..or any patch i need to apply ..
    we are on SP9 PI 7.0
    Kind Regards,
    Vijay

    Hi,
    I tryed as per blog earlier ..it is not working
    i am using file receiver adapter...any other solution to fix this.
    Regards,
    Vijay

  • XML data file links java and sap

    Hi ,
    Please help me this
    How to connect xml file to java into sap
    please send me sample scenario.
    in java i call the this sap function module  'BAPI_MAT_BOM_EXISTENCE_CHECK'.
    1. Check BOM existence with BAPI_MAT_BOM_EXISTENCE_CHECK
    2. Exit BOM diff if BOM doesn’t exist
    3. Read BOM structure with CSAP_MAT_BOM_READ
    4. Compare SAP BOM items incl. subitems to XML BOM items and subitems

    currently I use following methods tu opload and to transfor the xml into a string.
    * Method to create XML from data file
      CALL METHOD instance->import_from_file
        EXPORTING
          filename = gf_filename
        RECEIVING
          retcode  = ch_retcode.
    * Convert into XML-Stream
      CALL METHOD instance->render_2_string
    *  EXPORTING
    *    pretty_print = 'X'
        IMPORTING
        retcode      = ch_retcode
          stream       = lf_string .
    *    size         = .
    When I use read dataset the output of the xml is into an internal table where I have many lines depending on the XML data file, this means if my xml has 10lines the internal table of read dataset has also 10 lines but I need a string to make the transformation of the xml.

  • How to calculate number of data records in a XML output file

    Hi,
    After generating a XML output file from Oracle Reports, I want to calculate number of records in the XML file. Is it possible? Specifically, I want to calculate number of records for a group variable ( organization_id, which I use for bursting).
    Thanks for the help.

    Thanks BIPuser. It is useful for me.
    I can use this xsl function within the template. However, I'm also looking to print this in the concurrent request log file. So, outside of rtf template, id there any PL/SQL based XML functions I can use to count the number of records.
    Thanks.

  • EDIFECS Mapping not found in the X12 Output file in Oracle B2B 11g

    Hi,
    We are using Oracle SOA suite 11g, we have created a outbound process for EDI 855 which is PO Acknowledgement.
    We are using a XML Gateway for the outbound and consuming the message in BPEL. We are mapping the OAG xml to EDIFECS xml to be consumed by Oracle B2B. We had created the EDIFECS xsd and ecs file using Oracle B2B editor and got it validated.
    Now the issue is we have mapped few elements in BPEL and the same data is found in the payload message in Oracle B2B, but we are unable to see the data in the X12 output file.
    Any thoughts will be hightly appreciated.
    Thanks
    Sathish

    Hi,
    Thanks for your update.
    The following were the elements missing in the native X12 flat file. I verified these elements present in ecs using oracle b2b document editor.
    <ns0:Segment-PO1>
    <ns0:Element-355>EA</ns0:Element-355>
    <ns0:Element-235>UI</ns0:Element-235>
    <ns0:Element-234>UPCXREF</ns0:Element-234>
    </ns0:Segment-PO1>
    <ns0:Segment-ACK>
    <ns0:Element-355 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="">EA</ns0:Element-355>
    <ns0:Element-373>20100318</ns0:Element-373>
    </ns0:Segment-ACK>
    Thanks
    Sathish

  • Want attach the XML data file with layout template in Oracle 10g

    Hi All,
    I need a help from you genius guys.
    I am genrating reports in BI with xml the procedure which I am following is as below.
    1. generating XML from the RDF
    2. creating a template in .rtf format
    3.after that loading the xml to the template then getting the required report.
    This all is doing through the given buttons
    But now my requirement is to create the gui from user can select the report and get the desire output file so how we would be able to attach the XML data file with layout template in Oracle 10g.
    If you require more detail please let me knnow.
    Thanks,
    Harry

    I am not using Oracle apps.
    I am using oracle 10g reports and I get something in it like one patch I downloded and one java code is having which creates the batch file ...still I am working on it ..
    If you will get some please share so that it will be helpful.
    Thanks,
    Harry

  • Regarding  the rowset and row tags in the XML output

    Hi,
    We generated an XML file using dataset of type SQL query.The output is including additional tags
    <ROWSET> and <ROW> tags.How to disable them from appearing in the XML output.

    Hi,
    Iam not using the Datamodel of data template type.If we use the data template we can disable the rowtags by setting the property mentioned by you.But we get the data template name and the query name included in the output.My requirement is to disable the extratags.
    Can u please provide inputs on how to disable the datatemplate name and the query name tags in the output when we use datatemplate.Thank you.

  • The XML data file

    This seems to be one of the few posts that never gets attention ...Hmmm I wonder why ?<br /><br />Help Appreciated !! <br />Using Lifecycle 8, with out Reader Extensions, the email submit button generates an XML output file such as the following; <br /><br /><?xml version="1.0" encoding="UTF-8"?> <br /><br /><FormName> <br />   <Position>thwrth</Position> <br />   <Division>arthar</Division> <br />   <DepartmentUnit>rthqrth</DepartmentUnit> <br /></FormName> <br /><br />How can I get the following reference included as line 2 of the output xml file ? <br /><br /><?xml-stylesheet type="text/xsl" href="SR.xsl"?>

    I have a vital form that clients fill out, which is passed to many people in the company along the workflow. The form is a Planner and we have in the following PDF, Word Doc..
    Well before, the Planner.pdf was originally created in Word, since most people have access to Word.. but evolved to a PDF form created from the Word Doc via Adobe LiveCycle Designer 8.0 w/ User Rights enabled so that the form could be filled out and saved using Adobe Reader.. which was a step better than Word.. being that it is free. But this needed to be easier and more to the point b/c some clients don't particularly like installing the latest version of Reader, even if you provide them the link. Nor do they like saving the form, filling the form, and attaching the form to send back.
    My goal is to have the client fill an HTML version of the form, submit and be done with it, but everyone in the workflow be able to easily receive the filled Planner as a PDF form.
    So some months ago I ran into this post Chris Trip, "Populate Livecycle PDF from mySQL database using PHP" #8, 22 Sep 2007 4:37 pm
    which uses the command line Win32 pdftk.exe to merge an FDF file into an existing PDF on the remote server, and serve this to whoever.
    My problem was with shared hosting and having the ability to use the Win32 pdftk.exe along with PHP which is predominantly used on Linux boxes. And we used a Linux box.
    so i created the following unorthodox method, which a client fills the HTML version of the Planner, all field values are INSERTED into a table in MySQL DB, I and all filled planners that have been filled by clients to date can be viewed from a repository page where an XML file is served up of the corresponding client, but someone would have to have Acrobat Professional, to import the form data from the XML file into a blank form.. altoughh this is simple for me.. I have the PHP file already created so that when a Planner is filled and client submits. >> the an email is sent to me with a table row from the repository of the client name, #, email, and a link to d-load the XML file,
    But I also have the PHP files created so that the Planner can be sent to by email to various people in the workflow with certain fileds ommitted they they do not need to see, but instead of the XML file beiong served up i need the filled PDF Planner to be served.
    I can do this locally with ease on a testing server, but I am currently trying to use another host that uses cross-platform compatibility so i can use PHP and the pdftk.exe to achieve this, as that is why I am having to serve up an XML file b/c we use a Linux server for our website, and cant execute the exe.
    Now that I am testing the other server (cross-platform host), just to use them to do the PDF handling (and it's only $5 per month) I am having problems with getting READ, WRITE, EXECUTE permissions..
    Si guess a good question to ask is can PHP do the same procedure as the pdftk.exe, and i can eleminate it.
    or how in the heck can i get this data from the DB into a blank PDF form, like i have described??
    here are some link to reference
    Populating a LiveCycle PDF with PHP and MySQL
    http://www.andrewheiss.com/Tutorials?page=LiveCycle_PDFs_and_MySQL
    HTML form that passed data into a PDF
    http://www.mactech.com/articles/mactech/Vol.20/20.11/FillOnlinePDFFormsUsingHTML/index.htm l
    and an example
    http://accesspdf.com/html_pdf_form/

  • EHP1 Installation - error during the XML stack file check.

    Hello SAP fans and gurus.
    I'm updating CRM with EHP1 and I'm stuck at the phase PREP_EXTENSION/SUBMOD_EXTENSION_NEW/SELSTACKXML. Something wrong with the XML stack file. I get this error:
    Severe error(s) occured in phase PREP_EXTENSION/SUBMOD_EXTENSION_NEW/SELSTACKXML!
    Last error code set: Error reading stack info, return Code = -1, Reason = 'The stack configuration is not valid for the system CRM, inst.-no. 0020652601'
    The trouble ticket isn't saying much, but I'll post it anyway:
    This trouble ticket was created by SAPehpi on 20110520102342
    SAPehpi broke during phase SUBMOD_EXTENSION_NEW/SELSTACKXML in module PREP_EXTENSION / Extension module for start release >= 40B
    Error Message: Error reading stack info, return Code = -1, Reason = 'The stack configuration is not valid for the system CRM, inst.-no. 0020652601'
    Summary of SAPehpi:
    SAPehpi Release:     lmt_001
    SAPehpi Version:     40.005
    Start Release:          701
    Target Release:          701
    Summary of host system details:
    SID:               CRM
    Host:               sapvmcrm
    MS Host:          sapvmcrm
    GW Host:          sapvmcrm
    Start Path:          /usr/sap/CRM/DVEBMGS00/exe     
    Kernel Path:          /usr/sap/CRM/DVEBMGS00/exe
    Summary of operating system details:
    OS Type:          Linux X86_64
    OS Version:          2.4
    Summary of database details:
    Database Type:          ada
    Database Version:     7.7.07.014
    Summary of RFC details:
    Host:               sapvmcrm
    GW Host:          sapvmcrm
    Client:               000
    Destination:          CRM
    Language:          
    System No.:          00
    There's one problem with the file SAPEXEDB_82-10007250.SAR, which was in the download basket, but is not available for download. I deleted the record in the XML stack file and tried the phase again... with no success. Going through the XML file and checking if the packages have been downloaded is a real pain in the ***.
    Anyway, can I somewhere download this file SAPEXEDB_82-10007250.SAR?
    Or can anyone help me, how solve this issue different way?
    Thanks a lot in advance.
    -Stefan

    OK, I got it. Wrong installation number. We had to change the installation number in the stack file according the system in the Solution Manager via transaction SMSY. Then it worked like a charm.

  • XML Output  File using PLSQL

    I like to generate an XML output file using the PLSQL. Can any one help with an example (using EMPand DEPT). I tried the forum but seems confusing to me...
    This is URGENT so please rush!

    Please refer to the following post:
    page 0 security: authorization scheme not applied to other pages

  • Help require to get the XML output to design template- JDE

    Hi Friends,
    I am asking this question from JDE perspective.I want to design XMLP Template for R40572 Check Printing.
    When I upload an blank template and after attaching RD, When ever I initiate a check from P04572 Application.RThe Write Row exit will lead to check printing which in turn will call a batch R04571 and this batch will call R04572(Which I require the XML output) since it is the second report and we cant direct it to local server I am not able to get the XML output..
    Another think is since its running in server i think its not taking the RD modification we done in loacl because it always fires PDF .

    Hi,
    I assume you're Using XMPOSA for generating the files locally. What I suggest is, you set the application to run with the report definition by default. That way, even when it is called, it will be called along with the report definition. You can take the resultant XML file from P95630
    hope this helps,
    -Domnic

Maybe you are looking for

  • Downgrade to from IOS6 to IOS 5.1

    I need to downgrade my Ipod touch from IOS6 to IOS5.1.1 how can I do it. Just bought my Ipod 2 days ago. If not possible then I will return it

  • Price Condition Update Function Module

    I'm trying to identify the function module that updates the price conditions in a sales document. I know one exists as I used it years ago but can't seem to locate it. It replicates the manual process of clicking the update button on the screen. this

  • Adobe CS4 Creative Suite Web Edition and Flash CS5 Crashing Problems

    Hi, just a simple question; I have a Windows XP Pro x64 & x86 Machine which both have Adobe Creative Suite CS4 and Adobe Flash CS5 installed onto. The problem i have is that when i install Flash CS5 onto the machine which already has Adobe Creative S

  • How to assign batch to BOM line item when creating PO

    Hi Experts,               Programmatically i am creating PO using BAPI_PO_CREATE, for the line item  material of PO their is BOM, i am able to get the BOM for each material, but  struggling to find where can i assign Batch to the BOM line item materi

  • Changing RSS feed from Podcast Garden

    We mistakenly has Podcast Garden support our RSS feed to itunes. The service is the bare minimum but trying to contact the site owners is impossible. It makes me wonder why they would offer this free RSS service? Anyway, I am signing up for libsyn an