on 01-28-2015 9:21 AM
Hi all,
My interface is ( EDI 810 formate) file to Idoc Scenario.
In this my input is having some duplicate records in one file.we have to find the duplicate and we will ignore that duplicate record.
How to change the mapping ??
plz any one give the idea to find duplicates
Thanks in advance.
regards,
Raj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HI all,
One more i forgot to tell you
here i have to create one alert based on duplicate.
whenever duplicate is occurs on that time alert send one mail.
regards,
Raj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Raj,
the easiest way to solve this, is to leave this message mapping as it is and create another message mapping that you put into your operation mapping before the existing one.
This new mapping should map from EDI 810 to EDI 810 and only remove your duplicates.
To remove the duplicates, you can use "sort" --> "split by value (value change)" -> collapse context
This will do the following:
Input | sort | split by value (value change) | collapse context |
---|---|---|---|
3 | 1 | 1 | 1 |
3 | 1 | 1 (context change) | 2 |
2 | 2 | 2 | 3 |
1 | 2 | 2 (context change) | |
2 | 3 | 3 | |
1 | 3 | 3 (context change) |
You need to use "sort by key" to sort all other elements on the same level and lower levels.
I didn't get, if you need to remove duplicates only, if all four fields are the same.
If so, you can "concatenate" all four key-fields before.
To keep it simple and easy to debug, you should just create another message mapping with a new field containing the concatenated fields.
After that, do the sorting on the concatenated field - as explained above.
Your second requirement to send a mail whenever there are duplicates can then be solved quite easly - at least, if you don't need details in your mail. Two solutions approaches:
1. Make your operation mapping a multi-mapping: One incoming service interface - One outgoing + an optional service interface sending mails
2. User a UDF (not much coding to copy) and send the mail via Mailadapter directly from the mapping
For both approaches you need to find out, if duplicates were found. You can do this for example by counting elements and using a "If without else".
Hi Heiko Konert,
I am done the mapping ,' Thank you for your response.
And when i am testing in Mapping level Both mappings are working fine. but the problem is when i am testing in Operational mapping i got below error .
Please some help out .
Runtime Exception when executing application mapping program com/sap/xi/tf/_EXTOL_EDI810_to_SAPECC_FIDCCP02_; Details: com.sap.aii.utilxi.misc.api.BaseRuntimeException; com.sap.aii.mapping.api.UndefinedParameterException: The input-parameter Channel does not exist. See error logs for details
Input payload is corret becz i am using the payload that is working in individual mapping is correct.
Please help.
Thank you in advance
regards,
Raj.
Hi Heiko Konert,
I have done the change in mapping and client has tested that and given feedback.
my mapping is
And they given feedback as
Node1,2, & 4 have the same invoice number: 17181. 3rd node has a different invoice number: 17182.
In the output mapping, Only 2 nodes are coming. However, the values from node-4 are populated (instead they should have been from node3).
Problem: You should not use the sort function in the mapping.
Solution1: If you use sort at the node level you should use it at every field that you map below it.
Solution2: the duplicate UDF should be able to find the duplicate without the use of sort function.
How to do without sort using Duplicate.
Please advise.(
Tell me the procees using solution 2.
Thank u
regards,
Raj
Hi all
thank you for your response...
But my doubt is i have to map based on Four fields in receiver side..for duplication.
but here they are already mapping is done individually.
Receiver fields:
invoice number : XBLNR
Invoice date: BLDAT
Amount WRBTR
Vender no LIFNR
now we have to change total mapping or what?
Plase suggest..
Regards,
Raj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
You can use sort and after function splitByValue(Each Value). Will remove the duplicates.
Regards,
Jannus Botha
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi RajiReddy,
You can follow Azhar suggestion but previously you will need to use the Sort function if the duplicates registers are not consecutive.
Regards.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Raj,
How is your input payload? Can you share display queue / Input and required Output data...
Did you try to use collapseContext Node function...it will collapse the repeating values into single.
Test and check if it helps
Regards,
Azhar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
9 | |
9 | |
6 | |
6 | |
6 | |
5 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.