Professional Documents
Culture Documents
Community
Technical Articles
There are always questions in the forum about How to stop or do not allow the duplicate les to be processed. In this Blog I would exemplify a way to
handle the duplicate les with the RFC functionality.
1. Create an transparent table in XI to store the lename, date and time of the le processing. This table help us to keep track of the le names, date
and time it got processed for our reference.
2. Create an RFC enable function module. This function can either query a lename into the table or insert a lename to the table. It has a import
parameter for accepting the lename and an export parameter to respond the called program if the le is a duplicate one.
https://blogs.sap.com/2008/07/14/impede-duplicate-files/ 1/10
4/20/2020 Impede Duplicate Files | SAP Blogs
Function of RFC.
RFC imports the lename and checks if the le name already exist in the transparent table.
i. If there is no entry for the lename which is passed then the lename is added to the table and the export parameter Z_Duplicate is set to N and
returned. In the othere case i.e.
ii. If there is a entry in the table for the given lename then the parameter Z_Duplicate is set to Y and returned.
Steps:
2. Create a RFC enabled function module with the import parameter Z_FILENAME and the export parameter Z_DUPLICATE.
https://blogs.sap.com/2008/07/14/impede-duplicate-files/ 2/10
4/20/2020 Impede Duplicate Files | SAP Blogs
https://blogs.sap.com/2008/07/14/impede-duplicate-files/ 3/10
4/20/2020 Impede Duplicate Files | SAP Blogs
https://blogs.sap.com/2008/07/14/impede-duplicate-files/ 4/10
4/20/2020 Impede Duplicate Files | SAP Blogs
Note: Retrieve the Filename by enabling the Adapter-Speci c Message Attributes in the sender File CC and using the Dynamic Con guration
Parameter in the UDF.
https://blogs.sap.com/2008/07/14/impede-duplicate-files/ 5/10
4/20/2020 Impede Duplicate Files | SAP Blogs
Alert Moderator
Assigned tags
https://blogs.sap.com/2008/07/14/impede-duplicate-files/ 6/10
4/20/2020 Impede Duplicate Files | SAP Blogs
SFTP Adapter – How to handle File naming convention and extension
By Sekhar Dachepalli , Oct 29, 2019
Zipping of les in PO 7.5 using custom adapter module
By Anupam Ghosh , Jun 17, 2019
Related Questions
8 Comments
Former Member
Hi,
Good concept..but it this case message will arrive in BPE..
see this blog also : Adapter Module to stop processing of duplicate le (FTP Location)
Thanks
Farooq.
https://blogs.sap.com/2008/07/14/impede-duplicate-files/ 7/10
4/20/2020 Impede Duplicate Files | SAP Blogs
Like (0) Reply Alert Moderator
Most importantly requirement in our project was to nd the missing le names. The inbound les were odd numbered like *01.*, *03.*, *05.*….
We had a report to generate the missing le names sensing the processed le names from the transparent table.
Thanks
SaNv…
Former Member
An Adapter module (SessionBean) can work with a JDBC Data Source – and that would be in a single transaction.
Former Member
Also if during the processing time(when IP try to do RFC lookup), if RFC calls fails, then it will a ect the whole interface/interfaces.
https://blogs.sap.com/2008/07/14/impede-duplicate-files/ 8/10
4/20/2020 Impede Duplicate Files | SAP Blogs
Former Member
Regards,
Sumit
Former Member
BTW: some Adapters for PI (especially the EDI Adapters) do duplicate checking themself, or have modules for this. That way you dont need to involve
the Process engine and you are transactionally safe.
Bernd
Agree! But the standard le adapter never has this feature. So either user adapter module or RFC look is required.
Thanks
SaNv…
https://blogs.sap.com/2008/07/14/impede-duplicate-files/ 9/10
4/20/2020 Impede Duplicate Files | SAP Blogs
Krishnakumar Ramamoorthy
Well, there is always one legacy system that can send only les with static names. Though static le names are not the best design, they do exist. The
only way we can be sure of duplicate processing in case of static les would be to have controls at the application logic level.
Anyway, BPM seems to be a overkill for this. I would go with Adapter module as suggested by some of our folks. If you still think, we go to do RFC look
up, I would do it in the mapping, throw a mapping error and send emails using CCMS instead of using a BPM.
Add Comment
Find us on
Newsletter Support
https://blogs.sap.com/2008/07/14/impede-duplicate-files/ 10/10