Sender FTP MVS file duplicate Handling
Hello,
I am facing the following challenge in one of my current development. I know it is an age old issue but Would greatly appreciate
some new inputs/views into this.
The following is the scenario.
1. PI 7.3 Sender File adapter (FTP) reads the file from the mainframe (MVS)
2. The MVS dataset is like
TEST.MVS.DATA.C001D00
TEST.MVS.DATA.C002D00
TEST.MVS.DATA.C003D00 ....
3. For a specific reason the MVS file is not allowed to be deleted/archived, were as the new file will be keep on adding (004, 005, 006 ....)
3.1 Handled this using "ftp. ignoreSourceFileDeletion " -- true
4. Now the challenge in SAP PI is "how to READ the NEW files ONLY, ignoring/skipping the old files"
4.1 The file size is big enough to avoid reading all files and filter/delete using Mapping/Script
5. I have used the default "Duplicate Handling" option available in the File Sender adapter, but
5.1 the problem is, the channel throws the duplicate error after processing the first file (DATA.C001D00)
but dose not move on to process the next file (since the first file is still available on the FTP, as mentioned in step 3).
5.2 For every poll interval it throws the duplicate error/message (in CC monitor) for the first file again n again.
5.3 Duplicate handling config :- Duplicate Message Alert Threshold = 0
Pls let me know if you have had a similar scenario and how to handle it.
Adapter module would be a last resort :-)
Thanks in advance
Prasanna
Hi Hareesh
Thanks for the reply. The mainframe dosent allow the file permission to be changed!!
We have figured out to use an abap program (bg scheduled job) which will do the ftp pull and also maintains the filename, timestand and size in an custom table. So every time it will check the table entries and will get the latest files only.
Marking it as answered!!
Regards
Prasanna
Similar Messages
-
Sender FTP Adapter (file transfer w/o mapping)
Hello everyone!
Is there a way to configure a Sender FTP Adapter such that it simply picks up a file in an FTP folder then moves it to another FTP folder without changing any data (no mapping needed)?
I tried doing it, but the Sender Agreement requires you specifiy an Outbound interface (which is not needed in this case). Would anyone of you know a workaround to this?
Warm regards,
GlennHi
Use dummy interface name. But that should be same in ID objects
Check this
How to send any data (even binary) through XI, without using the Integration Repository
Thanks
Gaurav
Edited by: Gaurav Bhargava on Oct 29, 2008 9:48 AM -
Duplicate Handling in not working fot FTP and working for NFS in PI 7.31 SP06
Hi Experts,
To handle the duplicate files and I enabled the check box (Enable Duplicate Handling) in Sender File adapter , but this is working in case of NFS option and it's not working for FTP protocol.
What I observed is if the same file received second time from FTP server and File date and time is current file created date and time in FTP server.
But in case of NFS file time is last file modified date and time.
As per SAP help duplicate file is working based on last file modified date and time stamp - but this is not same for duplicate file in case of FTP.
I am testing this in PI 7.31 SP06.
Please help if you tested this option in PI 7.31 using sender FTP.
Because our scenario we might received from sender FTP duplicate files and this I wanted fix using our standard check box option.
Appreciate your help.
Regards,
Venu.May be have a look at the below blogs if it helps..
http://scn.sap.com/people/sandeep.jaiswal/blog/2008/05/13/adapter-module-to-stop-processing-of-duplicate-file-ftp-location
http://scn.sap.com/community/pi-and-soa-middleware/blog/2012/06/05/how-to-handle-duplicate-files-sender-file-adapter-scenarios-in-process-integration -
Strange Problem in File Archiving - Sender FTP Adapter
Hi,
The scenario is file to IDOc. XI has to read the input file from client FTP server and archive it to XI local file server.
File is archived properly without FCC (for xml files). But with FCC, the sender FTP adapter is archiving empty files (0 kb files) not the original file with data.
I've checked SXMB_MONI, even there I can see the file data and the IDoc is getting posted with proper data. But, the archived file is empty. Not sure about the problem.
Please suggest. Thanks in advance.
Regards,
Joe.Hi,
I've already tried archiving the file to the FTP server itself, it's working fine (even with FCC). But, when I try to archive it to the XI server (read from FTP and archive at XI server), it's writing empty file to the XI archive directory. I'm using PI 7.0 SP 14. My sender FTP adapter dtls follow
Data Connection: Passive
Timeout Secs: 500
Connect Mode: Permanently
Transfer Mode: text and binary tried both
File type: text and binary tried both..
Looking out for a solution.
Thanks,
Joe.
Edited by: Joe on Jun 19, 2008 8:07 AM
Edited by: Joe on Jun 19, 2008 8:08 AM -
Error with Archiving Faulty Source File in Sender FTP adapter
Hi All,
I have configured a Sender FTP adapter with Processing Mode as Archive.
I am able to read the files from FTP server and archive all the successfuly processed file in the PI aplication server directory XXX/success.
We need all the error files also to be archived on PI application server in directory XXXXX/Fail so I have checked the option Archive faulty Source Files and provided the application directory XXXXX/Fail .
I have unchecked the option Archive Files on FTP server.
But the problem is when FTP adapter is getting any error files it is not able to archive it to application directory XXXXX/Fail .
In RWB it is showing the error
Unable to archive faulty input file /data/abc.txt to /XXXX/fail/abc.txt
Cause: com.sap.aii.adapter.file.ftp.FTPEx: 550 rename: No such file or directory
This directory is existing and works fine when I give this directory name in Archive directory of processing mode.
Sender FTP adapter is trying to archive the file in FTP server which I dont want and giving us this error.
If I give any Directory which is present in FTP server my error files are getting archived on FTP server but not in the archived folder.
I have already unchecked the option Archive Files on FTP server.
Please help......
I am on PI 7.11
Regards
Henery HHi Henery,
Check the below thread, this should help you to fix the issue.
FTP adapter: exc. 550 : No such file or directory
Thanks, -
Hi,
It's necessary to indicate full path in sender FTP file?
I've tried with relative path and patter file* and communication channel monitor returns the error:
Could not process file 'file_000018_sdidis_080109_095115_319_J': com.sap.aii.adapter.file.ftp.FTPEx: 550 sal: No such file or directory
It seems to recognize the file to process but it doesn't work.
There is any way to indicate relative path of file sender scenario ?
Thanks, in advance,
CarmeHi,
You have to specify the exact directory name from where ur file will be picked up.
suppose i have a file under Test\data\ directory then I have to specify the path starting from root folder.
where Test is the Root folder
Can u pls let me know what u have mentioned in ur File adapter.
Thnx
Chirag -
Sender FTP Adapter, text mode should convert source file?
Hi !
We have a Unix file system where systems and people drop files to be captured by XI. XI runs also on another Unix system.
We configured the Sender FTP comm channel from XI to use the TEXT mode, to have converted the captured file to Unix TEXT (eol = 0x0A), no matter the format of the file used to transfer the source file to the XI polling folder.
But we noticed that TEXT or BINARY modes in sender FTP adapter works all the same, like binary.
What are we doing wrong?
Thanks,
MatiasNo. to see the difference put a gif and give txt in file adapter you will get an error for the same file u use binary it works.
their is difference b/w these . if you use special characters like european then you need to use UTF-8 or UTF-16 or bigInidan if it is binary then you output will junk charaters for these sysmobls
Message was edited by:
Sreeram Reddy -
No suitable sender agreement found - File / Adapter, Sender FTP
Hi SDN Friends,
Is my first time in PI with FTP / FILE ( really I'm newbie in PI - but 2 years in ABAP ).
I have configurated my communication channel with and FILE/ADAPTER on a Sender FTP...
I have Tried with 2 FTP, one in my PC, and one Public... but in both cases, it's doesn't works... monitoring my communication channel, I get the No suitable sender agreement found ERROR....
I thought... may be PI has not access to the FTP's servers, so run in SAP PI server, an ABAP program trx se38, program: RSFTP002 and with this, I could connect to the FTP... it works perfectly.
so I don't understand... what I'm doing bad?
Any Help?
regards every body!u r welcome...2 yrs back i am newbie
when ever we make changes after an error, sometimes XI will not take the changes in cache automatically; uses old one. solution for this is complete Cache refresh.
welcome to Integration World have fun.... -
FTP-Sender Adapter ignores files with "known filenames"
Hello experts,
the scenario is FTP -> XI -> IDOC and we have problems with the polling of the files. In communication channel monitoring everything is working fine, but in the FTP folder some files are ignored, although the communication channel is set up for all *.txt-files.
My question is, is it possible that the FTP sender adapter ignores files, if it already has processed a file with the same filename? After renaming the files they all were picked up and archived into another folder. How can I configure the communication channel to pick up ALL *.txt-files in the out-folder?
Best regards
DavidHi David,
What I have observed is, XI always reads files in a certain order (possibly alphabetical or reverse alphabetical). If it finds a file in the source directory that already exists in the archive directory, it will not attempt to read/process the next file (even if the next filename is completely new).
So, if any of the files in the source directory exist in the archive directory, there is a possibility that certain files may get processed and certain wont.
Make sure that none of the files that you put in source directory exist in the archive directory (i.e. all the files are new) and see the output. Let me know if this helps.
PS: I used FTP protocol
Regards,
Riyaz -
Trigger alert for file not existing in sender FTP server
Hi all,
I have a scenario file to file.In the sender FTP server a file is placed every 3hours.If file is present it will work in the normal file to file procedure.But when no file exists it should trigger an alert.
Scripts on FTP server is not accepted as a solution.
Can anyone let me know how this requirement can be achieved.
Points will be awarded generously.
regards,
padmaHi
But when no file exists it should trigger an alert.
EMAIL can be used : assign an EMAIL ID to the corresponding user in the transaction SU01 and then set up SCOT and you can send emails when the ALERT is triggered.
Once you have configure Alerts, you will get the Alerts into ALERT INBOX in RWB of the user. To also get the email, the following needs to be done,
1. In SU01 -- Assign the Email ID for the Recipient of the ALERT.
2. In , RWB>ALERT INBOX> PERSONALIZATION--> Time Independent Delivery and Email are selected.
3. Finally, SCOT needs to be set up to send Emails. Check this for the same. You can ask your BASIS team to do this step.
http://help.sap.com/saphelp_nw04/helpdata/en/23/1edf098ea211d2b47300609419ed29/frameset.htm
Also, In ALRTCATDEF, go to SETTINGS--> CONFIGURATION. By default, the option selected is INTERNAL PROCESSING. Select the option SMTP FORWARDING AS XML and give the email id. This will enable you to send an email alert whenever an error occurs in XI.
Also, to test your Alerts, execute the report RSALERTTEST in SE38.
Also go throuh the following links...
The specified item was not found.
The specified item was not found.
http://help.sap.com/saphelp_nw04/helpdata/en/3f/81023cfa699508e10000000a11402f/content.htm
http://help.sap.com/saphelp_nw04/helpdata/en/80/942f3ffed33d67e10000000a114084/frameset.htm
http://help.sap.com/saphelp_nw04/helpdata/en/2b/d925bf4b8a11d1894c0000e8323c4f/frameset.htm
Configuring scenario specific E-mail alerts in XI-CCMS: Part 3
Configuring scenario specific E-mail alerts in XI-CCMS: Part 3
Configuring scenario specific E-mail alerts in XI-CCMS: Part-2
Configuring scenario specific E-mail alerts in XI-CCMS: Part-2
Configuring scenario specific E-mail alerts in XI-CCMS: Part u2013 1
Configuring scenario specific E-mail alerts in XI-CCMS: Part - 1
Regard's
Chetan Ahuja -
FTP Adapter - file.sender.customizer_class
Hey,
Anyone has a working example on how to implement this class?
I have one class, and apparently, in its simplest form it could be something like this:
package slf.nask.FileSender;
import java.util.Date;
import oracle.oai.agent.adapter.sdk.Agent;
import oracle.oai.agent.adapter.sdk.AttributeObject;
import oracle.oai.agent.adapter.sdk.MessageObject;
import oracle.oai.agent.adapter.technology.FileSenderCustomizer;
import oracle.oai.agent.adapter.transport.TransportMessage;
public class SLFNaskFileSenderCustomizer implements FileSenderCustomizer {
public static void main(String[] args) {
System.out.println("Interconnect renaming facility!");
public String generateFileName(Agent agent, String rule, String app,
String partitition, Date time, MessageObject mobj,
AttributeObject aobj) {
return "MyFilename.xml";
public void customizeTransportMessage(Agent agent,
TransportMessage transportMessage, MessageObject mobj,
AttributeObject aobj) {
But I keep running into an error when running the adapter. If i comment out this class, it works fine, but once this class is in, it keep getting a parseLong error.
Log entry:
TransportProperties.TransportProperties():ota.d3ls=agresso_customer.xml;file.sender.type=ascii;file.receiver.max_msgs_retrieved=30;file.receiver.exception_dir=file://localhost/R:\nask\errors;file.sender.customizer_class=SLFNaskFileSenderCustomizer;ota.type=D3L;file.sender.file_name_rule=NA%TIME%_3.c15;ota.send.endpoint=file://localhost/R:\nask\AgressoFTP\TEST;file.receiver.polling_interval=60000;
java.lang.NumberFormatException: 1240438527
4
at java.lang.Long.parseLong(Long.java:319)
at java.lang.Long.parseLong(Long.java:363)
at oracle.oai.agent.common.logger.ErrorLogObserver.readNextLogObject(ErrorLogObserver.java:361)
at oracle.oai.agent.common.logger.ErrorLogObserver.run(ErrorLogObserver.java:137)
at java.lang.Thread.run(Thread.java:484)Looks like the fault here, was the package. Leave it empty and it should be fine!
-
Duplicate handling Not Working
Hi PI EXperts,
I need your help here.
I am using the option of Duplicate handling in sender FTP channel as below:
Enabled Duplicate handling: Yes, Duplicate message alert threshold:0.
But I found few duplicate files are processed and archived twice?
These files have same name(with extension) , are of same size and last modified time stamp is also same.
Please let me know how I can resolve this issue so duplicate files are not processed more than once ?
Regards,
SVHi PI experts, I have checked the message logs. I have noticed that duplicate files are being processed again. As per my understanding, PI does not have sufficient rights to delete the (duplicate) files; it can only pick, process and archive them. Due to this, a duplicate file stays for 24 hours in the FTP folder and the duplicate check gets expired the moment the file remains there for 24 hours. Due to this, PI treats this duplicate file as a new file and reprocesses it. Please let me know if my understanding is correct or there could be some other reason for this? If my understanding is correct, I believe one option to resolve the issue is as below Option 1: Modify file properties so that PI has sufficient rights to delete duplicate files. Please let me know your thoughts. Regards, SV
-
In FTP server file not storing in proper order when 'FTP_R3_TO_SERVER'
Dear ,
when i used FTP_R3_TO_SERVER to download data in FTP server
i checked in FTP server file is not storing in proper order in FTP server . plz help how to get the file in proper order .it urgent . full points must be given. i given code below .
DATA : BEGIN OF iresult OCCURS 5,
rec(450),
END OF iresult ,
DATA :
dest LIKE rfcdes-rfcdest VALUE 'SAPFTP',
compress TYPE c VALUE 'N',
host(64) TYPE c.
DATA: hdl TYPE i.
DATA: BEGIN OF result OCCURS 0,
line(100) TYPE c,
END OF result.
DATA : key TYPE i VALUE 26101957 ,
dstlen TYPE i,
blob_length TYPE i.
host = p_host .
DESCRIBE FIELD p_password LENGTH dstlen IN CHARACTER MODE.
CALL 'AB_RFC_X_SCRAMBLE_STRING'
ID 'SOURCE' FIELD p_password ID 'KEY' FIELD key
ID 'SCR' FIELD 'X' ID 'DESTINATION' FIELD p_password
ID 'DSTLEN' FIELD dstlen.
CALL FUNCTION 'FTP_CONNECT'
EXPORTING
user = p_user
password = p_password
host = host
rfc_destination = dest
IMPORTING
handle = hdl
EXCEPTIONS
not_connected = 1
OTHERS = 2.
IF sy-subrc = 0.
CONCATENATE 'cd' ftppath INTO ftppath SEPARATED BY space .
CALL FUNCTION 'FTP_COMMAND'
EXPORTING
handle = hdl
command = ftppath
TABLES
data = result
EXCEPTIONS
command_error = 1
tcpip_error = 2.
IF sy-subrc = 0 .
CLEAR result .
REFRESH result .
CALL FUNCTION 'FTP_COMMAND'
EXPORTING
handle = hdl
command = 'ascii'
TABLES
data = result
EXCEPTIONS
command_error = 1
tcpip_error = 2.
IF sy-subrc = 0 .
DESCRIBE TABLE iresult LINES lines.
blob_length = lines * width .
clear : lines.
Delete the existing file
CONCATENATE 'del' ftpfile INTO delfile SEPARATED BY SPACE.
CALL FUNCTION 'FTP_COMMAND'
EXPORTING
handle = hdl
command = delfile
TABLES
data = result
EXCEPTIONS
command_error = 1
tcpip_error = 2.
*End of deleting the existing file
CALL FUNCTION 'FTP_R3_TO_SERVER'
EXPORTING
handle = hdl
fname = ftpfile
blob_length = blob_length
TABLES
blob = iresult
EXCEPTIONS
TCPIP_ERROR = 1
COMMAND_ERROR = 2
DATA_ERROR = 3
OTHERS = 4.
IF sy-subrc 0 .
WRITE 'Error in writing file to ftp' .
ELSE.
WRITE 'File downloaded on the ftp server successfully'.
ENDIF.
ENDIF.
ELSE.
WRITE : 'Path on ftp not found : ' , ftppath .
ENDIF.
CALL FUNCTION 'FTP_DISCONNECT'
EXPORTING
handle = hdl.
CALL FUNCTION 'RFC_CONNECTION_CLOSE'
EXPORTING
destination = 'SAPFTP'
EXCEPTIONS
OTHERS = 1.
ELSE.
WRITE 'Could not connect to ftp' .
ENDIF.
ENDFORM. " FTPFINANCEACCESS_DOWNLOAD
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF screen-name = 'PASSWORD'.
screen-invisible = '1'.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
Edited by: manoj kv on Feb 27, 2008 12:55 PM
Edited by: manoj kv on Feb 28, 2008 5:37 AM
Edited by: manoj kv on Feb 28, 2008 5:39 AM
Edited by: manoj kv on Mar 5, 2008 2:15 PM
Edited by: manoj kv on Mar 7, 2008 12:51 PMHello,
Did you try to put 'X' to the parameter CHARACTER_MODE.
Hope it will help you
Olivier -
Is CPA Cache refresh linked with ftp or file pooling process in XI?
Hi,
I have a file to file scenario using Transport protocol as FTP in XI 3.0 SP 15.
When we try to sends some file using ftp protocol where we are using
FTP connection parameters
Server = <CORRECT IP>,
Port = 21 ,
User name <CORRECT NAME>,
Password <PASSWORD> ,
Data Connection = Active
Connection Seq = None
Connection Mode = Permanently
Transfer Mode = Text
Processing Parameters
Quality of Service = Exactly Once
Pooling Interval = 1 sec
Processing Mode = delete
File Type = Text
File encoding = utf-8
The problem we are facing like some time the ftp is not working even the file is present in the location for pick up. If few files are stacked up to be collected then when we are using CPA Cache refresh in Full mode manually then it fetches all the files from the location but the problem is that ,we have a time constraint for this process to be completed in just 60 seconds if we are not able to pick up a file in 60 Secs then the file will be treated as invalid.
So I just want to know how Manual CPA CACHE refresh in full mode generally solve the problem.
Next if more files will be stacked up then cache refresh also failed to solve the problem and more cache refresh result in NOT pooling any other files in XI including the above discussed flow.
So,in anyway Cache refresh linked with ftp or file pooling process in XI?
Please assist me in correctly understating the whole problem and what solution could be put to solve this.
Thanks,
Satya
Edited by: Satya Jethy on Mar 14, 2008 12:28 PMHi Suraj,
If you see my query i have mentioned that the pooling interval is 1 Second.
If we are not able to pick the file with in 60 Secs as this is a real time scenario so the file will be treated as a invalid file.
Moreover this problem is happening some time.
I have also checked the component monitoring it is saying everything is ok as because we are receiving the file with out any error and the file transfer is also success.The only problem is that it is not collecting the files from the given location.
Hope i make you understnad the problem .If not please revert back i will try to explain once again.
Thanks,
Satya -
Sender FTP Adapter not working with certain name
Hello,
We're facing the next problem within XI.
We configured a sender FTP adapter within the central adapter engine. This adapter is configured correctly however for some reason it is not picking up any file from the FTP server.
Changing status to inactive-> active again all kinds of modes and configs we tested.
However when copying this non-working adapter to a new one with a different name (Configuration is exactly the same!!!!!) and use this one in the sender agreement it worked immediately.
Somebody else faced similar problems and managed to solve it because for this error we don't want to adjust our naming conventions....
Thanks,
EmileHi Emile,
This could happen when AE cache is not getting updated.
Goto SXI_CACHE.
Click "Goto" -> AE Cache and check if you get a green symbol with a message saying " Cache contents are up-to-date".
Regards,
Anish
Maybe you are looking for
-
How can I stop the sharing on the iPhones that are on my account because its sharing everything even text messages and its driving everybody crazy
-
Version: iMOVIE 11, 9.0.4 No new updates, 7 sept 2011. Something is wrong with the project that I am working on. When I add new pictures and movies, some of them will not be played in the preview or fullmode at all. Some pictures are wrongly understo
-
Hello Everyone, I am getting this error while creating a sales order : Please analyse and let me know the solution: Material 302309 is not defined for sales org.5000, distr.chan.06, language EN
-
Recording sound externally (independent to camera)
Hi. I own a Sony HDR-CX115 Camcorder that doesn't have a mic input. Video quality of the camera is very good but the sound is poor. I'm looking to buy an external mic and sound recorder and replace the sound from the video. Anyone have any experience
-
Best practice for checking out a file
Hello, What is the SAP best practice to check out a file? (DTR -> EDit or DTR -> Edit Exclusive?) What are pros and cons of checking out a file exclusively? Thanks MLS