on 06-17-2008 1:39 PM
Hi
I need to create a Data Type Category Mixed , which means that element LO_CODE> has a value and also a subelement LO_NUMBER. The only type data i can create is complex(includes a subelement LO_NUMBER but without LO_CODE having value 15701906) and simple is just an element with out includes
<LO_CODE>
15701906
<LO_NUMBER>
<REPAIR_GROUP>15</REPAIR_GROUP>
<TASK>19</TASK>
<INDEX>06</INDEX>
</LO_NUMBER>
</LO_CODE>
Thanks Swarup,
You gave me a tip that i should create the xml in UDF ,which make sense as i cannot do it builting the Data Type . How can i In UDF create the XMl structure for as below
<LO_NUMBER>
<REPAIR_GROUP>15</REPAIR_GROUP>
<TASK>19</TASK>
<INDEX>06</INDEX>
</LO_NUMBER>
Do you have any example ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
<LO_CODE>15701906 </LO_CODE> ==>
<LO_NUMBER>
<REPAIR_GROUP>15</REPAIR_GROUP>
<TASK>19</TASK>
<INDEX>06</INDEX>
</LO_NUMBER>
You can use XSLT mapping to get the desired output
Here is your xsl file please check it
<xsl:transform version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<LO_NUMBER>
<REPAIR_GROUP><xsl:value-of select="substring(LO_CODE,1,2)"/></REPAIR_GROUP>
<TASK><xsl:value-of select="substring(LO_CODE,5,2)"/></TASK>
<INDEX><xsl:value-of select="substring(LO_CODE,7,2)"/></INDEX>
</LO_NUMBER>
</xsl:template>
</xsl:transform>
Hi,
I believe you are trying to create the XML data field as dynamicaly based on the value. These are treated as XMl tags so I am not sure if you can do this.
You can use the fix name as an element or atrribute along with including the another data type
LO_NUMBER is create as seperate Data type and then include it in the Data type LO_CODE,.
Thanks
swarup
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
maybe you could use a attribute for your code?
http://help.sap.com/saphelp_nw04/helpdata/en/3b/d2a3f7a166514abb8cf5635b71974f/frameset.htm
Regards
Patrick
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HI,
Please don't mind but I am still doubtful about having the Value this way in XML scema without any tags to identify it.
In XML scema, all the fields or values will be represented under XML scemas.
So if you wish to create the schema in exactly the same way.then either pass all the values as single line
as below logic
In UDF, create the XMl structure for as below
<LO_NUMBER>
<REPAIR_GROUP>15</REPAIR_GROUP>
<TASK>19</TASK>
<INDEX>06</INDEX>
</LO_NUMBER>
Then pass the 15701906 + Udf formated above string -
><LO_CODE>
And consider <LO_CODE> as simple data type with string.
So finally in target side the structure will be as below
<LO_CODE>
15701906
<LO_NUMBER>
<REPAIR_GROUP>15</REPAIR_GROUP>
<TASK>19</TASK>
<INDEX>06</INDEX>
</LO_NUMBER>
</LO_CODE>
This could resolve your purpose.
Thanks
swarup
User | Count |
---|---|
88 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.