on 03-09-2007 4:41 AM
hi i m mapping
header to buyerno
for the first occurence of header one the buyerno should be 1
and for the second occurance two and son so i developed a udf
//write your code here
for(int i=0;i < a.length; i++)
{
result.addValue( a<i> );
}
but i m unable to get the solutio
and wen i m writing i instead of a<i> it is showing error
help me out
Can you give an example of source and expected target msg struct?
Regards,
Jai Shankar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
salesorder mssg details salesordersummary
customer buyer
name buyerno
order name
id orderaccount
amount ordersum
summary
totalorders
totalamount
i found this examplein xi materail and everyt thing i got right except for the buyer no
im apped buyerno to customer and added the udf i mentioned above in b/w to get
dynamically the buyer no
in the result as of now i m getting nothing in buyer no space
hi
chandra i m getting the following error wen i m using ur suggestion
D:/usr/sap/TXI/DVEBMGS00/j2ee/cluster/server0/./temp/classpath_resolver/Mapc8c2b311cdfb11dbbb520019b909a584/source/com/sap/xi/tf/_map1_.java:86: addValue(java.lang.String) in com.sap.aii.mappingtool.tf3.rt.ResultList cannot be applied to (int)
result.addValue(i+1);
the code that i used is
for(int i=0;i < a.length; i++)
{
result.addValue(i+1);
}
Hi,
In your code you are taking the array of string right, so it is not a , write "a(i)".
If your requirement is 1 first time and 2 in the second time then take the result.addValue(i+1)
Before that you would have to change the context of source to its parent
or use removecontext, after UDF use splitbyvalue.
Regards
Chilla..
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
What are you trying?
If you need "buyerno" to be 1, then 2 etc try UDF like this
for(int j=0; j<a.length; j++){
result.addValue(String.valueOf(j+1));
}
Give input has Header.
See to that the occurence of buyerno is unbounded.
Regards,
P.Venkat
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi venkat i want exactly as u told
but i m getting errors wen do the code u suggested
/write your code here
for(int i=0;i < a.length; i++)
{
result.addValue( String.valueOf( i+1) );
}
}
errors as below
Messages:
10:26:55 Start of test
Source code has syntax error:
D:/usr/sap/TXI/DVEBMGS00/j2ee/cluster/server0/./temp/classpath_resolver/Map2f212bb2cdfb11dbbe700019b909a584/source/com/sap/xi/tf/_map1_.java:84: 'class' or 'interface' expected
public static void main(String[] args) throws Exception{/!_$ClNRep_/_map1_ st = new /!_$ClNRep_/_map1_(); st.checkParams=false;st.testExecute(args); }
^
D:/usr/sap/TXI/DVEBMGS00/j2ee/cluster/server0/./temp/classpath_resolver/Map2f212bb2cdfb11dbbe700019b909a584/source/com/sap/xi/tf/_map1_.java:85: 'class' or 'interface' expected
}
^
D:/usr/sap/TXI/DVEBMGS00/j2ee/cluster/server0/./temp/classpath_resolver/Map2f212bb2cdfb11dbbe700019b909a584/source/com/sap/xi/tf/_map1_.java:86: 'class' or 'interface' expected
^
3 errors
10:26:56 End of test
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.