Alerts in sender file adapter
Hi ALL,
Is there anyway to send alert when the file is not avalible in the sender system,
meaning we can see tht message not got created in the file communcation channel monitering after running based on avalibility time planing(ATP).
can we send any alert if the file does not exist when running the ATP.
Thanks
Souz
I don think this is feasible in PI.
The message is not reached in middleware and there is no way to raise alert in PI. Ideally this can be handled by developing custom tool which logs into FTP server. Raise alert based on age of the file ..etc
Similar Messages
-
Sender File adapter : Alert are possible.
Dear All
i had a Scenario of <u>file to jdbc</u>.I am using FCC(content conversion ) at sender file adapter.
<b>if the file is not having proper text field,or if its's blank file...
i want to generate an alert..</b>
while testing with a blank file , my file sender adapter is giving the error but their are no alert...
even in alert rule , i had specified file adapter ,Sender/Receive interface also
Rsalerttest : working properly.
Rsalertdisp : no dump for sender file adapter error
<u>for mapping error my other alert rule are woking and generating the alert sucessfully</u>.. for the same interface
any guess where could be the error..
Regards
Ajay Pant
null
Message was edited by:
ajay pantHI,
For alert configuration see the belowlinks,.But in your case if the send message having the empty fields, we can handle this in FCC parameters
xml.fieldoptional = yes
Parameter NameA.fieldFixedLengths defined.
○ If the inbound structure contains more fields than in NameA.fieldNames or NameA.fieldFixedLengths the conversion is executed.
Additional fields in the structure are ignored.
○ If the inbound structure contains less fields than specified in NameA.fieldNames, conversion is terminated with an error message.
If the last field only is shorter than defined or is missing completely, the conversion is executed. The contents of the last field are then applied to the XML element as found. Consequently, the value can be incomplete or empty.
/people/michal.krawczyk2/blog/2005/09/09/xi-alerts--step-by-step
for CCMS
/people/aravindh.prasanna/blog/2005/12/23/configuring-scenario-specific-e-mail-alerts-in-xi-ccms-part--1 -- ccms alerts - 1
/people/aravindh.prasanna/blog/2005/12/24/configuring-scenario-specific-e-mail-alerts-in-xi-ccms-part-2 -- ccms alerts -- 2
/people/aravindh.prasanna/blog/2006/02/20/configuring-scenario-specific-e-mail-alerts-in-xi-ccms-part-3 -- ccms alerts --- 3
Chilla -
Is Sender File Adapter always throws error when there is no file?
Hi,
I have a simple question but can't find a straight answer to it. I have a Sender File adapter that configured to pick up file XXX* from FTP server every 1 hour. But a file can come every 2, 3, or 7 hours- no certain time.When there is no file I got "File not found " error. As we use alerts, this behaviour is not acceptable.
Does this error comes always if there is no file? Any possible way to avoid this error ?
Thanks for help.
NataliyaHi Ravi,
I can see the error in Runtime Workbench under CC monitoring. To be precise it says:
An error occurred while connecting to the FTP server '1X.1XX.XX.XX:21'. The FTP server returned the following error message: 'com.sap.aii.adapter.file.ftp.FTPEx: 552 RMS-E-FNF, file not found, ES4_SAP*'. For details, contact your FTP server vendor.
My ftp server has the following set up:
Server: xx.xxx.xx.xx
Port:21
Dataconnection:Active
Timeout:120
Connection secuirity: None
User name .... etc set up.
Connect mode: Per file transfer
Transfer mode:Text
QoS:EO
Pollinterval: 120 (for test purposes)
Processing Mode: delete
Can it be that its a ftp server generates error and sends back to XI?
Thanks,
Nataliya -
Sender File Adapter Ignore Last Line
Hi All,
Like in Sender File Adapter configuration like we have Document Offset to specify the number of starting lines to be ignored,
Like the same way can we ignore the last line of a text file .
Regards,
RahulRahul,
><i>I somehow wait for your answer,</i>
Is that a compliment
I guess there is no standard way to ignore the last line . Like you pointed out, read the line and ignore it in the mapping!
><i>btw ..
suppose in a flat file..
i just want to read the 4th line??
is there any way i can do this?</i>
Again no straight forward way to do this. You can use KeyFields etc , but there is no direct way to do this and every solution would depend on the exact requirements!
Regards
Bhavesh
PS Are the alerts issues resolved? -
Vaildating File name with the data in the file using sender file adapter
Hi,
Below is the scenario
1) Pick up files from a FTP server, the file name is dynamic, how do I put dynamic name in sender file adapter?
2) Determine if the user correctly named the file based on data in the file.
a. File naming structure that we will be concerned with is <company_code><accounting_time_period>.<extension>
b. The company code and the time period in the file name have to match the data in the file.
i. For example. If the file name is 1001_200712.csv and the data in the file is for company code 1005, time period 200712, the file is incorrectly named. Both values must be correct.
How do we do this?Hi Sachin,
As Rightly said by Krishna, You can not put Dynamic name in sender File Adapter .You have to provide the name of the file like "*.txt" in Sender Adapter and at runtime you can access this file name by using following UDF:
DynamicConfiguration conf = (DynamicConfiguration) container
.getTransformationParameters()
.get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
String valueOld = conf.get(key);
return (valueOld);
As now you have picked up the file name at runtime.
Now concatenate source file fields Company_code and Accounting_timeperiod using "_" as delimiter in properties.Also concat the extension .Now you have required file name.
So using EQUALS standard function ,compare it with File Name fetched at runtime using above given UDF, and pass result as you desire to process further or not or to raise Alert to resend the file.
Thanks & Regards,
Anurag Garg
You can validate this file name in Mapping itself. -
Send a mail if no file in Sender File Adapter
Hello guys,
I have one doubt. I have a sender File adapter with FTP transfer protocol. I want to pull the file every 24 hours. If the file does not exist, there is any way to have an error and send a mail to the client?
Is a requierement to do one interface, they want that XI sends a mail if no file is encounteref in the server when XI goes to pull the file. Is this possible?
Many thanks in advance.
Regards,
Xavi.Hi,
Refer to following link
Read Excel instead of XML through FileAdapter
This has good example of developing module. Only code is available. For further help you can look in Help.sap for crating module they also provide sample code.
No need to call alert from module . go upto 24 hars if no file is received set your own structure.
Give condition in receiver detrmination to send mail if file is not picked.
revert back for any clearity.
Thanks
Sunil Singh -
Duplicate message handling in the sender file adapter
Hi,
I enabled duplicate file handling check in the sender file adapter so that whenever there is a duplicate file it should send me an alert also it should disable the channel so that i do not get that duplicate file alert message again and again.
My question is will it activate the channel again as soon as a new file arrives or do i need to manually do that.
Michal's PI tips: Duplicate handling in file adapter - 7.31Hi Hema,
You will have to activate the channel manually. The idea behind the 'disable' functionality is to avoid further file processing through that channel which can only start once the channel is activated again manually.
Regards,
Abhishek -
How to raise Alerts for Sender File Channel
Hi All,
For Sender File Channels , we can find out the status of the adapter through RWB as to whether it is Content Conversion related exception or Folder path not found exception & etc .
I wanted to know as to whether there is any way where can rasie alerts for Sender File Channels (similar to what we do for Reciever File Channels) as well.
Regards
Vinay P.I found it myself .
In Alert Configuration while we are adding alerts for a particular aler category , the following parameters needs to be checked .
Connected to Message : Not Relevant
Sender Service/Party/Interface/Namespace needs to be mentioned.
Adapter Type should be selected as File -
FCC Send File Adapter - missingLastFields not working
Hi
I have a flat file to capture using the sender File adapter
Parameter as follows:
Header_fieldNames : Key,Name,StaffID,Telephone
Header_fieldFixedLengths : 2,12,10,8
Header_endSeparator : 'nl'
Line_fieldNames : Key,Address,Company,LineText
Line_fieldFixedLengths : 2,20,20,40
However there are times where last field come in missing.
Hence I use the Header_missingLastFields : error
Line_missingLastFields : error
However it does not seem to be working as the adapter fails to pick the file from the FTP folder
but if I replace error with ignore, the sender adapter picked the files and process and send to the receiver adapter.
I need to flagged error in sxmb_moni if last field or last few fields are missing....any advise how could this be achieve ?
Regards
FredHi Freddy,
I think you might like to specify missingLastFields = add. then it will add the missing fields as empty. you can further check if these are empty in mapping and then fail the message or create an alert.
If you specify "ignore" then you will not get those fields in your structure and if you specify "error" then the file will not be picked up.
have a look here
http://help.sap.com/saphelp_nw04/helpdata/en/2c/181077dd7d6b4ea6a8029b20bf7e55/content.htm
missingLastfields
If the inbound structure has less fields than specified in the configuration then the XML outbound structure is created as follows:
○ ignore
Outbound structure only contains the fields in the inbound structure
○ add
Outbound structure contains all fields from the configuration; the fields missing in the inbound structure are empty.
○ error
Conversion is terminated due to the incomplete inbound structure. An error message is displayed
regards,
francis -
Duplicate File Handling Issues - Sender File Adapter - SAP PO 7.31 - Single Stack
Hi All,
We have a requirement to avoid processing of duplicate files. Our system is PI 7.31 Enh. Pack 1 SP 23. I tried using the 'Duplicate File Handling' feature in Sender File Adapter but things are not working out as expected. I processed same file again and again and PO is creating successful messages everytime rather than generating alerts/warnings or deactivating the channel.
I went through the link Michal's PI tips: Duplicate handling in file adapter - 7.31 . I have maintained similar setting but unable to get the functionality achieved. Is there anything I am missing or any setting that is required apart from the Duplicate file handling check box and a threshold count??
Any help will be highly appreciated.
Thanks,
AbhishekHello Sarvjeet,
I'd to write a UDF in message mapping to identify duplicate files and throw an exception. In my case, I had to compare with the file load directory (source directory) with the archive directory to identify whether the new file is a duplicate or not. I'm not sure if this is the same case with you. See if below helps: (I used parameterized mapping to input the file locations in integration directory rather than hard-coding it in the mapping)
AbstractTrace trace;
trace = container.getTrace();
double archiveFileSize = 0;
double newFileSizeDouble = Double.parseDouble(newFileSize);
String archiveFile = "";
String archiveFileTrimmed = "";
int var2 = 0;
File directory = new File(directoryName);
File[] fList = directory.listFiles();
Arrays.sort(fList, Collections.reverseOrder());
// Traversing through all the files
for (File file : fList){
// If the directory element is a file
if (file.isFile()){
trace.addInfo("Filename: " + file.getName()+ ":: Archive File Time: "+ Long.toString(file.lastModified()));
archiveFile = file.getName();
archiveFileTrimmed = archiveFile.substring(20);
archiveFileSize = file.length();
if (archiveFileTrimmed.equals(newFile) && archiveFileSize == newFileSizeDouble ) {
var2 = var2 + 1;
trace.addInfo("Duplicate File Found."+newFile);
if (var2 == 2) {
break;
else {
continue;
if (var2 == 2) {
var2 = 0;
throw new StreamTransformationException("Duplicate File Found. Processing for the current file is stopped. File: "+newFile+", File Size: "+newFileSize);
return Integer.toString(var2);
Regards,
Abhishek -
FileName in Sender File Adapter Module
Hi Folks,
In my sender file adapter have written a module to read the picked file name. The protocol used is NFS.
Notice that the file name read in the module has the absolute path, including the directory path. E.g The file name xyz has to be picked from source directory
XIServer\Outbound. In the module when I retrieve the file name, it comes up as
XIServer\Outbound\xyz. Is this expected behaviour?
I was expecting just the file name<xyz> to be retrieved.
Thanks,
AnandHI,
Create an UDF and write this code.
DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey key =
DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
String ourSourceFileName = conf.get(key);
return ourSourceFileName;
in Adapter u will have Adapter specific parameters check the file name check box.
Using this UDF u will get the file name at target side.
Regards,
Phani. -
Advance select for source file in Sender File Adapter
Hi
I am trying to utilise the parameter 'Advance Selection for source file' on a sender file adapter to pick the file from multiple folders
My problem is that this parameter that is listed on the SAP help is not getting in File accessing Parameters.
I am running PI 7.02 (NW702_07_Rel)
Service pack 07
Has anyone come across this before?
any suggestions on how to do this?Hi,
In PI7.0 the property exists. I have used it previously. I think SP was 13.
Regards,
Nutan
Edited by: nutan champia on Nov 24, 2011 10:42 AM -
Mapping problem due to FCC in sender file adapter
Hi All
I am doing File( Flat File ) to RFC Scenario.it is working fine..
the problem comes in mapping with multiple records.
FCC at sender file adapter is used
my Data Type are :
Source DT Target RFC import parameter(table).
E2ED20* ITEM*
KEY VBELN
VBELN POSNR
E2E24* CHARG
KEY
POSNR
CHARG
<b>*->>multiple occurence
E2ED20 and E2E24 are 2 segment ,KEY is used in FCC to identify E2EDL20 & E2EDL24</b>
My source text file is like this :
E2EDL20 0200
E2EDL24 xyz
E2EDL20 0201
E2EDL24 abc
E2EDL24 efg
E2EDL24 mln
E2EDL20 0202
E2EDL24 gty
so the payload should be :
0200 xyz
0201 abc
0201 efg
0201 mln
0202 gty
in <i>FCC ignoer record set= true</i>
otherwise is not called...
i try to use split by value & use oneasmany , not helpfull.
in message mapping when i checked th field VBELN -> display queue
i am getting an array 0200
0201
0202 in white fields
thanks & regards
Ashutosh Rawat<b>Source payload</b>
<?xml version="1.0" encoding="utf-8" ?>
- <ns:MT_MATNO_FILE xmlns:ns="urn:abc:xxx">
- <E2ED20>
<KZ>E2EDL20</KZ>
<FIELD1>020</FIELD1>
<b><VBELN>0083662685</VBELN></b>
</E2ED20>
- <E2E24>
<KZ>E2EDL24</KZ>
<FIELD2>020</FIELD2>
<POSNR>900001</POSNR>
<CHARG>1078629</CHARG>
<LFIMG>3200</LFIMG>
<MEINS>PCE</MEINS>
</E2E24>
- <E2E24>
<KZ>E2EDL24</KZ>
<FIELD2>020</FIELD2>
<POSNR>900002</POSNR>
<CHARG>1078630</CHARG>
<LFIMG>1895</LFIMG>
<MEINS>PCE</MEINS>
</E2E24>
- <E2E24>
<KZ>E2EDL24</KZ>
<FIELD2>020</FIELD2>
<POSNR>900003</POSNR>
<CHARG>1079145</CHARG>
<LFIMG>1883</LFIMG>
<MEINS>PCE</MEINS>
</E2E24>
- <E2E24>
<KZ>E2EDL24</KZ>
<FIELD2>020</FIELD2>
<POSNR>900004</POSNR>
<CHARG>1079146</CHARG>
<LFIMG>3195</LFIMG>
<MEINS>PCE</MEINS>
</E2E24>
- <E2ED20>
<KZ>E2EDL20</KZ>
<FIELD1>020</FIELD1>
<b> <VBELN>0083662648</VBELN></b>
</E2ED20>
- <E2E24>
<KZ>E2EDL24</KZ>
<FIELD2>020</FIELD2>
<POSNR>900011</POSNR>
<CHARG>1001450</CHARG>
<LFIMG>2946</LFIMG>
<MEINS>8PC</MEINS>
</E2E24>
- <E2ED20>
<KZ>E2EDL20</KZ>
<FIELD1>020</FIELD1>
<b> <VBELN>0083673936</VBELN></b> </E2ED20>
- <E2E24>
<KZ>E2EDL24</KZ>
<FIELD2>020</FIELD2>
<POSNR>900012</POSNR>
<CHARG>1073953</CHARG>
<LFIMG>2458</LFIMG>
<MEINS>PCE</MEINS>
</E2E24>
</ns:MT_MATNO_FILE>
<b>at target what required is</b>
<item>
<b><VBELN>0083662685</VBELN></b>
<POSNR>900001</POSNR>
</item>
<item>
<b><VBELN>0083662685</VBELN></b>
<POSNR>900002</POSNR>
</item>
<item>
<b><VBELN>0083662685</VBELN></b>
<POSNR>900003</POSNR>
</item>
<item>
<b><VBELN>0083662685</VBELN></b>
<POSNR>900004</POSNR>
</item>
<item>
<b><VBELN>0083662648</VBELN></b>
<POSNR>900011</POSNR>
</item>
<item>
<b><VBELN>0083673936</VBELN></b>
<POSNR>900012</POSNR>
</item>
in Sender FCC
E2ED20.fieldFixedLengths 7,76
E2ED20.fieldNames KZ,VBELN
E2ED20.keyFieldValue E1EDL20
E2ED20.endSeparator 'nl'
E2E24.fieldFixedLengths 7,24,13,7,3
E2E24.keyFieldValue E1EDL24
E2E24.fieldNames KZ,POSNR,CHARG,LFIMG,MEINS
E2E24.endSeparator 'nl'
ignoreRecordsetName true
source file is already there...
Message was edited by:
ashutosh rawat -
Multiple Exclusion Criteria[Exclusion Mask] in Sender File Adapter
Hello All,
I have a requirement to specify multiple exclusion criteria in the 'Exclusion Mask' property of a Sender File Adapter, i.e. I need to pick up files that correspond to 111*.txt from a specified source directory, but I would also want to exclude specific individual files that go by the following names:-111ACC.txt, 111INV.txt & 111PUR.txt.
I have tried the following - Specified 111*.txt in the 'File Name' field and in the 'Exclusion Mask' field specified ACC, INV & PUR - the exclusion criteria separated by commas. But this does not seem to work. All the 111* files are getting picked up.
Have gone through a couple of weblogs that deal with exclusion masks, but they do not talk about multiple exclusion criteria.
Is there any other way I could accomplish this?
Thanks,
AnandHi,
Try this config.
Give *.txt in filename. and Directory as <YourDir>
In exclusion mask give 111ACC.txt
Below this there will be a table. Add two Entries
Dont add anything to FilenameMask.
Directory ->FileNameMask--->ExclusionMask
<yourDir>->--->111INV.txt
<YourDir>->--->111PUR.txt
Try this and get back.
Regards,
Sudharshan
Message was edited by:
Sudharshan Aravamudan -
Errro when referring a Bean in Sender file adapter
Hi
I have created a sample code and deployed in the server and when i refer that in the sender file adapter module processor using the naming format
localejbs/sap.com/com.vas.mod/GetFileNameBean
where
com.vas.mod is the EAR Project name
GetFileNameBean is the Bean name
I am getting the erro in the XI Adaptor monitor as follows
<b>- 2006-07-31 13:06:51 UTC: Error: NameNotFoundException: Path to object does not exist at com.vas.mod, the whole lookup name is localejbs/sap.com/com.vas.mod/GetFileName.</b>
I checked theJNDI name in the server it is exactly the same.
can some one help me on this please?
vasagam R KHi Vasagam,
Please check these threads..
They deal with ur question...
NameNotFoundException during JNDI lookup for Deployable WebService Proxy
Strange Lookup Error (SAP Resource Adapter)
cheers,
Prashanth
P.S Please mark helpful answers
Maybe you are looking for
-
Adding 5 mins to a form field, in a library
Hi guys, Im having a bit of trouble and would really appreciate some help. I have a date field in my form (date.start_time) in which I want to reference in a library and add 5 mins to the time (since its in the lib I am coding this I need to use nam
-
Hi Guys, I'm gettig below error while importing the request.I have checked info objects and DSO's in source and target systems all were in active version.Please give your inputs why i'm getting like this. InfoObject ZEMC_FRSC is not available in ver
-
Back to My Mac - can't figure out NAT stuff
So I'm far from technical...I just can't figure out how to get Back To My Mac (BTMM) to work. I am setting this up from home now... I have walked through the BTMM manual: I start in AirPort Utility and select my Base Station. To be able to see the "I
-
Occasionally I have noticed that the menu bar appears a hard to read gray. This seems to occur after a visit to accuweaher.com.. It is reproducible even though both the foreground and background menu bars for the desktop are set to black.
-
Hi all! I receive an XML string that contains a CDATASection with a complete XML-Structure inside. What do I have to do to preserve that CDATASection in the XML tree I build out of it to avoid output-escaping on other parsing actions? At the moment t