on 07-20-2011 9:49 AM
Hi Experts ,
I am working on the the below requirement JDBC to IDoc scenarion in the mapping i need the below logic
based on the existence of the Transaciton ID . the idoc followed by the segments should be created . for ex
If Interface_Trasaction_ID= 456 THEN Idoc 1 followed by Segments and line items
E1BPACHE09,
E1BPACCR09
E1BPACCR09,
E1PACEXTC .
Field value=456
If Interface_Transaction_ID =457 THEN Idoc 2 followed by Segments and line items
E1BPACHE09,
E1BPACCR09
E1BPACCR09,
E1PACEXTC .
Field value=457
To satisfy the above logic i have mapped Transaction id > SplitByValue->CollapseContext--->Idoc
But the same Mapping Logic is not working when Sender payload is triggred having Repeated Transcation_Id value ias given below if Transaction ID= 456 ,
Transaction ID= 457,
Transaction ID= 457,
Transaction ID= 456 .
then output should have only 2 Idoc Followed by segments where Field Value will be 456, 457
I have mapped Transaction id -->Field Value .
let me know how can achive the above logic ...!!
Hi,
Try the following mapping to remove the duplicate entries.
Transaction ID>Sort>SplitBYvalue(Value changed)>Collapsecontext> Target
Keep context of Transaction ID at the root level.
Regards
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Aziz,
you can use UDF
Transaction IDRemoveContext-->sortUDF- SplitByValue->CollapseContext--->Idoc
public void removeDuplicate(String[] Value, ResultList result, Container container) throws StreamTransformationException{
String temp = Value[0];
result.addValue(Value[0]);
for(int i=0;i<Value.length;i++)
{
if(!(Value<i>.equals(temp)))
{
result.addValue(Value<i>);
}
temp=Value<i>;
}
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Aziz,
Do Transaction ID>SplitBYvalue>Collapsecontext>Splitby value> Target
Hope this helps.
Thanks,
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.