cancel
Showing results for 
Search instead for 
Did you mean: 

Dulicacy of field values in the CSV file

sabyasachi_mohapatra3
Participant
0 Kudos

Hi Experts

We are configuring a file to idoc scenario in which the file is a .csv txt file.

The format of the csv file is

NMI,BillNo,BillAmount,ContractAcc

There are instances where there is a duplicacy in the NMI & hence that needs to be filtered before sending it to PI.Any idea about how to filter this either at the source end or PI end.

Please throw some light in this.

Regards

Sabyasachi

Accepted Solutions (0)

Answers (4)

Answers (4)

sabyasachi_mohapatra3
Participant
0 Kudos

OK

Former Member
0 Kudos

Hi,

I don't know what is NMI but there could be 2 possiblities to sort it.

1. Create an script which will check for the duplicasy of NMI befor PI picks it up.

2. Let the PI pick up the csv file and then in mapping you handle the duplicasy of NMI.

And third option is to check the csv file at source side.

Regards,

Sarvesh

sabyasachi_mohapatra3
Participant
0 Kudos

Hi Sarvesh

Could you please give any idea about the type of script which will handle the duiplicacy .

Thanks '

Sabyasachi

Former Member
0 Kudos

First tell me which kind of duplicasy you want to sovle with an example. Secondly what is your OS for XI?

Shabarish_Nair
Active Contributor
0 Kudos

Use SPLITBYVALUE function.

Sort (sort function) the field first, then use splitbyvalue (change the properties to - on value change)

this will ensure duplicate values are not passed on

Play around with the node functions they are pretty useful you know

Former Member
0 Kudos

Yes, what Vijay has suggested is the second option which I mentioned in my first reply. You can handle it in your mapping like this..

Source> Sort> SplitByValue(Value changed) > CollapseContext>SplitByValue(Each Value)--> Target.

By this way you can remove your duplicate entries.

JoelTrinidade
Active Contributor
0 Kudos

Hi Sabyasachi,

Manually you will need to open the file put it into excel remove duplicate entries , again move that back again into text file. This method is a very dumb way of doing things.

A smarter way would be to write a module. The link given below is not a tailor made solution to your query but sufficient to get you started.

https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/99593f86-0601-0010-059d-d2dd39dc...

Regards

joel

Former Member
0 Kudos

Hello,

What kind of filter would you like to apply for NMI?