Sorting incoming files based on payload content

Hi,
  I have a file>XI-> FILE scenario...I need to sort the incoming file based on payload content...But my understanding is in XI each line item would be processed one at a time...Is it possible to sort the entire file before beginning to process???
-Ken

Hi Ken,
you can try to create generic content sorting with java mapping:
/people/ravikumar.allampallam/blog/2005/06/24/convert-any-flat-file-to-any-idoc-java-mapping
Regards,
michal

Similar Messages

  • Auto sort incoming email based on message content and subject

    I am trying to do what it says above. I have created a smart mailbox and that will put on copy of the message in the mailbox and one in my inbox. How can I do it so it will be automatically added to that mailbox instead of my inbox?
    Thanks,
    Daniel

    don't use a smart mailbox for this. a smart mailbox is not a real mailbox. it's a saved search and doesn't move messages anywhere. make a regular mailbox and make a mail rule that moves incoming messages to that mailbox based on criteria you want.

  • Sorting Incoming Files??

    http://lifehacker.com/5099883/download-mover-automatically-sorts-incoming-files
    Is it possible to do this on a Macbook?? I have tried smart folders, but I am trying to be able to download in firefox or safari and only mp3 files are moved to a designated folder and opened by itunes.
    Any Tips??

    Thanks...I checked both sites for something like an auto sorter for music and possibly even other file types. But no luck..Still open to suggestions.

  • Help renaming pdf files based on internal content

    I work for a company that has thousands of E-tickets coming in daily, weekly, monthly, etc..
    These tickets come in bafhakfbaifh.pdf and we have to manually rename them or print them all out and then sort through them and put them in order.
    What I would like to do is:
    1. Split any pdf's that have more than one page or "ticket" in my case. I know how to do this with automator easily, but I'd love to keep it all in one program.
    2. Search the file for Event Name (i.e. Madonna)
    3. Search the file for Date of event (August 12, 2012)
    4. Search the file for Section, Row, Seat (124 3 12)
    5. Rename the file based on content found (Madonna August 12 2012 124 3 12.pdf)
    6. Move from original download folder to organized folders based on artist/team.
    7. Automatically print in alphabetical or some sort of designated order.
    Any help is muchly appreciated. So far, I found a PC program called A-PDF rename, but it is not automated enough to be practical. Hazel is awesome at OCRing the pdf and moving from folder to folder, but does not do enough.
    Any help is muchly appreciated.
    Thank you.

    You're looking for a PDF Parser or PDF miner tool (PDFminer) as a starting framework, and you'll almost certainly be writing custom code around that as parsing a text file that's effectively free-form and originating from multiple different sources almost always (always?) involves writing customized processing code and an on-going series of tweaks as the suppliers of the PDF change their ticket formats.  (Even apparently-simple details such as the time and date formats, for instance, can vary by geography and language and by supplier, and can derail common processing.)
    In some cases that I can envision, it'd be entirely possible that the data you're after is actually located in an embedded image and not in text that can be parsed.
    The best approach is to get folks to send you JSON or XML or some other format intended for interchange, and avoid the whole mess that is parsing or mining a printer-oriented format.
    The other obvious option is to use something like Amazon's Mechanical Turk or some other explicitly outsourced help.  Depending on how often the formats change and how many of these PDF files you're dealing with and how varied the formats are, sometimes throwing staff at the problem can be the most cost-effective approach.

  • HowTo Rename file based on message content?

    Hi All,
    Newbie here.
    I have an message which i'm pushing out to a file via a File eWay.
    I need to name\rename the file based on the ID of the message.
    What is the best way to do this?
    Thanks,
    Ken

    I'm not aware of a way to do this via the File eWay, which is very limited in functionality. Of course, you could do it with standard java.io but that isn't very Java EE. So, I typically use the Batch eWay (Batch Local File) where more robust capabilities such as this are quite easy using the dynamic configuration features.

  • File Adapter: Name of file based on payload

    Hi everybody!
    In my scenario I need to create a file whose name is based on a field in the payload. I. e. the payload concerns production order 123456 and the resulting file should be named "123456.txt".
    How can I do that?
    Regards, Joerg

    HI
    That means your file name would be decided at run time . so u can use adapter specific mesage attributes in ur communication channel
    please refer tto the same here
    /people/william.li/blog/2006/04/18/dynamic-configuration-of-some-communication-channel-parameters-using-message-mapping
    Dynamic File Name Part 1
    /people/jayakrishnan.nair/blog/2005/06/20/dynamic-file-name-using-xi-30-sp12-part--i
    Dynamic File Name Part 2
    /people/jayakrishnan.nair/blog/2005/06/28/dynamic-file-namexslt-mapping-with-java-enhancement-using-xi-30-sp12-part-ii

  • Sort incoming files?

    Is it possible to have files from different devices automatically sent to different folders?
    Like, I have my phone, and my camera sending paired with my iMac, and I'd like to send files from my camera straight to pictures automatically, and files from my phone to downloads. Is that possible at all? Would I need to download a new app, and does such an app exist?
    Cheers.

    Welcome to the Apple Discussions, GameFreak7744
    Is it possible to have files from different devices automatically sent to different folders?
    Yes
    Like, I have my phone, and my camera sending paired with my iMac,
    and I'd like to send files from my camera straight to pictures automatically,
    and files from my phone to downloads.
    The *sending paired with my iMac* is a little vague. !http://discussions.apple.com/images/emoticons/confused.gif! Did you mean paired with Bluetooth?
    *straight to pictures* ? !http://discussions.apple.com/images/emoticons/confused.gif! Do you mean the Pictures Folder?
    Is that possible at all?
    Yes
    Would I need to download a new app, and does such an app exist?
    No download is required (or needed) because you own a Mac
    I could explain how to do this but first I have a question for you! Do YOU want to KNOW or do YOU want to LEARN how to do *Mac Stuff* ? !http://discussions.apple.com/images/emoticons/cool.gif!
    Unlike Windows, you Mac has the ability to HELP you LEARN as you go 'Mac Help' is available from the 'Desktop's Finder' and in EVERY Application or Utility that 'MAC OS X' has!
    If you've got a question, just ask 'Mac Help' for the answer. In a few days you'll spend more time *LEARNING How You Can* and less time *NOT KNOWING If You Can*
    !http://discussions.apple.com/images/emoticons/love.gif!
    To start 'Mac Help' 'Double-Click' the 'Finder Icon' from the 'Dock' at the bottom. Then 'Click' on 'Help' on the 'Top Menu Bar'. 'Click' in the 'Search' field and type in 'bluetooth' and then press 'Enter/Return'. 'Click' on 'Show All Results' and start READING!
    Later ... Buzz
    !http://homepage.mac.com/buzzlightgear/.Pictures/HomePage/Buzz.tiff!

  • Duplicate checking based on the content of the incoming file

    Hi,
    We have a requirement where in we have to check whether a file has been duplicated or not based on the contents of an incoming file.The threads which I have seen in SDN deal with the duplicate checking based on the filename of the incoming file.
    The incoming file has the following structure :
    Recordset                                     Occurance-1
           |....... Idoc                              Occurance 1...unbounded
                       |...... segment             Occurance 1
    We are required to make a check based on certain fields which occur in the segment.There are about 4 fields which we will have to take from the incoming file and carry out the check.These 4 fields exist in different segments.We will have to update a ztable with these 4 fields and then perform an rfc lookup to check for the contents of the incoming files with this table,and reject or process the file based on whether the entries exist in the table or not.
    Please let me know if there is any way this can be achieved.
    Appreciate if anyone could help me on this.
    Thanks and Regards,
    Induja

    SAP PI 7.1 Mapping Enhancements Series: Graphical Support for JDBC and RFC Lookups
    Use this crazy piece for any RFC Mapping Lookups!
    The specified item was not found.
    https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/5877---- [original link is broken] [original link is broken] [original link is broken]
    Imp
    SAP NetWeaver Process Integration 7.1: Mapping Enhancements Blog Series
    SAP PI 7.1 Mapping Enhancements Series: Mapping Enhancements Demo
    /people/siva.maranani/blog/2005/08/23/lookup146s-in-xi-made-simpler
    How to check JDBC SQL Query Syntax and verify the query results inside a User Defined Function of the  Lookup API
    The specified item was not found.
    The specified item was not found.
    Making CSV File Lookup Possible In SAP XI !!!
    SAP PI 7.1 Mapping Enhancements Series: Parameterized Message Mappings
    https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/1888-----Imp [original link is broken] [original link is broken] [original link is broken]
    Triggering XI Alerts from a User Defined Function
    Aspirant to learn SAP XI...You won the Jackpot if you read this!-Part II

  • I need to sort the incoming file contents before message mapping

    Hi All,
      I have requirement like i have to sort the file contents before message mapping in Xi. is there any option please suggest me with your value information.i dont want to sort in message mapping before that i want file contents to be sorted order.waiting for your quick reply.
    Thanks,
    seshagiri

    Hi,
    You can do this in one scenario.
    Lets say you have MT_Source and MT_Target as two message types.
    Now your MM1 will be between MT_Source & MT_Source, that is same message type. Here you built your sorting logic.
    Now create MM2, between MT_Source & MT_Target. Here your actual mapping logic will be implemented. The input payload for MM2 will be sorted data.
    Now in operation mapping, first call MM1 and then call MM2 (You have a plus + sign to add multiple mapping programs). Due to this sequence, at run time first MM1 will be executed and after that its oupt will be given to MM2 as source payload.
    Hope its clear. Plz let me know if you have any doubts.
    -Gouri

  • SAP PI 7.3.1 File Adapter - Select file based on content

    Hi all,
    I have a scenario where I need to process a file differently based on the content within the payload.
    For example a file called File_IS,xml is sent to a folder that PI is polling. Within this file is a field <TYPE> which I want to use to determine whether the file should be used  . I have two mapping scenarios that each have a file sender communication channel polling for the same file name "File_IS.xml" .  This is because a message will come from a 3rd party with the same file name but the content can be different meaning different mapping scenarios are required.  IF Com_Channel_1 sees the File I only want it to be picked up if say <TYPE> = 'A' - if not then Com_Channel_1 should do nothing with this file.  Similarly Com_Channel_2 should only use the file if <Type> = 'B'. 
    Scenario:
    File_IS.xml       -> File sender 1  -> <TYPE> = 'A'  - Pick up file - do mapping - archive.  <TYPE> <> 'A' - do nothing and leave file in folder
                          ->  File sender 2  -> <TYPE> = 'B'  - Pick up file - do mapping - archive.  <TYPE> <> 'B' - do nothing and leave file in folder
    Is the above possible at all ?
    Thanks for your time.
    Best Regards.
    Gary

    Hello,
    In case content of input files are different (for both the scenarios) even then also u can use one file sender channel. Check below approach:
    Interface Determination condition
    Thanks
    Amit Srivastava

  • Help on how to read the content of an XML file from the payload

    I have a receiver channel / mail adapter, that sends e-mails with a XML attachment.
    I’m trying to write a Bean, that should make it possible to rename the attached XML file dynamically.
    In the Bean I want to read the content of the attached XML file, it could be the “order number”.
    The filename should then be “Order number”.XML.
    <u><i>Can anyone help me with how to read the content of the XML file from the payload.</i></u>
    <i><b>Frank</b></i>

    hi,
    check this: http://jakarta.apache.org/poi/

  • Can we control the PDF file name that is generated by BI Publisher based on the content in the input PDF

    can we control the PDF file name that is generated by BI Publisher based on the content in the input PDF?

    No, there isn't. The way you're using the file is not recommended. You
    should use a review tracker to avoid getting in the way of one another.

  • Sorting the file in file content conversion.

    Hi all,
    we have a file(xml)-pi-file(flat file) scenario,
    where we need to sort the output file by employee id field.
    Where can we achieve the sorting of file by particular field.
    Do we have any option in Mapping(Functions) ??
    Any option is Reciever File Adapter??
    Reciever File content conversion??
    Any inputs will be of gr8 help.
    Regards.
    santosh.

    Hello,
    Where can we achieve the sorting of file by particular field.
    Do we have any option in Mapping(Functions) ??
    Yes, there is a function in message mapping called sort and sortByKey, these can be found under node functions. To sort the ID, you can use this code
    ID --> removeContext --> sort:(ascending or descending) --> ID
    Use sortByKey to sort the additional details of the flatfile according to ID number e.g.
    ID --> removeContext --> sortByKey:(ascending or descending) --> IDDetails
    Details --> removeContext --> /
    Any option is Reciever File Adapter??
    Reciever File content conversion??
    The receiver file adapter with FCC only converts the structure that is defined in your target message type into, say for example a text file. You have to do the manipulations in the message mapping.
    Hope this helps,
    Mark

  • Splitting a file based on the payload field - multimapping

    HI Everyone,
    I have a requirement of splitting a file based on the field .
    e.g When I am a file as :
    row1  David    US
    row2  Cindra   US
    row3   Peeru   CA
    row4   Jay       CA
    Then, I have to split the file into two files, one file with the US rows and  another file with the CA rows.
    There can be many countries in the input file, so number of target files need to be generated is not fixed.
    I have gone through the below links :
    /people/jin.shin/blog/2006/02/07/multi-mapping-without-bpm--yes-it146s-possible   ( in the blog we know that there are two receivers but in my case I dont know that )
    https://bond.newellco.com/irj/scn/,DanaInfo=www.sdn.sap.com,SSL+thread?messageID=6449801#6449801
    ( Everyone is providing JAVA mapping as a solution....)
    Is Java mapping the only option to resolve the problem case I have ?
    Thx
    PEERU IN

    Hi Peeru,
    I don't have access to the any FTP or file server of XI to check the file adapter as i am travelling right now(I am 100% sure that the file adapter splitting will work as i have done this for one of my requirement).
    Coming to your requirement:
    I wrote an java map which will read the XML file and create the multiple recordset based on number of different country exists in the file, then i am printing the final structure in an multi mapping layout (please see the attached input file Country.xml and out put file which the java map generated Final.XML) if we do this i think the file adapter will create the different files based on the number of recordset we have as you can see the output file is generated with the 3 recordset (<Country>) tag each country tag has its own records, now if i give the filename in variable substuition pointing to region then i think i should get 3 files with names
    us.xml
    us01.xml
    us02.xml
    i think by using the multi mapping i can generate 3 files and by using the variable substution i can give the 3 different names from the payload of each file and also can add the timestamp for each of the file, again i didn't have access to the file adapter in the project i am working on so i couldn't verify in XI server, but if you still looking for solution then let me know i will give the map details.
    Input File: Country.xml
    <?xml version="1.0"?>
    <check>
         <order>
              <name>Nisar1</name>
              <region>US</region>
         </order>
         <order>
              <name>Nisar2</name>
              <region>US</region>
         </order>
         <order>
              <name>Nisar3</name>
              <region>US</region>
         </order>
         <order>
              <name>Nisar4</name>
              <region>US01</region>
         </order>
         <order>
              <name>Nisar5</name>
              <region>US01</region>
         </order>
         <order>
              <name>Nisar6</name>
              <region>US01</region>
         </order>
         <order>
              <name>Nisar7</name>
              <region>US</region>
         </order>
           <order>
              <name>Nisar8</name>
              <region>US</region>
         </order>
           <order>
              <name>Nisar8</name>
              <region>US02</region>
         </order>
    </check>
    Output File : Final.XML
    <ns0:Messages xmlns:ns0="http://sap.com/xi/XI/SplitAndMerge">
         <ns0:Message1>
              <country>
                   <Order>
                        <name>Nisar1</name>
                        <region>US</region>
                   </Order>
                   <Order>
                        <name>Nisar2</name>
                        <region>US</region>
                   </Order>
                   <Order>
                        <name>Nisar3</name>
                        <region>US</region>
                   </Order>
                   <Order>
                        <name>Nisar7</name>
                        <region>US</region>
                   </Order>
                   <Order>
                        <name>Nisar8</name>
                        <region>US</region>
                   </Order>
              </country>
              <country>
                   <Order>
                        <name>Nisar4</name>
                        <region>US01</region>
                   </Order>
                   <Order>
                        <name>Nisar5</name>
                        <region>US01</region>
                   </Order>
                   <Order>
                        <name>Nisar6</name>
                        <region>US01</region>
                   </Order>
              </country>
              <country>
                   <Order>
                        <name>Nisar8</name>
                        <region>US02</region>
                   </Order>
              </country>
         </ns0:Message1>
    </ns0:Messages>
    regards
    Nisar Khan

  • Block and Unblock the .zip and .rar files based on doamin or user account base on incoming mails with ironport email security.

    Hi All,
    Request you all to help me out in blocking/dropping only the attachments with the extension .rar and .zip in incoming mails for particular users or domains.
    as of now I have did for all the domains or users.However, I want to unblock it only for some particular/specific users and for rest it should block.
    kindly help me with the steps to do the configuration.
    Thanks a ton in advance
    Regards,
    LRN

    It sounds like you just need to use different incoming mail policies per group of individuals you want to block/drop .rar and .zip and those which you don't want this to happen.
    The fact that you want a specific group to be allowed receipt of these and everyone else should have these blocked I would recommend creating an additional incoming mail policy that does NOT have a content filter that performs this blocking.  Add the appropriate users to this incoming mail policy.  Then create a incoming content filter that does this dropping of .rar and .zip files and apply this to the Default Incoming Mail Policy.
    The content filter in this situation would not need a condition, just a action of strip attachments by file info , filename contains  .rar or .zip
    Here is a useful regex for the content filter action:  (?i)\.(zip|rar)
    Hope this helps!
    Steve

Maybe you are looking for