File adapter..strange requirement..is it possible in XI?

Hi Guys,
I have searched sdn a lot..but have nt seen this kinda requirement before..
sender fie adapter files will be compare two files in a prticular folder  by say field1 and the differences between the two files is 'x'. If the delta > 30% of the total ,and the date difference between the 2 files is less than 3 days then the new file will be treated as incorrect and  then correct one will be procseeed...
Is thi possible in XI?...
Pls throw in ur thoughts on this
Regards

Ibrahim,
Yes it is a strange requirement. Well we can compare the files in java. See this code:
http://blog.taragana.com/index.php/archive/java-program-compare-two-text-files/
It compares and gives the difference in between the files. But since you want the percentage > 30 I dont think we can do either in java. For getting percentages probably a reporting tool can help you.
Your second option also you can achieve it in java. So if you come up with some logic which indicates the percentage then your requirement can be done using java.
Regards,
---Satish

Similar Messages

  • File Adapter help required.

    Hi All,
    My scenario:
    I have source txt file that is seperated by semicolon.
    I need to do Receiver determination that for some value it shoud go to Receiver A and for other value it
    should go to Receiver B.
    File that is reaching Receiver A and Receiver B should be again txt in nature.
    What can be solution for this?
    Regards

    Hi Anand
    So the approach will be:
    1. Sender File Adapter (File content coversion) -- from txt file to xml file
    2. Rec Determination --- for different Receivers
    3. Receiver File Adapter (File content coversion) -- from xml file to txt file
    Am I correct?
    Do you have blogs for this
    Regards

  • Additional file in File adapter

    Hi,
    I have two File scenario inbound and outbound.
    Outbound:
    In this scenario we are sending a File using File Adapter.Our requirement is we have to count number of data records and then write the number of records in other file.We won't be writing number of total records in same data file but other file which will have only value for  total number of records and the extension of this file will be different.
    Inbound:
    In Inbound we have two file one with data and other with total number of records in first file.We need to pick both files and then validate in sap  that total number of records from first file is equal to value in the second file.
    Can we achieve this without using BPM?If yes please let me know all steps required.
    If we have to use BPM then how  much file size  can BPM handle.Any one has some experience using BPM for large files.
    Thanks in advance.
    Rekha.

    Hi Rekha,
    you can realize the outbound scenario without BPM with a message split : <a href="/people/jin.shin/blog/2006/02/07/multi-mapping-without-bpm--yes-it146s-possible without BPM - Yes, it’s possible!</a>
    The inbound scenario can be done with a <a href="/people/alessandro.guarneri/blog/2006/03/27/sap-xi-lookup-api-the-killer.
    BPM should be able to handle large files. It is only slow. So if you have to much of large files it can be a problem. The bottle neck for large files is assumedly the mapping. Depending on mapping content, hardware and kind of mapping in this sequence files of 40 - 200 MB should be mappable (appreciated).
    Regards,
    Udo

  • File Adapter (UNIX) to Windows Share

    Hi,
    I am still quite confused how SAP can call this a File Adapter until it is not possible to use the most common transfer method: UNC Paths
    When I start thinking about this I am getting sick, but ok.
    So I want to send a file from anywere to a Windows Share, which in general should not be that difficult. Again, this is one of the most used scenarios and this is not supported by SAP because my XI is on Unix. The possible solutions I found are:
    1) Samba
    2) Mount
    3) FTP Adapter
    For me Mount is no possible because I do have a WAN in between and this connection would be too vulnerable, FTP not as well because there is no FTP Server where I want to go.
    Does anyone of you use a script called from the file adapter which transfers the file via Samba? Any experience with that?
    BR Markus

    You can as well use a J2SE adapter to perform the requirement using XI. I am not sure if you have tried that option.

  • File Adapter is not picking few files

    Hi All,
    I am facing some issue in file adapter. Below are the possible file format that we need to pick.
    File format sample 1:
    865|FieldOrder|AK|620005168|1|Reject|Line Qty can not be Canceled,xyz,abc|The line has been shipped,fgh,hjk
    File format sample 2:
    865|FieldOrder|AK|570000259|10|Accept|
    - All the fields are separated by '|' & last filed is terminated by 'eol'.
    - The last two fields (C7 & C8) also have sub fields separted by ',' as shown in sample 1.
    - Fields C7 & C8 are optional. (Sample 2 is shown above)
    - File contains only one record.
    We are using below mentioned XSD which is working fine in case of sample 1 as shown above. When we have a file of format like sample 2 then file adapter is failing to pick the file. I also tried minoccur='0' attribute which also not worked. Please help me out to find the exact XSD which will pick both type of formats (sample 1& sample2).
    <?xml version="1.0" encoding="UTF-8" ?>
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:nxsd="http://xmlns.oracle.com/pcbpel/nxsd"
    targetNamespace="http://us.fujitsu.com/865_EDIFile"
    xmlns:tns="http://us.fujitsu.com/865_EDIFile"
    elementFormDefault="qualified" attributeFormDefault="unqualified"
    nxsd:encoding="ASCII" nxsd:stream="chars" nxsd:version="NXSD">
    <xsd:element name="Root-Element">
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element name="Root" minOccurs="1" maxOccurs="unbounded">
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element name="C1" type="xsd:string" nxsd:style="terminated"
    nxsd:terminatedBy="|" nxsd:quotedBy='"'></xsd:element>
    <xsd:element name="C2" type="xsd:string" nxsd:style="terminated"
    nxsd:terminatedBy="|" nxsd:quotedBy='"'></xsd:element>
    <xsd:element name="C3" type="xsd:string" nxsd:style="terminated"
    nxsd:terminatedBy="|" nxsd:quotedBy='"'></xsd:element>
    <xsd:element name="C4" type="xsd:string" nxsd:style="terminated"
    nxsd:terminatedBy="|" nxsd:quotedBy='"'></xsd:element>
    <xsd:element name="C5" type="xsd:string" nxsd:style="terminated"
    nxsd:terminatedBy="|" nxsd:quotedBy='"'></xsd:element>
    <xsd:element name="C6" type="xsd:string" nxsd:style="terminated"
    nxsd:terminatedBy="|" nxsd:quotedBy='"'></xsd:element>
    <xsd:element name="C7">
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element name="C7_child" type="xsd:string"
    nxsd:style="array" nxsd:cellSeparatedBy=","
    nxsd:arrayTerminatedBy="|"
    maxOccurs="unbounded"></xsd:element>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    <xsd:element name="C8">
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element name="C8_child" type="xsd:string"
    nxsd:style="array" nxsd:cellSeparatedBy=","
    nxsd:arrayTerminatedBy="${eol}"
    maxOccurs="unbounded"></xsd:element>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    </xsd:schema>
    <!--NXSDWIZ:C:\Documents and Settings\rastogvi\Desktop\cap.txt:-->
    <!--USE-HEADER:false:-->

    Hi,
    >>2) Even for those few picked files, why are we seeing less no. of Idocs
    than the file contents.
    Check the mapping by using the payload from SXMB_MONI. I think the mapping is not correct.
    >>3) Why is the adapter always picking files immediately even if a poll
    interval is set.
    Once the objects are activated in ID the channel picks the file immediately and then it waits for the polling interval and repeats the process.
    Regards,
    Jai Shankar

  • Passing file name dynamically to the file adapter

    Hi All,
    I'm using a file adapter to create a file from the XML message after mapping in XI. The file name is given in the file adapter configuration. Is it possible to have the file name as a part of the message and pass it to the file adapter dynamically? Or is it possible to have the file name in some variable or something in XI (like a BPM variable) and pass it to the adapter for every message?
    Does someone have any idea?
    Thanks,
    Sandeep

    Hi Sandeep,
    This is possible.
    For creating filenames dynamically for your sender, you will have to crate a variable name ( eg: %VAR%) as you file name and then you will have to give the name of your file under variable substitution. Just check this link for more info,
    http://help.sap.com/saphelp_nw04/helpdata/en/14/80243b4a66ae0ce10000000a11402f/frameset.htm
    In the case of receiver file adapaters, you have 5 options for file creation like,
    1.Create
    2.Append
    3. Add time stamp
    4.Add Counter
    5. Add Message ID
    You can choose any of these options or you can do it dynamically from you payload. Just check out this help link for more info,
    http://help.sap.com/saphelp_nw04/helpdata/en/14/80243b4a66ae0ce10000000a11402f/frameset.htm
    Hope this helps

  • FCC:Receiver File Adapter

    Hi
    This is regarding  a FCC in receiver File Adapter
    My requirement is as follows :
    I have the following source structure
    DT_Source                                                                               
    Structure                                                                               
    Field 1                                                                               
    Field 2                                                                               
    Field 3                                                                               
    The target file to be created will contain all the 3 fields mapped directly from the source.
    but in additional to these 3 fields it will also contain 3 constants ..which aren't coming from the source.
    Do I need to include that in the Target data type and map them as constant values in the mapping or can the addition of constant values be taken care of in the File Content conversion ?
    thanks
    Dev

    Thanks Shabarish
    So you mean once i get a sample file , according to the blank spaces in the resultant i should have a corresponding field in my  target Message type and map it toa constant white spaces ??
    ok  I have one last  question 
    Can the FIle(on the receiver side ) be a mix of values which are fixed as well as variable lenghs ??
    i.e
    a typical line item in the file will be like this
    Field1,Field2,Constant1,       ,Constant2,Field3,      ,Constant3,Field4,Constant4
    where Field1 and Field3 are fixed length fields with the constants and field 4 and field5 are of variable lengths ????
    thanks
    Dev

  • ESB file adapter on shared directory

    Hi
    I am trying to use file adapter on a mapped network drive, windows machine.
    I am getting this error:
    ORABPEL-11001
    Invalid Input Directory.
    The value specified for the input (Physical/Logical)Directory activation parameter has an invalid value "O:\BCRSignatures"
    Ensure that the following conditions are satisfied for the input directory :
    1) It exists and is a directory (not a file). and
    2) It is readable (file read permissions). and
    3) If activation parameter "DeleteFile" is set to "true" then the directory should also have granted write permissions. and
    4) If using a logical name, then ensure that the mapping from logical name<->physical directory is correctly specified in the deployment descriptor
    The location is accesible for read and write within Windows.
    The error persists even with "no delete files after processing" and "no archive processed files", options.
    Any ideeas? Sugestions?
    Metalink is poor on this.
    Thank you,
    Liviu

    HI BPEL Gurus,
    Everytime i m facing ORABPEL-11001 Errors . I dont know why its coming.can u someone give suggestion to this regards. i attach the logs as follows
    <2007-11-23 09:53:29,825> <INFO> <dev.collaxa.cube.activation> <File Adapter::Inbound> Recovery still not possible after 151110 attempts due to ORABPEL-11001
    Invalid Input Directory.
    The value specified for the input (Physical/Logical)Directory activation parameter has an invalid value "D:\igefi\bpelinterfaces\mfond\dev\Wrk_Imp_Swap_Price\WORKDIRS\input".
    Ensure that the following conditions are satisfied for the input directory :
    1) It exists and is a directory (not a file). and
    2) It is readable (file read permissions). and
    3) If activation parameter "DeleteFile" is set to "true" then the directory should also have granted write permissions. and
    4) If using a logical name, then ensure that the mapping from logical name<->physical directory is correctly specified in the deployment descriptor.
    the above message i m getting in domain.log and opmn.log
    Regards
    Hameed

  • Two file adapter questions

    First, can someone post a URL for detailed file adapter documentation?
    Second, I'm a little confused how to use the file adapter in the case where I'm writing out a message whose schema is contained in one of the wsdl files instead of in an xsd file.
    The particular case is that I call the Google search service, which returns a message of type doGoogleSearchResponse. The schema for this message is embedded in the google.wsdl file from Google. When I browse in the file adapter wizard to choose a schema for the write operation, I can only see schema from my projectName.xsd file, none from the google.wsdl file (even though it's in the project). How can I use the file adapter to write out the Google search reply?
    Thanks,
    Bret

    Hmmm. Step 4 of the file adapter wizard requires me to specify a "Message Schema". There is no apparant way to get past that step without choosing one. Should I just choose any schema in the project and then go back and fix the code?
    Bret

  • Dynamic FTP Directory Address in File Adapter - is this possible?

    We have a customer who would like us to pick up a file via an FTP file adapter once per day. The problem is, they have a different directory each day containing the file. The directory name is of the form YYYY-MM-DD. The name of the file in the directory is always the same.
    Is it possible to dynamically calculate the Source Directory name in the FTP file adapter? If so, how?
    Kind Regards,
    Tony.

    >
    Dharamveer Gaur wrote:
    > Hi
    > Look this same thread:
    > Re: Dynamic folder name (when reading file in file adapter)
    Hi,
    All the examples I have seen are to configure the Receiver File Adapter, not the Sender File Adapter. I don't thinl I have seen one blog yet whereby the source directory of a Sender File Adapter has been dynamically configured. I wonder if it can be done because the sender file adapter does not have Variable Substitution possibilities for filenames and directories.
    So has anybody a link to a blog where this dynamic choice of a source directory has been done for a SENDER file adapter?
    BR,
    Tony.

  • My client requirements in File Adapter

    Can any one guide me for the following requirements.
    Case Studies - 1
    Assume that you are in a class room and there are 10 students in it. The instructor then asks each student to prepare his/her the following personal details and save them in an XML file. The details are as follows:
    Student ID
    Name
    Mobile
    Email
    Gender
      There will be 10 files and the files are named as cv_1,2,3….10. The files are saved into the source directory. For test purposes following directories are created: 
    Source directory:  c:\ibm\sap\training\input
    Archive directory: c:\ibm\sap\training\archive
    Error directory: c:\ibm\sap\training\error
    Target directory: c:\ibm\sap\training\target
    You are asked to develop scenarios in SAP PI which will read the source files from the source directory and write them to the target directory.  Once a file is successfully read from the source directory, it should be moved to the archive directory and if the file cannot be read for some error i.e. xml format not maintained, it should be moved to the error directory. The files moved to archive, error or target directory should have a time-stamp append to the file-name.
    i.e. filename+<time-stamp>.
    Lesson-1
    Prepare a scenario to read one single file i.e. file cv_1.xml from the source directory and write it to the target directory. The target file name should also be cv_1.xml with the time-stamp append to the name.
    Lesson-2
    Prepare a scenario to read all the files from the source directory and write them to the target directory. Similarly the target files should also be named as cv_1, 2 ..xml with the time-stamp append to each of them.
    Lesson-3
    The instructor then asks you all to add the following validation to the data.
    The mobile-number should have 10 numeric digits – if the mobile number is not of 10 digit then replace it with ‘error’
    The email should have one ‘@’ character and one ‘.’ character – if the email is not having the ‘@’ or ‘.’ character, then replace it with ‘error’
    Before you run the scenario, in some of the source files, modify the mobile and the email so that they are in error as per the logic given above.
    Lesson-4
    Prepare a scenario to read all the source files and classify them according to their gender. The files for the men will be written in one directory and for the ladies to another directory. Two directories are created for the above purpose:
    Target directory for men: c:\ibm\sap\training\target\men
    Target directory for women: c:\ibm\sap\training\target\women
    Suppose there are 6 men and 4 women in the class, then if all the source files are read successfully then the target directory for men should have 6 files and the target directory for women should have 4 files.
    Case Studies - 2
    The instructor then asks you all to prepare one single file with the personal details of each student in separate segments.
    Lesson-5
    Write a scenario which will read this file and produces 10 target files where each file should correspond to the personal data of each employee. The target files should be named as cv_<emp_ID>_<timestamp>
    Lesson-6
    Modify the above scenario so that it produces 2 target files instead of 10 where one target file for men and another target file for the ladies. The target file for men should have 6 segments for 6 men and the target file for ladies should have 4 segments for 4 women.
    The target files should be named as
    For men – men_<time-stamp>
    For Ladies – women_<time_stamp>
    Case Study -3
    Same as case study – 1, the instructor ask each student to prepare his/her the personal details and save them in an XML file. There will be 10 files. The files are saved in the source directory.
    Lesson-7
    Prepare a scenario to read all the source files from the source directory and to create one single file in the target directory. The name of the target file will be output.xml with the time stamp append to the file-name. The target file will have all the details of each source file as sub-segment.
    Lesson-8
    Prepare a scenario to read the entire source files from the source directory and create two files in the target directory – one for the men and the other for the ladies. For 6 men, the men file should have six segments having each man’s details and for 4 women, similarly there should be 4 segments with each lady’s details.
    Case Study - 4
    The instructor now asks each of the students to prepare another set of details which will consist of his/her the following academic details:
    Student ID
    School Name
    College Name
    Department Name
    Admission Year
    There will be 10 files and the files are named as ad_1, 2, 3….10. The files are saved into the source directory. So each student will now have a pair of files – one for the personal details and the other for the academic details. Two files are co-related with the Student ID. The input directory now consists of 10 personal files and 10 academic files.
    Lesson - 9
    You are asked to develop a scenario which will pick the source files and will process them in pair. The scenario will generate 10 target files. Each target file will consist of the personal and academic details of a student in separate segments. The target files will be named as res_1, 2, 10.
    The target files will look like:
    Lesson – 10
    You are then asked to change the student ID in some of the files so that they do not have a matching academic or personal files and vice-versa. The scenario should run and if it found any files who does not have a matching corresponding file then the process should end after some period of time i.e. 2 min and those files will be moved to the error directory and there will be no corresponding target files for them.

    Hi
    These are the exercise mentioned in the blog
    http://scn.sap.com/docs/DOC-41766
    In SCN , you will find many blogs on file adapter. Go through them, you will be able to do it by yourself.
    If you stuck somewhere, then post the problem, we will be happy to help you.

  • External OS command script in file adapter - return value check possible?

    Is it possible to check return value of external OS script execution which is called in the file adapter? We want to see the result in the adapter monitoring. The documentation says: "Message processing is independent of any errors that occur during the execution of a configured operating system command."

    Hi Sanjay ,
    Seems possible : Try this :
    /people/michal.krawczyk2/blog/2005/08/17/xi-operation-system-command--error-catching
    Regards ,

  • Is it possible to read the file using File Adapter which is in client machi

    Is it possible to read the file using file Adapter which is in client machine(on the same network).Then what is thee need of FTP Adapter?

    You can achieve that by exposing your client machine as a drive, then you can go using file adapter.
    FTP adapter will help you to communicate with different machine which is in different network.
    It is considered good etiquette to reward answerers with points (as "helpful" - 5 pts - or "correct" - 10pts).
    Thanks,
    Vijay

  • Typical Requirement in File Adapter

    Hi All,
              My scenario is File to Proxy.
    Now scenario to pick up the File (at sender) is like this:
    There is a file pick up from FTP Server daily. We will have two files on FTP server.First file is a blank file , which we call a FLAG File. Second file is DATA File containing required data to update in SAP.
    Its a conditional File pick up:
    1. If FLAG File (Blank) is present on FTP Server then pick up the data file and delete Flag File.
    else
    2.If FLAG File is not present on FTP server, dont pick up the DATA File and stop Processing.
    Please suggest some good solution to achieve the same using File Adapter.
    Also suggest, if same can be customised through Run Operating System before\after message processing.
    Please help.Its Urgent..
    Thanks,
    Anurag

    Suggestion 1: You need a BPM for this. Poll for the flag file and if present it gets into BPM. Inside the BPM check the content of the file. Remember only with latest SP you get the option to generate a message for an empty file. Use a conditional branch and proceed with the rest of the processing. You can use a dummy correlation.
    Suggestion 2: Use scripts and schedule this at OS level (independent of XI). In the script file do the vaildation of checking the flag file and if the validation is ucess move the data file to the foolder FIle adapter keeps polling.
    Regards,
    Jaishankar

  • Possible Scenarios where we can use OS command of file adapter

    Hi all,
    I would like to know the possible scenarios in which we can use the OS command feature in file adapter,I have tried zipping the file,copying the file,unzipping the file using this option.Any other inputs on this feature are appreciated.
    Thanks,
    Amit

    Hi,
    Executing Unix shell script using Operating System Command in XI                         
    Executing Unix shell script using Operating System Command in XI                              
    Performing FTP Commands From ABAP                              
    Performing FTP Commands From ABAP                              
    Thanks,
    Madhu

Maybe you are looking for

  • How to implement a page level validation !!

    Hello , I want to implement page level validation. thanks Edited by: kumar73 on Apr 21, 2010 1:41 PM

  • The web part references an untrusted xsl file

    i have created a custom ItemXSL in my sharepoint 2013 root site (style library>xsl style sheets) in th subsite i have exported a content query webpart and changed the itemxsllink property and specified the path starting from my root site eg: /roots

  • Database control url

    Hy, i have installed oracle 10g release 2 and I try to connect to database contro with url http://tlvrg4:1158/em but when i submit recive this message (in all browser) The page cannot be displayed Why? How can I solve this problem? I try to lanch tns

  • Not seeing the 3d menu in Photoshop CC

    Hello everyone, I just installed 64bit version of Photoshop CC on my Dell Inspiron with 1GB gforce 525m graphics chip running Windoes 8 Pro 64bit. The trouble is that i don't see the 3d menu. If go to the performance tab in the preferences, i can see

  • How to keep the chronological order of photos while working on photobook?

    My photos are chronologically organized in an album. However, when I chose the album to work on the photo book, they were all mixed up in the sidebar.  How can I maintain the chronological order in the sidebar photos as I work on the book?