Adding extra namespace in the target structure

Input file (currently generating from existing message mapping)
<?xml version="1.0" encoding="UTF-8"?>\
<pData xmlns:xsi="namespace1">
<Name>name</Name>
<ListChange>
<status>Active</status>
</ListChange>
</pData>
Required File
<?xml version="1.0" encoding="UTF-8"?>\
<pData xmlns:xsi="namespace1" xmlns="namespace2">
<Name>name</Name>
<ListChange>
<status>Active</status>
</ListChange>
</pData>
To add the extra namespace (xmlns="namespace2") used following ways.
1.     Using XML Anonymiser bean module
Still the no change in the output (only accepting one namespace at a time 1/2)
2.     Using XSLT Mapping as 1st row in interface mapping
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" encoding="UTF-8"/>
     <xsl:template match="/pData">
               <pData xmlns:xsi="namespace1" xmlns="namespace2">
               <xsl:copy-of select="/pData/Name"/>
               <xsl:copy-of select="/pData/ListChange/status"/>
          </pData>
     </xsl:template>
</xsl:stylesheet>
We are getting the following error
com.sap.aii.utilxi.misc.api.BaseRuntimeException; Fatal Error: com.sap.engine.lib.xml.parser.ParserException: XMLParser: No data allowed here: (hex) 54, 65, 73(:main:, row:8851, col:24)
Any inputs are welcome.

>
Jayashri Rade wrote:
> Input file (currently generating from existing message mapping)
>
> ********************************************************
> <?xml version="1.0" encoding="UTF-8"?>\
>
> <pData xmlns:xsi="namespace1">
>
> <Name>name</Name>
> <ListChange>
> <status>Active</status>
> </ListChange>
>
> </pData>
> ********************************************************
> Required File
> ********************************************************
>
> <?xml version="1.0" encoding="UTF-8"?>\
>
> <pData xmlns:xsi="namespace1" xmlns="namespace2">
>
> <Name>name</Name>
> <ListChange>
> <status>Active</status>
> </ListChange>
>
> </pData>
> ********************************************************
>
> To add the extra namespace (xmlns="namespace2") used following ways.
> 1.     Using XML Anonymiser bean module
> Still the no change in the output (only accepting one namespace at a time 1/2)
the bean is to remove namespaces.. not to add
> 2.     Using XSLT Mapping as 1st row in interface mapping
> ********************************************************
>
> <?xml version="1.0" encoding="UTF-8"?>
> <xsl:stylesheet version="1.0"
> xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
> <xsl:output method="xml" encoding="UTF-8"/>
>
>      <xsl:template match="/pData">
>
>                <pData xmlns:xsi="namespace1" xmlns="namespace2">
>                <xsl:copy-of select="/pData/Name"/>
>                <xsl:copy-of select="/pData/ListChange/status"/>
>
>           </pData>
>
>      </xsl:template>
> </xsl:stylesheet>
> ********************************************************
> We are getting the following error
> com.sap.aii.utilxi.misc.api.BaseRuntimeException; Fatal Error: com.sap.engine.lib.xml.parser.ParserException: XMLParser: No data allowed here: (hex) 54, 65, 73(:main:, row:8851, col:24)
>
> Any inputs are welcome.
the code looks fine. but i prefer a simple java mapping with a string operation to replace the tag <pData xmlns:xsi="namespace1"> to <pData xmlns:xsi="namespace1" xmlns="namespace2">. it will be simple string handling plus you will not lose any performance by using a XSLT parser invoked.

Similar Messages

  • Split the Target Structure.

    Hi,
    I have Header and Detail in my Target Structure, in the output I have to create 2 separate files, one for Header and one for Detail.I dont want to go for BPM, is there any solution for this with out using BPM?
    Thanks & Regards,
    Pragathi.

    Hi Pragathi
    Assuming you mean you have Header and Detail in the source structure and would like to create 2 messages on the target side, you have 2 options (Since you mentioned you dont want to use BPM)
    1. Create 2 sets of messages interface and related objects for the target structure and split the flow into 2, which will map the header to one message and the item to the other.
    2. Use multimap and map the header to message1 and item to message2. This will be a better option as the interface will use one map for creating the target message and you can pass the message onto 2 comm channels that will create the file.
    Hope this help.
    Regards
    Prav

  • Remove empty nodes in the target structure

    Hi,
    My scenario is IDoc-XI-JDBC.
    For one IDoc I need to update data in 4 tables. But if idoc contains ATWRT node then it should update 4 tables if not only first two tables.
    For the statement 3 and 4, i have done the following mapping.
    [ATWRT][collapseContexts]-[exists]--[if then][statement3]
    but in the target sturcture I am getting blank node as following:
    <statement3/>.
    And because of this blank statement JDBC Adapter is throwing an error.
    Can anyone help me how to remove this blank node from target structure.

    Jwalith,
    I hope you must have kept the Statement node occurrence as 0..xxxx(1 or n), if that's the case you don't need to check anything. Just map the ATWRT directly to Statement 3 and Statement 4.
    By the way what's the occurence of ATWRT node ? I gave the above suggestion, keeping in mind that ATWRT node occurrence is 0..1.
    If the occurrence of  ATWRT is not 0..Unbounded, then you can also use the below simple UDF.
    ATWRT >UDF>Statement3
    ATWRT >UDF>Statement4
    UDF - Advanced(Queue), with one Parameter (
    if( ATWRT.length >0)
    result.addValue("");
    else
    result.addSuppress();
    Thanks,
    raj.

  • How to create multiple segments on the target structure of an IDOC

    Hi All
       I am working on the Shipment Confirmation Interface( Message Type SHPCON ) which is FILE to IDOC Scenario. I have a segment called E1EDL18 which occurs only once on the target side of the idoc. Now I have to created multiple E1EDl18 segments for the Qualifiers ORI, PGI and PCK. I treid to send a constant ORI,PGI,PCK and then used an user defined function which splits the constant at COMMA and then I am assigning to the target field QUALF. In the display queue for QUALF I see three values with context but still only one E1EDL!* segment is created. Please let me know how to create multiple E1EDl18 segments for three qualifiers.
    Thanks
    Naga

    In message Mapping, just right click on the segment and click on duplicate subtree. now it will create you another segment with same name and fields in it..
    you can hard code the Qual, or you can map the required source field into it.

  • Adding extra fields to the SOA composite from OIM

    Hi All
    I want to to add extra fields to the input XML file to custom SOA approval composite.
    Where I suppose to control the parameter going from the OIM request to the SOA composite ?
    Thanks
    Edited by: 599647 on Jan 27, 2012 9:28 AM

    http://bbagaria.blogspot.com/2011/08/how-to-extend-payload-from-oim-to-soa.html
    -Bikash

  • LSMW - Problem while assigning the quantity field to the target structure

    Hi,
    Here I am getting the warning while I am maintaing the field mapping and conversion rules .  Here I am doing this through the Batch input Recording.
    That is , while I am assigning the source field to the target structre field .
    " <b>WARNING : Source field is longer than target field</b> "
    plz help me to remove that warning.
    Thank you

    in lsmw  use char field instead quantity of same length(in stucture defined in lsmw).

  • Captivate adding extra slide at the end?

    Hi
    I have a programme with 15 standard slides and 11 quiz slides (Plus the results slide which equals 27)
    However, once I am on the results page at the end there is an extra page (28 pages). If I click play it just fades onto a white blank screen.
    Is there an option to turn this off? What is happening?
    Cheers

    Ok I can replicate this error in Captivate 5.5 on my machine as well.
    It seems like it is related to "Reporting" because if I disable reporting then I have 4 slides as my Filmstrip contains. Enabling reporting gives me 5 slides although there are only 4 slides in the project.
    I'm not sure if this is because Captivate needs an additional slide in order to conduct the reporting to the LMS properly or if it is a bug. I'm leaning towards it being a bug, because I see no reason why an additional slide is needed to report stuff.
    I recommend that you report this as a bug to the Adobe Captivate team by using this form: https://www.adobe.com/cfusion/mmform/index.cfm?name=wishform&product=5
    /Michael
    www.cpguru.com - Adobe Captivate Widgets, Tutorials, Tips and Tricks and much more..

  • Adding  extra  fields to the Product search display

    Hi all,
        I have a  requirement where the std Product search needs to be modified wherein i need to add a price field for some materials whcih i will maintain in a  Z table(custom table for the materials and its price).
        Now my problem is that the o/p structure is taking the fields from the view BBPV_F4PR_GEN (where i dont have nay price field!)...When i pass my structure to the Dispaly FM "F4UT_RESULTS_MAP" it doesnt consider my custom structure for display....
      is it possible to change the o/p structure for the Product search display???Has anybody tried thsi before???
      Any help is  appreciated.
    Thanks & regards,
    Disha.

    AFAIK, the only way to do this is to write a system modifcation.
    The BADI is executed only once at startup of the session, so that makes it merely static. (A strange point in time, I discussed it with SAP and they just shook their heads)
    I had the same problem with some other F4-Helps and it was a big hazzle. From my experience, no straight answer.

  • GridBagLayout  adding extra buttons on the second row

    Here is a classic example of GridBagLayout taken from javadoc. I wonder is there a way I can have "Button6b", "Button6c" and "Button7" added to the same row as "Button6" and "Button6a"?
    import java.awt.Button;
    import java.awt.Font;
    import java.awt.GridBagConstraints;
    import java.awt.GridBagLayout;
    import javax.swing.JFrame;
    import javax.swing.JPanel;
    import javax.swing.WindowConstants;
    public class ButtonsExample extends JPanel {
        protected void makebutton(String name, GridBagLayout gridbag, GridBagConstraints c) {
            Button button = new Button(name);
            gridbag.setConstraints(button, c);
            add(button);
        public void init() {
            GridBagLayout gridbag = new GridBagLayout();
            GridBagConstraints c = new GridBagConstraints();
            setFont(new Font("SansSerif", Font.PLAIN, 14));
            setLayout(gridbag);
            c.fill = GridBagConstraints.BOTH;
            c.weightx = 1.0;
            makebutton("Button1", gridbag, c);
            makebutton("Button2", gridbag, c);
            makebutton("Button3", gridbag, c);
            c.gridwidth = GridBagConstraints.REMAINDER; // end row
            makebutton("Button4", gridbag, c);
            c.weightx = 1.0;
            c.gridwidth = GridBagConstraints.RELATIVE; // next-to-last in row
            makebutton("Button6", gridbag, c);
            makebutton("Button6a", gridbag, c);
            makebutton("Button6b", gridbag, c); // I'd like this
            makebutton("Button6c", gridbag, c); // and this
            c.gridwidth = GridBagConstraints.REMAINDER; // end row
            makebutton("Button7", gridbag, c); // and this button to appear on one row
        public static void main(String args[]) {
            JFrame f = new JFrame("GridBag Layout Example");
            f.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
            ButtonsExample ex1 = new ButtonsExample();
            ex1.init();
            f.add("Center", ex1);
            f.pack();
            f.setSize(f.getPreferredSize());
            f.setVisible(true);
    }

    Welcome to our community, Kristi
    As for why we aren't able to add buttons to Question Slides,
    only the Captivate developers know the answer. Perhaps there is a
    technical issue involved.
    About the only thing I can think of would be to insert an
    image of the buttons in a disabled state. At least that may provide
    some consistency for you.
    Cheers... Rick

  • Namespace Change at the target

    Hi All,
    I am doing a Proxy to SOAP scenario. I need to change the namespace of the target WSDL . The mapping works fine but there is a requirement where in I need to change the target namespace. Can some one please help me on this. I want it after message mapping that I can have a change done to the target namespace before sending it to the target.
    Any XSLT code which would help in solving this.
    Thanks

    Do we need to tell the web service team to change the WSDL in such a way that the namespace within the WSDL remains same so that there is no issue when we transport the mappings from Dev to QA.
    Better if this is done
    I want it after message mapping that I can have a change done to the target namespace before sending it to the target.
    you can try to use XMLAnonymizer module to change the namespace
    Edited by: abhishek salvi on Jan 17, 2011 5:54 PM

  • How to remove namespace prefix from target payload when using HTTP in PI7.0

    Hi,
    i have a requirement to remove namespace prefix from target payload when receiver receives the payload by an HTTP request.
    i am not able to use XML Anonymizer Bean as in HTTP channel its not possiile.
    Target structure after mapping now is:
    <?xml version="1.0" encoding="UTF-8"?>
    <ns3:Order xmlns:ns3="urn:xxx-com:pi:project">
    fields
    </ns3:Order>
    i need the target structure after mapping should look like:
    <?xml version="1.0" encoding="UTF-8"?>
    <Order xmlns:="urn:xxx-com:pi:project">
    fields
    <Order>
    i removed namespace from source and target Message Type of message mapping but still getting "ns3" prefix. My requirement is to just have this ns3 removed.
    Please reply if anyone has solved this problem before.
    Thanks

    Hi ,
    >>>i removed namespace from source and target Message Type of message mapping but still getting "ns3" prefix. My requirement is to just have this ns3 removed.
    Which process you've used for removing namespace...java/xslt mapping. In case of java mapping plese remove ns3 while creating the target element. Please go through the below blog it may help you.
    Quick Tips: Dealing with Namespaces in XI/PI
    Regards,
    Priyanka

  • Form Validation using Javascript error when adding extra fields

    Hi,
    I have a form (with a few fields which require validation) which works just fine.  I have added extra fields to the form and require them to validate too.  My problem is that they are not showing via the behaviours/validation box and I can't figure out how to sort it!  They are contained within the form element.  I have tried to delate the original validation and start again but to no avail.
    Please can someone help me?
    Code below.
    Many thanks
    function MM_validateForm() { //v4.0
      var i,p,q,nm,test,num,min,max,errors='',args=MM_validateForm.arguments;
      for (i=0; i<(args.length-2); i+=3) { test=args[i+2]; val=MM_findObj(args[i]);
        if (val) { nm=val.name; if ((val=val.value)!="") {
          if (test.indexOf('isEmail')!=-1) { p=val.indexOf('@');
            if (p<1 || p==(val.length-1)) errors+='- '+nm+' must contain an e-mail address.\n';
          } else if (test!='R') { num = parseFloat(val);
            if (isNaN(val)) errors+='- '+nm+' must contain a number.\n';
            if (test.indexOf('inRange') != -1) { p=test.indexOf(':');
              min=test.substring(8,p); max=test.substring(p+1);
              if (num<min || max<num) errors+='- '+nm+' must contain a number between '+min+' and '+max+'.\n';
        } } } else if (test.charAt(0) == 'R') errors += '- '+nm+' is required.\n'; }
      } if (errors) alert('The following error(s) occurred:\n'+errors);
      document.MM_returnValue = (errors == '');
    //-->
    <form action="contact_us.asp" method="post" name="contact" target="_parent" class="contentText" id="contact">
          <table width="100%" border="0" cellspacing="5" cellpadding="0">
            <tr>
              <td width="54%" class="subHeader">Full Name* </td>
              <td width="46%" class="subHeader"><input name="FullName" type="text" id="FullName" /></td>
            </tr>
            <tr>
              <td class="subHeader">Company Name </td>
              <td class="subHeader"><input name="CompanyName" type="text" id="CompanyName" /></td>
            </tr>
            <tr>
              <td class="subHeader">Address</td>
              <td class="subHeader"><input name="Address1" type="text" id="Address1" /></td>
            </tr>
            <tr>
              <td class="subHeader"> </td>
              <td class="subHeader"><input name="Address2" type="text" id="Address2" /></td>
            </tr>
            <tr>
              <td class="subHeader"> </td>
              <td class="subHeader"><input name="Address3" type="text" id="Address3" /></td>
            </tr>
            <tr>
              <td class="subHeader">Postcode</td>
              <td class="subHeader"><input name="Postcode" type="text" id="Postcode" /></td>
            </tr>
            <tr>
              <td class="subHeader">Telephone Number* </td>
              <td class="subHeader"><input name="Telephone" type="text" id="Telephone" /></td>
            </tr>
            <tr>
              <td class="subHeader">Mobile Number </td>
              <td class="subHeader"><input name="Mobile" type="text" id="Mobile" /></td>
            </tr>
            <tr>
              <td height="25" class="subHeader">Email Address* </td>
              <td class="subHeader"><input name="Email" type="text" id="Email" /></td>
            </tr>
            <tr>
              <td height="30" class="subHeader">Status*</td>
              <td class="subHeader"><select name="StatusClass" id="StatusClass">
                <option selected="selected">Please Choose</option>
                <option>Architect</option>
                <option>Interior Designer</option>
                <option>Private Client</option>
                <option>Student</option>
                <option>Trade Enquiry</option>
              </select>          </td>
            </tr>
            <tr>
              <td height="23" class="subHeader">Project*</td>
              <td class="subHeader"><select name="Project" size="1" id="Project">
                <option selected="selected">Please Choose</option>
                <option>Planning Stages</option>
                <option>New Build</option>
                <option>Refurbishment</option>
                <option>Barn Conversion</option>
                <option>No project - information only</option>
              </select>          </td>
            </tr>
            <tr>
              <td height="37" class="subHeader">How did you hear about us?*</td>
              <td class="subHeader"><select name="CameFrom" size="1" id="CameFrom">
                <option selected="selected">Please Choose</option>
                <option>Web Search</option>
                <option>Grand Designs</option>
                <option>Living Etc</option>
                <option>Home Building &amp; Renovation</option>
                <option>Architect</option>
                <option>Friend/Family</option>
                <option>Magazine/Editorial</option>
                <option>Newspaper Article</option>
                <option>Trade Show/Exhibition</option>
                <option>Other</option>
              </select></td>
            </tr>
            <tr>
              <td height="24" class="subHeader">Brochure Request </td>
              <td class="subHeader"><input name="Brochure" type="checkbox" id="Brochure" value="checkbox" /></td>
            </tr>
            <tr>
              <td class="subHeader">Message</td>
              <td class="subHeader"><span class="style4">
                <textarea name="Message" id="Message"></textarea>
              </span></td>
            </tr>
            <tr>
              <td class="subHeader"> </td>
              <td class="subHeader"><input name="Submit" type="submit" value="Submit" /></td>
            </tr>
            <tr>
              <td colspan="2" class="subHeader"><em>* Required fields</em></td>
            </tr>
          </table>
          </form>

    whoops..... forgot to post this line of code which was a bit further down the page...
    "MM_validateForm('name','','R','number','','RisNum');return document.MM_returnValue">

  • LSMW-Error Msg:No target structure could be found

    hello friends,
    I was trying to upload data for 0000.0001,0002 using LSMW, 
    first 3 steps are recorded, but when i reach the the 4th step , m getting an error msg :<u><i><b>No target structure could be found.</b></i></u>could u plz suggest y this error is coming and where to maintain the target structure.
    many thanks
    desia

    Hi
    U made the structure in the step2 and step3 thats fine
    Now   you are  at step3 u r uploading or adding by ur own all the fields to structure
    I mean to say did you able to see it?
    Create a structure you can find all the structure fields at the time of creation of recording
    Means
    You can view that go to the first Step --- Execute it and display/change it -
    Overview -
      you can see the recorded struc -
    double click on that to view whole struc.
    Now you have to make the structure in the notepad according to the fields you have recorded only what you have to change not default.

  • Query : Addition of extra fields in the User Registration page of portal.

    Hi All,
    I have a query, about adding extra fields in the new user registration page of portal.
    If you can suggest the required source files in details,inorder to incorporate two more fields.
    Say, AGE and COMPANY,with the existing fields in the same page.
    Along with this,can you please send the details of retrieving those information from backend and the backend functionalities associated with the SUBMIT button on the registration page.
    Regards,
    Sudeep

    Hi,
    Your query is divided into two parts.
    The first part is adding new fields into existing form. This feature comes under Branding of portal. Plz use the link below understanding the same and related help :
    http://help.sap.com/saphelp_erp2005vp/helpdata/en/79/affe402a5ff223e10000000a155106/frameset.htm
    The second part is retrieving the values from backend.Here it will be the UME database. You need to develop a logon.par file and replace the same in your portal.
    Happy Customizing.
    Sukanta Rudra

  • Error in File content conversion in the target

    hi
    I'm doing a content conversion at target.
    my target structure while sending is like:
    <MT>
       <Header>
            <a>
      </Header>
       <BODY>
         <b>
      </BODY>
        <filename_output>
        <filename>
    </MT>
    however in the target i have to ignore the last 2 fields: <filename_output> and <filename>.
    I'm able to do it.
    The problem is coming that in the target structure,when we open in Textpad, 2 trailing empty lines are there at the end.
    we need to remove these lines.
    Any idea how to do it?

    Hi Alok,
    Try with parameters given in this blog:
    /people/sravya.talanki2/blog/2005/08/11/solution-to-the-problem-encountered-using-variable-substitution-with-xi-sp12
    If didnot work try: FileName.endSeperator = '0'  as given in this thread: Re: Blank Lines While writing files
    else give .endSeparator as two backspaces (if you have two new lines). The ascii code is '0xBS'. see this code:
    http://www.december.com/html/spec/ascii.html
    ---Satish

Maybe you are looking for

  • Not able to see Enhanced Data type in SPROXY in SRM

    Hello Experts, We are planning to use an outbound (SRM to PI) Proxy between SRM and PI to send XML messages. Our SRM team has requested a Datatype enhancement of SAP's predelivered SCV, SAP SRM SERVER 7.0 component i.e. RFQRequest. So, In ESR we have

  • Insert Table Problem

    I am actually really new to Dreamweaver MX, so I am not sure what I am doing wrong. At first , I did open that " Insert Table" icon, and filled out following values( Rows, Columns..),then Navigated to hard drive folder and selected a logo picture, bu

  • How to Create a Instance of Business Object Inside a class?

    Hi All,        I am facing a problem regarding ,  creating a instance of BO inside a global class ( SE24 ). Initially I have included <CNTN02> in the class and i even tried to use the MACRO SWC_CREATE_OBJECT but , the main issue is that my method exp

  • Raw file created by Nikon D7000 with multi-exposure

    After recent updates to ACR6.3 etc.,  I find all my photos taken by D7000 with multi-exposure turn into PINK colored when opened by ACR.  I have no problem in opening other raw files taken by D7000 without multi-exposure nor those taken by D700 (not

  • Dummy profit center

    Dear All, S_ALR_87013326 I have one dummy frofit center like 'zzzz' which set by consultants before implement our project. Our actual profit center is '103050'. But in every month when orders are settled some records are going to dummy center. I am s