cancel
Showing results for 
Search instead for 
Did you mean: 

Solution to check if a particular field is unique

Former Member
0 Kudos

Hi Gurus,

I am working on a solution which has following requirements.

1. A .txt file is there which has three columns GRPREF, GRPCOUNT, COUNTER

2. Every Inbound message will have one GRPREF( which can be repeated in other messages) and GRPCOUN will be there.

3. Whenever an inbound message hits PI, PI should check if GRPREF field is present in .txt file or not.

4. IF GRP REF is not present the write the GRP REF nuber in GRPREF column of .txt file with GRP COUNT and update COUNTER field with 1.

5. IF GRPREF is present then just update the counter by1.

Thanks in advance.

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hello Nav ,

You can ask your third party to place a trigger file when the transfer of files is complete.

Post that you can use additional files option in FTP/SFTP adapter to pick up the files based upon trigger file. If the trigger file is not placed then files will not get picked up.

Specifying Additional Files in the Sender File Adapter - Advanced Adapter Engine - SAP Library

Thanks

Former Member
0 Kudos

Hi Gaurav,

Thanks for your response.....but in my opinion. Additional files will not be of any use becoz the files to be picked are to be defined at run time. For eg following files are present in the folder.

ABC_5.001

ABC_5.002

XYZ_3.001

ABC_5.003

ABC_5.004

XYZ_3.002

ABC_5.005

ABC group is complete if we trigger a final file also. It will be named like ABC_final.txt. In source file we will give as *_final.txt. but in additional files how we can specify the names of other files that belong to group ABC???

Thanks

Navmrid

Former Member
0 Kudos

Hello Nav ,

If your third party can put file with some different extension for e.g. .xml

In this case you can use additionalfile.namepart parameter.

".txt"=".xml"



Thanks

Former Member
0 Kudos

Hi Azhar,

The scenario is like the files will keep on coming at regular intervals in source folder. But hte file from that folder should be picked only when the group gets completed.

That why we have set the logic as GRPCOUNT=Counter . But how to pick files from a folder based on condition. That we are looking for.

Thanks

Navmrid

azharshaikh
Active Contributor
0 Kudos

Hello Navmrid,

AFAIK - there is no standard config in PI as such to wait. Maybe you can poll the dir at a particular time (example once a day) when all the files are available in DIR.

Also for sorting it, there is not std way. No might need to check for Scripts to achieve this or go for Custom Adapter Module

Regards,

Azhar

Former Member
0 Kudos

Hi Gurus,

We have found a solution......but  stuck at one place........suppose if a folder contains following files

ABC_5.001

ABC_5.002

XYZ_3.001

ABC_5.003

ABC_5.004

XYZ_3.002

ABC_5.005

Here ABC is GRPREF. 5 is GRPCOUNT followed by counter so in case of ABC GRPCOUNT=Counter so all ABC files should be picked but not XYZ files as GRPCOUNT is not equal to Counter.

How to achieve this

azharshaikh
Active Contributor
0 Kudos

Hi Nav,

From your post i understand that you are trying to pick file with same pattern...

My few cents:

1. You can ask the sender to post only the relevant files in Folder

2. Or you can have some script at Sender side to pick only the relevant files / move only the required ones to Dir

instead of filtering in PI

Hope it helps

Regards,

Azhar