on 04-25-2008 5:51 AM
Hi All,
I am using XSLT mapping for file2file scenario(xml to flatfile).I have "Record ID" field in target side.I want to get the Record ID for each record as 1,2,3,.....There is no source field for "Record ID".
Please help me .
Hi Radhika,
Here is a soln for XSLT. but you need to alter a little to use it.
<xsl:value-of select="count(preceding-sibling::*[@col]) + 1"/>
http://www.stylusstudio.com/xsllist/200110/post50330.html
Check the above link you would get how you can create your XSLT.
Let me know how it was helpfull.
Regards,
Saravanan.R
Edited by: Saravanan R on Apr 25, 2008 11:48 AM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Radhika,
This can be easily handeled in graphical mapping. Why dont you try that option.
In Graphical Mapping,
Java Section,
1. Declare a global variable.(ex: int i;)
2. Initialilize it.(i=0;)
Write a udf without any input and it should be like this.
i++;
return i+"";
Map the output to your recordtype.
Regards,
Saravanan.R
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Radhika,
What is the logic behind RecordID's value?
Is it a random generated number?
For that you can use XSLT with Java Enhancements and make use of Java standard functions to generate randomn number.
Please go through this link:
/people/pooja.pandey/blog/2005/06/27/xslt-mapping-with-java-enhancement-for-beginners
http://help.sap.com/saphelp_nw04/helpdata/en/55/7ef3003fc411d6b1f700508b5d5211/frameset.htm
Thanks,
Varun
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
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.