on 03-04-2011 10:09 AM
my scenario is idoc to xml file with out content conversion.
I am getting data like that
eg:
<?xml version="1.0" encoding="UTF-8" ?>
<ns0:MT_TEST xmlns:ns0="https:test">
<header>
<field1>100<field1>
<field2>200</field2>
<header>
</ns0:MT_TEST xmlns:ns0="https:test">
but i want
<?xml version="1.0" encoding="UTF-8" ?>
<header>
<field1>100<field1>
<field2>200</field2>
<header>
Thanks In Adavance
Why dont you create a DT and MT as header structure and use it in inbound interface. In mapping u can get use MT_TEST as source and header as target.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
i am not understandig what you explained.
could you please explian clearly.
my source interface is idoc and target interface is MI_TEST
for message type is the below mentioned structure
<?xml version="1.0" encoding="UTF-8" ?>
<ns0:MT_TEST xmlns:ns0="https:test">
<header>
<field1>100<field1>
<field2>200</field2>
<header>
</ns0:MT_TEST xmlns:ns0="https:test">
i would like to remove the message type tag <ns0:MT_TEST> in target structure.
Thanks
samiullah
Hi SWATHIP,
I meant that u can create target message structure as follows instead of the one u r trying to use:
<?xml version="1.0" encoding="UTF-8" ?>
<header>
<field1>100</field1>
<field2>200</field2>
</header>
In case u need to have multiple occurrences of header, in that case u have to use the structure something like ur existing structure:
<?xml version="1.0" encoding="UTF-8" ?>
<MT_Header>
<header>
<field1>100</field1>
<field2>200</field2>
</header>
<header>
<field1>300</field1>
<field2>400</field2>
</header>
</MT_Header>
If you want to use the structure something like as follows:
<?xml version="1.0" encoding="UTF-8" ?>
<header>
<field1>100</field1>
<field2>200</field2>
</header>
<header>
<field1>300</field1>
<field2>400</field2>
</header>
Then, this strucutre doesn't comply with basic xml rules. So u can't use it.
Regards,
Samiullah.
HI Samiullah,
In my receiver structure have more than one node.
eg:
<MT_TEST>
<header>
<field1>100</field1>
<field2>200</field2>
</header>
<detail>
<detail1>123</detail1>
<detail2>456</detail2>
</detail>
</MT_TEST>
header will be one to one and detail also one to one. could you please explian xslt mapping ,if it is possible with xslt mapping.
Edited by: SWATHIP on Mar 7, 2011 5:47 AM
Edited by: SWATHIP on Mar 7, 2011 5:59 AM
Hello SWATHIP,
If you have more than one node then u should have one root node in ur case it is <MT_TEST> . Why u want to remove it.
*As per xml basic rule, in one xml file there can be only one root node. *
In ur requirement u have to use <MT_TEST> or any other root node and under that u will be having header and detail node.
If any how, u removed this root node then ur xml will be malformed.
Regards,
Sami.
What version you are Using ,
If your using 7.0 or less
Then remove On Message Type : remove value against XML Namespace so result you will get is Data with That Namesapce information
If it equalent to 7.1 . Then you have to use . java Mapping or XSLT mapping to achieve this ...
Hope this help.
regards
PS
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
but i want
<?xml version="1.0" encoding="UTF-8" ?>
<header>
<field1>100<field1>
<field2>200</field2>
<header>
Not possible at all without resorting to:
a.) XSLT Mapping
or
b.) Java Mapping
or
c.) creating a header data type and header message type
Hope this helps,
Mark
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
A couple of ways:
1. As suggested in Shadab's blog:http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/2769. [original link is broken] [original link is broken] [original link is broken] remove the value in XML namespace in MT.
2. Use XMLAnonymizerBean as suggested in the blog: /people/stefan.grube/blog/2007/02/02/remove-namespace-prefix-or-change-xml-encoding-with-the-xmlanonymizerbean
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
check this blog:-
/people/sameer.shadab/blog/2005/12/05/how-to-remove-namespaces-in-mapping--xi
chirag
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
83 | |
24 | |
12 | |
9 | |
7 | |
6 | |
5 | |
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.