File-Sender: Verification of file content during file content conversion

Hello,
I have a question regarding „file verification“ when using the file-sender adapter.
I got a flat file (.csv) that I convert into XML with the file-sender adapter and file-content-conversion.
In the file there is a column “RecTyp” that is my KeyFieldValue. Possible values for RecTyp are “B”, “D”, “U”, “T”.
So far so good. All this works perfectly.
If (due to an error) there is another value in RecTyp than the 4 mentioned above (B;D;U;T) the file adapter ignores this row today. And here begins my issue:
I want to change this behavior. That means in detail, I want to check if there is another value in my KeyFieldValue “RecTyp” than specified. If this is the case an exception should be thrown. The whole message should not be delivered.
We had the idea to use the module-processor for this verification….
But may be there are other suggestions. Or may be some one can provide an appropriate module that is already written, etc….
Does anyone have an idea?
Kind regards,
Tobias

Hi,
It is better to pick the file in generic way i.e Row by Row and then go with the validation with the help of Adapter Modules or in the Mapping.
For more-
/people/sravya.talanki2/blog/2005/08/16/configuring-generic-sender-file-cc-adapter
Thanks,
Moorthy

Similar Messages

  • FILE SENDER ADAPTER -  TO GET A DINAMIC FILE NAME IN THE DIRECTORY

    Hi,
         Please help me.
         I have to read by a file sender adapter a specific file in the directory that its name is Dyyyymmdd, where yyyymmdd is variable according with the current day:
         D      - fixed letter
         yymmdd - year,month and day of the current day.
         I cant´t use D* in the File Name Scheme because I must read only the one file generated in the day.
         How can I configure my file sender adapter to read this especific file in the directory?
          Thanks in advance.
          Mider.

    Hi Krishna,
        I must access only one file by time ( of the current day ), but in the directory I have a lot of them of different dates. I mean, in the of the read ( in the adapter configuration ) , I need to configure the name of the file Dyyyymmdd before of the reading in the directory, in other words, I need to construct the name of file (withe the current date) before the communication channel access the file to read it.
        I think that OS command just can be applicated in file receivers, but if possible, at your purpose, how can I access the name of this especific file via OS command for senders?
        Thanks,
             Mider.
    Message was edited by: Midervilson  Andrade
    Message was edited by: Midervilson  Andrade

  • FILE SENDER COMMUNICATION CHANNEL DOESN'T GET FILE

    Hi,
    I have create a new sender communication channel with ftp file configuration. Server parameter and source directory are correct.
    I have also checked file and directory permission (chmod 777)
    Poll interval is 600 secs.
    There is no error in communication channel monitor  (returned log: CC is correctly configured and started).
    Process started every poll interval, but no file is picked up.
    Why?
    Carme

    Hi,
    What type of file are you processing. Check whether the file type is binary or text mode.
    Also check whether the file name you have specified in the CC and the exact file in the directory are the same.
    Also check the file processing mode, whether it is read only, delete or in test mode.
    If the file is in read only mode when the file first processed, then once the file was processed it would be in read only mode, so if you place the new file it should process, so try deleting the existing file in the directory and place a new file with exact file name along with the correct extension and try to process it.
    Also I would suggest you check the exact file extension, by unchecking the radio button in the folder option under the menu tools> Folder options> view-->hide extension for file type.
    Regards,
    Nithiyanandam

  • File Sender Adapter Skip first line in file

    Hello to all,
    I'm trying to read a file (nfs) using the file adapter.
    The szenario works fine, but I need to skip the first line in the txt file (header line)
    I tried parameter documentSkipFirstRows, without success.
    Any ideas?
    Regards Christian

    Hi Kaiser,
    May be the syntax problem.
    use like this...
    xml.documentSkipFirstRows     1
    Syntax is
    xml.documentSkipFirstRows=<noOfRows>
    for more info refer this link..
    http://saphelp.border-states.com/EN/0d/00453c91f37151e10000000a11402f/frameset.htm
    Verify this...
    Thanks.

  • File Sender Scenario - Mapping error message

    Hi All
    Scenario
    I am trying to develop a test scenario where a record is read from the file and sent to R/3 using RFC (Bapi)
    So i believe this will involve a file adapter as sender and a RFC adapter as receiver, I have configured data types, message types, message mapping, interface mappings, sender determination, receiver determination etc.
    Problem
    When i put the text file in the polling directory the file is read, but there is an error,
    On checking Processed XML message in SXMB_MONI I see that the following steps listed
    1 - Inbound message (CENTRAL)
    2 - Receiver Determination
    3 - Interface Determination
    4 - Receiver Grouping
    5 - Message Branch According to Receiver
    6 - Request Message Mapping
    7 - Request Message Mapping
    Step 1 - 6 does not show any error message, step 7 has an error with the following message
    <SAP:Category>Application</SAP:Category>
      <SAP:Code area="MAPPING">EXCEPTION_DURING_EXECUTE</SAP:Code>
      <SAP:P1>com/sap/xi/tf/_MM_basic_paycreate_file_to_rfc_map~</SAP:P1>
      <SAP:P2>com.sap.aii.utilxi.misc.api.BaseRuntimeException<;/SAP:P2>
      <SAP:P3>Fatal Error: com.sap.engine.lib.xml.parser.Parser~</SAP:P3>
    Additional Information
    My Business System Commnication channel has a Sender File adapter, this file sender is configured to read from file system from a certain directory and message protocol is File Content Conversion.
    In Content Conversion parameters input fieldname and input separator are configured (does anything else need to be configured in this section?)
    My input file is of the structure aaa,bbb,ccc,ddd,eee,fff,ggg
    My Data Type is of the structure
    <data header>
         <aaa></aaa>
         <bbb></bbb>
         <ccc></ccc>
         <ddd></ddd>
         <branch1>
                   <eee></eee>
         </branch1>
         <branch2>
                   <fff></fff>
         </branch2>
         <branch3>
                   <ggg></ggg>
         </branch3>
    </data header>
    Questions
    First question is why is there 2 instance of Request message mapping showing up in the monitor? Isn't this supposed to show up only once?
    Second question it appears that the problem is something to do with Mapping (Message Mapping) but i tried to test the message mapping manually using the data generated in the payload and it passes the mapping successfully.
    Third question, how is the input flat file converted to the complex structure of data type (as mentioned in additional information above) is this done by the input.filedNames that assigns the corresponding values from flat file to the data type?
    Fourth question - is there a way to run the process step by process (as a step through in other programming IDEs?) so the problem can be more easily identified?
    Thanks
    Anant

    Hi  All
    I little update - it appears that some of the scenarios developed earlier that were working earlier are now also failing at the same process of mapping with this error message.
    So i am suspecting that this is not a problem with the mappings in  my scenarios but rather a some technical setting related to how XI invokes this class - com.sap.aii.utilxi.misc.api.BaseRuntimeException.
    Does any one have any ideas what i can check to confirm this? Whether the problem is in the technical setting or the scenario configuration?
    thanks
    Anant
    error message attached.
      <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
    - <!--  Request Message Mapping
      -->
    - <SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="">
      <SAP:Category>Application</SAP:Category>
      <SAP:Code area="MAPPING">EXCEPTION_DURING_EXECUTE</SAP:Code>
      <SAP:P1>com/sap/xi/tf/_MM_CheckDeposit_</SAP:P1>
      <SAP:P2>com.sap.aii.utilxi.misc.api.BaseRuntimeException</SAP:P2>
      <SAP:P3>RuntimeException in Message-Mapping transformatio~</SAP:P3>
      <SAP:P4 />
      <SAP:AdditionalText />
      <SAP:ApplicationFaultMessage namespace="" />
      <SAP:Stack>com.sap.aii.utilxi.misc.api.BaseRuntimeException thrown during application mapping com/sap/xi/tf/_MM_CheckDeposit_: RuntimeException in Message-Mapping transformatio~</SAP:Stack>
      <SAP:Retry>M</SAP:Retry>
      </SAP:Error>

  • File sender adapter (FTP) - processing mode "Archive"

    Hello all
    We're polling files from an external FTP server. For this I created a scenario on XI according to this thread:
    When setting processing mode to "Archive" in the file sender adapter (ftp) it polls the file, stores it to the archive directory I specified and then tries to delete the file on the FTP server side. This returns me an error because we're not allowed to delete the retrieved files on the FTP server!
    Because of this error the file adapter stops further processing and does not poll all the other files.
    How can I disable this deletion mechanism while keeping processing mode to "Archive"?!?!?
    We do not want to use processing mode "Delete" or "Test" and we don't see other options to influence this behaviour.
    Thanks for any guideance on this one in advance!
    Kind regards,
    Renaud

    Hi Bhavesh
    Sorry for the late answer. Unfortunately I can't ask the application system to provide file names containing a timestamp within. The files are provided by an external partner and are retrieved by several others as well.
    In the meantime I managed to achieve this:
    In repository I created dummy data types, message types and message interfaces. No mapping programs and interface mappings!
    In configuration I created the necessary communication channels (1 ftp sender, 1 file receiver) and the required receiver and interface determinations as well as the sender and receiver agreements.
    The result of this is:
    I'm able to poll some specific files via ftp from remote host. The file names are file1.arj, file2.arj, file3.arj and file4.arj. All 4 files have the same SourceFileTimestamp (e.g. "20060727T053900Z").
    I'm able to store those 4 files 1:1 in a target directory with the same file names. Until here I did NOT need to follow this blog: <a href="/people/michal.krawczyk2/blog/2005/11/10/xi-the-same-filename-from-a-sender-to-a-receiver-file-adapter--sp14: The same filename from a sender to a receiver file adapter - SP14</a>.
    As of this blog it is possible to access adapter specific attributes and make them available in message mapping using user defined functions. This way I'm able to get the SourceFileTimestamp from the polled files and use it in a message mapping. This way I'm also able to use it in variable substitution on file receiver adapter (syntax = "payload:root,1,fileTS,1") in order to dynamically create a directory with this syntax: YYYYMMDD.
    So far so good... but the only remaining BIG problem now is, that as soon as the mapping is activated and assigned in the interface determination, the created files contain the XML payload instead of the original binary content. Where has it gone? How should the target message type look like so that it can carry over the original binary file content?
    BTW: isn't it possible to post screenshots? Would be much more easier to explain things... so sorry to anyone if I wasn't clear enough!
    TIA and best regards,
    Renaud

  • Adapter file sender doesn't split file into multiple message

    Hi everybody.
    We are in PI 7.0 SP10.
    In adapter file sender, I want to split a file into multiple file.
    We use protocole "file content conversion"
    in the field "recordset per message", I put the value 10 to test.
    The file content 30 records .
    The result we have is the treatment is not split into multiple message .
    The treatment is made but with one message.
    I need  to treat big files.
    Is there some one who have an idea  why t doesn't work ?
    Thanks in advance for your help.
    Regards
    Edited by: Eric  KOralewski on Jun 25, 2009 3:14 PM

    Hi,
    have you specified recordset name......if not, then specify it.............
    in recordset structure, specify like RECORD,1 and not RECORD,*
    again test your scenario......if still your file data is not getting split, then ask your basis guys to do a full CPACache refresh using PIDIRUSER..........your basis guys will know how to do it..........then again test your scneario............
    Regards,
    Rajeev Gupta

  • File Sender Channel

    Hi,
    I have a job running which copies a file from remote server to my PI server. I have a file sender channel which picks up this file send it for further processing.
    Is there a way to make sure that the file sender channel reads the file only after it has completely been  copied from the remote server assuming that we dnt know what is the maximum time it could take to write the file.

    Two options,
    1. The script should write the file having set the indicator as read only. Only after it writes the file completely the read only option should be removed.
    the option ●      Process Read-Only Files (for transport protocol File System (NFS)) should be disabled
    2. Use this option,
    Advanced Mode
    To specify additional parameters in the adapter configuration, set the Advanced Modeindicator.
    ●      Msecs to Wait Before Modification Check
    Enter the number of milliseconds that the adapter must wait before it checks whether the files have been changed.
    This parameter is not available if you have selected File Content Conversion as the Message Protocoland then made an entry under Recordsets per Message that splits an input file into several messages.
    Note
    This parameter is applicable only for the File adapter. If you enter a value in this field when configuring the sender FTP adapter, it will have no effect.
    All above solutions will work only if its NFS and not FTP

  • Semantics File Sender Adapter to determine which files to retrieve

    Hallo,
    does anybody has experience with this semantic?
    Thanks in advance,
    Frank
    From the FAQ-List of file-adapter(Note 821267 , Question 27).
    Q: Which semantics does the File Sender Adapter apply to determine which files to retrieve from an FTP server?
    A: Up to and including SP13 the File Adapter will issue an NLST command (see RFC 959) with the configured source file name scheme as first parameter to the FTP server. It will try to retrieve any of the files returned by the FTP server in response to this command.
    Starting with SP14, the File Adapter will issue a LIST command with the configured source file name scheme as first parameter to the FTP server. If it is able to parse the returned result (which is the case for UNIX- and Windows-style directory listings), it will retrieve any of the returned files. If it cannot parse the result, it will fall back to the pre-SP14 implementation and use the NLST command as described above.

    Frank
    We are on SP12 and have had problems with this and specifically, the FTP server on Solaris, not being fully RFC959 compliant.
    We've had to get a different FTP Server as we were returned *.xml no file or folder found instead of 550 *.xml no file or folder found.
    This increased the polling to the server, and filled up the ftp logging file, which intern filled up the partition and crasehd the server.
    We got round this by installing http://www.proftpd.org/

  • Pick up a specific file with File Sender Adapter.

    Hi guys,
    I would like to know how I can pick a specific file in a file pool (folder)? I would like to choose this file by name, like FileA or FileB, etc.
    I’m asking this because I have an asynchronous file scenario (BPM) with a receiver adapter that put the File with a specific name (variable substitution) in a folder.
    And I would like to do something like this:
    In another asynchronous scenario (BPM), a File sender adapter picks up this specific file (using the name). The correlation is made trough an IDOC that XI receives before pick up the file, this IDOC has payload field with the name of file to be picked.
    Is it possible receives the IDOC, read the field with the name of the file to be picked and choose this specific file? In a Sender File Adapter how I can do something like variable substitution like receiver adapter does.
    Thanks in advance,
    Ricardo.

    Hi,
    <i>Is it possible receives the IDOC, read the field with the name of the file to be picked and choose this specific file? In a Sender File Adapter how I can do something like variable substitution like receiver adapter does.</i>
    No this is not possible. The only dynamic thing you can do is use wild card characters like *.
    So, maybe you can pick a file like . or AA. and so on...
    Regards,
    Bhavesh

  • 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!

  • I am confuse to choose right technology for file sending?

    Dear all
    i am working in medical transcription project in that we have to send and receive more doc file and voice file from various client (web client and desktop client).
    i have three three technology which makes me confusion
    1. RMI with NIO
    2.servlet with URL class in client
    3.SAAJ with attachment[i dont know much about this]
    so please suggest me which is the right technology for file sending and receiving...the file may maximum 20 MB

    It depends if you have a valid reason to use web services. If you are providing a web front end to your application for clients to use then you could just use a standard file upload procedure, I have used apache commons and it works well for this.
    If your requirements indicate that a web service call is the answer as you have some system-to-system connectivity then I think you will need to use saaj and add the file as a SOAP attachment, as embedding 20MB of binary data into a string field on a standard SOAP message will probably cause the JVM to run out of memory.
    Cheers

  • File Sender Content Conversion: Help needed

    Hello Experts,
    i need help with file sender content conversion:
    i have a file which looks like this:
    12329460  24.01.09/07:01  167     Y010122851  136086  43300007            E70115  1L2_96_1
    12329660  25.01.09/07:02  157     Y010122851  136086  43390007            E711J5  1L2_96_1
    as you can see 8 fields, separated with whitespaces
    and i want and xml file which looks like this:
    <DT_DATA_FILESENDER>
      <Recordset>
          <Data> 
            <field1>12329460</field1>
            <field2>24.01.09/07:01</field2>
            <field3>167</field3>    
            <field4>Y010122851</field4> 
            <field5>136086</field5> 
            <field6>43300007</field6>
            <field7>E70115</field7> 
            <field8>1L2_96_1</field8
         </Data>
          <Data> 
            <field1>12329660</field1>
            <field2>25.01.09/07:02</field2>
            <field3>157</field3>    
            <field4>Y010122851</field4> 
            <field5>136086</field5> 
            <field6>43390007</field6>
            <field7>E711J5</field7> 
            <field8>1L2_96_1</field8
         </Data>
      </Recordset>
    Would you please let me know how the datatype has to look like?
    And especially how the FCC has to be configured for this scenario?
    Thanks in advance,
    Chris

    > With fixed lengths i get it working,
    >
    > but with de fieldseparator 0X09 it does not work,
    > would you please tell me the complete FCC config not only the fieldSeparation line?
    Well Christian,
    There is one thing, eithere you can use fieldSeparator or fieldFixedLengths you can not use both together. So in your case do not use fieldSeparator.
    The complete FCC is almost same as given in the blog in my previous reply. See the final output in that blog and create your data type accordingly. e.g.
    Recordset
    ------Item 0...unbound
    --------Field1 0..1
    --------Field2 0..1
    --------Field3 0..1
    --------Field8 0..1
    Regards,
    Sarvesh

  • Attachment of original message in file sender adapter content conversion

    Hi,
    does anybody know how I can configure a file sender communication channel (with content conversion) so that the original file is added to the XI SOAP message as attachment? Maybe this is just a parameter in "Advanced" tab. (The content conversion itself is not an issue.)
    The result should be the "Main Document" (XML-message) and the "original document" as two attachments in the SOAP payload.
    The reason for this is that the original file should be archived with the XML message as it was before the XML content conversion of the file sender adapter took place.
    Thanks,
    Philipp

    original file is added to the XI SOAP message as attachment?
    The "Advanced" tab -> additional files added in file adapter should act as the attachment to soap receiver adapter if u select the "Keep Attachments" option in soap receiver communication channel.
    What do u want to do in FCC is a bit unclear?
    Regards,
    Prateek

  • Trailing spaces problem during file content conversion

    I have developed a proxy to file scenario.And am using file content conversion for creating the file. The file is to be a fixed length file.
    File Structure
    <Header>
    <Item>
    <Item Trailer>
    <File Trailer>
    Each tab in the file has the last character mapped to spaces.
    Eg: Header00000001  2006011700000000020060<blank   space>
    Item00000001        2006011700000000020060<blank   space>
    The problem is that during file content conversion. XI does not preserve trailing spaces at the end of the line i.e.if a particular line in the file ends with space. It terminates the line at the last non-space character (in this case at 060).
    However we are required to maintain these trailing spaces at the end of each line.
    I have tried preserve white space in data type that does not work.
    I know that xslt mapping may solve the problem but I am looking for a workaround with my current graphical mapping.
    Looking for suggestions !!                                
    Thanks,
    Rashida

    Hi,
    I have the problem quite opposite to this where we are getting the trailing spaces at end of each record which should not come.
    File structure is
    <Record>
    - <Data>
      <Content>11/09/2007@210@ZACSL007@GBB-56436@PS01@29@1044@19@646@0</Content>
      </Data>
      </Record>
    ............. n records
    <Header>
      <File_Name>UK01</File_Name>
      </Header>
    Record structure in communication channel used is
    Header, Data
    Data.fieldFixedLengths     1024
    Data.addHeaderLine     0
    Header.addHeaderLine     0
    Header.fieldFixedLengths     0
    Header.fixedLengthTooShortHandling     Cut
    Data.fixedLengthTooShortHandling     Cut
    Header.endSeparator     '0'
    Actually if the length of record is less than 1024, rest of the length is being filled with spaces which should not occur.
    Many advanced thanks.
    Jitender

Maybe you are looking for

  • To display the output of a FM inside a tree

    Hi all, 'REUSE_ALV_POPUP_TO_SELECT'  is a FM for displaying or selecting table entries in internal tables in a popup . I need to display the output if this FM inside a tree. That is when i expand the tree ,  the output of the FM shoul be displayed .

  • ME2N report - ALV- How to get Vendor Name ?

    We use the ME2N (Purchasing Documents per Document Number), with the ALV scope of List. Is it possible to have the <b>Vendor Name</b> in this ALV grid ? The name is not offered in the COLUMN SET when pressing the "CHANGE LAYOUT" button. Thanks

  • Word Processor for Air

    Which word processor would anyone recommend for the Air? Do any support power point? Thanks...

  • Message Mapping :  How to  appned the  ub occ under UB  occ: Very  urgent

    Hi  SDNers My SOurce  str  is  like  this                Traget Str Node   subnode1             1..1              Tstr1 1..1   subnode2             1..1                 TSr2   1..1      subnode3          1..ub                Tstr3 1..ub          subn

  • I can not seem to get the driver for my HP Photosmart C5180 with Windows 7. I can't find it.

    I can not seem to get the driver for my HP Photosmart C5180, I can not seem to find it anywhere in the site,, I have 1 XP Pro and  2 Vista PC's running with my printer.  I have been trying to find where I can find the driver for my HP  Photosmart pri