on 08-21-2009 7:29 AM
Hi,
Need a UDF to eliminate duplicate records in MM.Can accomplish by using standard function but i need an UDF.
Regards,
Anitha.
Hi Anitha,
Splitbyvalue ( for change in value) plus collapse contexts will work.
regards,
Ramya Shenoy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Anitha,
In that above UDF is working fine which is given by Jyothi. But need to one small change is before that process, sort the array values. Then only remove all duplicate values.
java.util.*;
// Sort the Array values
* Arrays.sort(a); *
String temp = a[0];
result.addValue(a[0]);
for(int i=0;i<a.length;i++)
{
if(!(a<i>.equals(temp)))
{
result.addValue(a<i>);
}
temp=a<i>;
}
Regards
Vijaykumar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Anitha,
Is there any special reason for UDF...It can acieved by using Standrad Function...If you use UDF it will be a performance issue...Instead of that you can do like this...
input(Manual Context change to Message Type)---->sort---->SplitByvale[Valu Change]--->CollapseContext--->output
This will surely work...If you want UDF only...Then I wil provide you..
Thanks.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Use this..
input(Manually Change the Context)---->sort---->UDF--->output
Use this code for UDF...
While writing the UDF select the Queue...
String temp = a[0];
result.addValue(a[0]);
for(int i=0;i<a.length;i++)
{
if(!(a<i>.equals(temp)))
{
result.addValue(a<i>);
}
temp=a<i>;
}
I have tested this...Working fine...
Thanks.
Hi ,
You can ask your ABAP team to remove the duplicate records in the MM ( Material Master)and then you can process right ?
If its in ur MM (Message Mapping ) , you can solve using the standard function
Regards,
Jude
Edited by: jude bright on Aug 21, 2009 8:38 AM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
95 | |
11 | |
11 | |
10 | |
9 | |
8 | |
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.