on 03-03-2008 10:38 AM
Hello,
I made a RFC function which exports a table to XI. That table has one column and many rows. Every field in table has type char lenght 50. My task is concatenate this fields, becouse outsource aplications expects one long string. I can't do it in ERP becouse that string is to long. So I ask is there any possibility to concatenate this fields in XI?? If it possible please explain me how I can do it.
Hi,
As table will contain the multiple rows under one column it means the one field with multiple occurance. Here you can't use the Concat API from standard function.
You need the UDF with belo code
Source table Column ( A )---> TestUDF ---> Target field
In UDf take cache parameter as == Queue
and copy paste below code
//write your code here
String Constants = new String("");
try{
for(int i = 0; i<=1000;i++)
Constants = Constants.concat(A<i>);
} catch (ArrayIndexOutOfBoundsException e) {}
result.addValue(Constants);
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,
I recommendo you create a UDF because is more easy to mantain, by the other way you have to use many CONCAT and is a mess. in UDF just send a queue of each field (change field context) and all.
you will have a UDF whit many parameter.
im not sure, bucause i have many time with develope in java, but i think if yoiu send a queue of node <node> you could access to each field, so the UDF only would have one parameter.
please confirm my doubt.
for example:
<MT_XXX>
....<node>
........<f1/>
........<f2/>
........<f3/>
........<f4/>
....</node>
</MT_XXX>
hope it helps
Edited by: Rodrigo Pertierra on Mar 3, 2008 9:25 AM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
as per your requirement you have mauliple records in a single filed.
if u will use the standard concat function then it will map only the first value and ignore all other values.
so in that case u can make uswe of UDF.
UDF:
string a= new string("");
for(int i=0;i<a.length;i++)
{
a=a+concat(a);
}
result. addValue(a);
the parameter a in the UDF is ur source field(u can also use any other name also)
and u will use the UDF in the mapping in the following way
source->UDF>target
Thanks
Rinku
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Have a look at the Blog from Sarvaya
Message mapping simplified
[https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/2171] [original link is broken] [original link is broken] [original link is broken];
If you are new to Message mapping
Reward points if useful
Regards
Abhishek
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
In message mapping, use standard funcion Concat. U have to use many concat tabs.
Regards,
Prateek
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 | |
10 | |
7 | |
6 | |
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.