on 10-23-2008 4:21 PM
Hello,
I have a standard output XML structure which is used by many interfaces which contains the following structure:
<NODEA>
<NODEB> Data </NODEB>
</NODEA>
For one single scenario, i need to add an attribute to NODEA to generate the following:
<NODEA someattribute="value">
<NODEB> Data </NODEB>
</NODEA>
However, this attribute is not part of the XSD.. is there a way to insert this via a UDF (or even graphical mapping)? I know it is possible with XSLT, I'm wondering if there is another way.
Cheers
you can achieve this by using simple ABAP class which is known as ABAP mapping.
logic is , in SE24, in XI, see the signature of the class
you will get the whole input as single string, just search for <NODEA>
and replace it by another string which has value <NODEA someattribute="value">
Let m eknow if you need more clarification
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi John
What i understand From your requirement is - Only one of the scenario you want to add attribute. But you are trying to generate the target using Graphical mapping.
Well even with XSLT you can generate target structure only. If the target structure is not having this attribute how that mapping will execute correctly.
I think you should use a seperate XSD for this requirement where you have the attribute in XSD
Thanks
Gaurav
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
9 | |
7 | |
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.