Send File Adapter - keyFieldValue like 'not(H,B)'

Hi,
I've a problem in a sender file adapter.
The file has one header line, multiple body lines and one trailer line. The structure of the flat file is like:
H; 0815; text;
0235;my text; 745;7...
6341;your text; 464;4 ...
2342;another text; 726;2
T; 3; OK
For header and trailer line there is a key field but for body lines there isn't.
My idea:
I take the first field of body lines as key field and define keyFieldValue like 'not(H,T)'.
Is there a way to define keyFieldValues with expressions with 'not' and 'or' ?
Or have anyone a different idea to solve the problem ?
Regards
Christoph

Make the Source str as
MT_Source
  Records      ------------1 to unbounded
    Data         ------------1
In the sender File comm channel select Message protocol FCC and specify the parameters as given below
Document Name:MT_Source
Document namespace:(Specify the namespace)
Recordset structure:Records,*,Data,1
Add  more parameters choose +
Name                           Value
Records.fieldNames      Data
Records.fieldSeparator  'nl'
Records.endSeparator      'nl'
Follow this blog  and modify java code according to ur requirement

Similar Messages

  • PI Sender File Adapter OS Commands not working

    Hi Guys,
    I have very simple scenario. we are using PI 7.1 with EHP1 on HP hardware with JDK 1.5.2*.
    We are processing XML files through Sender File Adapter(NFS) to Idocs. We also need to move some pdf documents to target folders on the same box (basically Sender and Receiver files/foders are mounted to PI OS hence I am using NFS)
    I am trying to put a simple OS command copy and mov command.
    in the Before Message Processing: cp /tmp/*.pdf /tmp/out/
    And in the After Message Processing: mv /tmp/*.pdf /tmp/archive/
    In the Adapter Audit logs says these commands are executed but I don't see any effect and there is no error/Traces available even in the Server logs also.
    I have been using these OS commands since XI 3.0 I never had any issue.
    I have gone through SDN but no luck, Please share your experiences.
    Thanks,
    Laxman
    Edited by: Laxman  Molugu on Feb 3, 2010 11:58 AM
    Edited by: Laxman  Molugu on Feb 3, 2010 11:59 AM

    hi ,
    As i understand your requirement you just want to take the pdf file from one folder of XI server and put it to another..
    for this u do not need a OS command..
    This requirement is simple ..infact u do not need any IR components as well..
    u just have to develop the ID part and wherever it asks for namespace or message interface u can give a dummy one..
    this would jst take the pdf file from one folder and send it to another

  • Sender file adapter with FCC not creating last field

    Hi,
    I've got the following file:
    field1;field2;field3
    FCC is the following:
    Recordset streucture: ITEM,*
    ITEM.fieldSeparator     ;
    ITEM.endSeparator     'nl'
    ITEM.fieldNames FIELD1,FIELD2,FIELD3
    ignoreRecordsetName     true
    I expect to generate the following XML:
    <FIELD1>field1</FIELD1>
    <FIELD2>field2</FIELD2>
    <FIELD3>field3</FIELD3>
    That's working OK. The problem is when I receive a file with the FIELD3 empty. Example:
    field1;;
    I expect:
    <FIELD1>field1</FIELD1>
    </FIELD2>
    </FIELD3>
    But I get:
    <FIELD1>field1</FIELD1>
    </FIELD2>
    And this raises an error during the mapping because the FIELD3 is mandatory in the Data Type definition, even it's empty

    I expect:
    <FIELD1>field1</FIELD1>
    </FIELD2>
    </FIELD3>
    But I get:
    <FIELD1>field1</FIELD1>
    </FIELD2>
    use a mapwithdefault in your mapping so that it will always create an empty node if there was no value to be mapped to the target field.

  • 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,
    Rahul

    Rahul,
    ><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?

  • KeyFieldValue in Sender File Adapter Not Working

    Hi,
    I have a flat file like this...
    1Field1Field2Filed3.....
    2Field1Field2Field3....
    1Field1Field2Filed3.....
    2Field1Field2Field3.....
    1Field1Field2Filed3.....
    2Field1Field2Field3....
    My requirement is to pick only lines starting with '1'.
    I have configured the Sender File Adapter like this,
    Recordset Structure : SOURCE,*
    Key Field Name: KF
    Key Field Type : String(Case-Sensitive)
    File Content Conversion:
    SOURCE.fieldFixedLengths  1,5,5,5....
    SOURCE.fieldNames           KF,FIELD1,FIELD2....
    SOURCE.keyFieldValue      1
    After all this, still it picks up all the recored instead of records starting with '1'. Can any one solve this?
    Regards,
    Sreedhar

    If you feel module processor is bit tough you can use XSLT Mapping which is simple in sloving ur problem.
    Check this blog to do a sample example using module processor.
    /people/sap.user72/blog/2005/07/04/read-excel-instead-of-xml-through-fileadapter
    To implement the above check this link....
    https://websmp201.sap-ag.de/~sapdownload/011000358700003237612005E/HowToCreateAdapterModules.pdf
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/e21106cc-0c01-0010-db95-dbfc0ffd83b3
    http://help.sap.com/saphelp_nw04/helpdata/en/8b/895e407aa4c44ce10000000a1550b0/content.htm
    /people/gowtham.kuchipudi2/blog/2006/01/13/stop-creation-of-an-empty-file-from-file-adapter-using-module

  • Sender file adapter - filename containing  *  does not work

    Hi All,
    I am doing simple file-file scenario wherein my filename is something like
    MATMAS05_XI20070911-150159-088.xml 
    there are many files having similar kind of  name which are supposed to be picked
    so simply I can go on writing <b>MATMAS05_XI*.xml</b> in filename
    it is not working.. communication monitoring gives error <i>Error occurred while connecting to the FTP server "10.25.117.237:21": java.lang.NullPointerException</i>
    But  when I use character '?' then it works fine - '?'  placeholder for each extra character
    I am on SP 20.My adapter is configured properly. FTP server working fine with '?' or simple filename. So bit confused why it is not working with *
    Are there some BASIS settings which have to be in place to work it out with * ?
    All your inputs are welcome !!
    Thank You,
    Mugdha kulkarni

    Hi
    this error is not related to multimple files or sending with the * char.. you can use it
    see the below link
    /people/mickael.huchet/blog/2006/09/18/xipi-how-to-exclude-files-in-a-sender-file-adapter
    The error related to the server connection.. also check the ip address is correct or not you configured correctly or not..
    also clarfity the correct error description ..
    Chilla

  • Production issue - Sender File adapter not picking up the files from folder

    Hi Guys,
    Ever since the upgrade from XI 3.0 to PI 7.1, we have come acrossinstances of weird error.
    Thsi time again - now the 3rd time - tandom basis, in our production PI server, we have teh file slying in the source directory folder in the server.
    I can see the files lying there in AL11.
    However, it looks like that the file polling has just stopped and the channel is going blank in channel monitoring.
    I have checked in SXMB_MONI and there are no messages since the morning.
    I have tried craeting a replica of the current channel but it is not working.
    This is teh production server and thsi has alraedy created production issues.
    I ahve checked in the SDN forum but am not able to find the details.
    Plaese help me.
    I am anyway going to raise the issue with SAP now.
    Regards,
    Archana
    <REMOVED BY MODERATOR>
    Edited by: Prateek Raj Srivastava on Jun 8, 2010 4:50 PM

    Hi Prateek,
    I have trying all sorts since the morning and then just checked teh file permissions.
    The file permissions were incorrect as compared ot the other files that were processed successfully today.
    Somehow the permissions were changed on the server and the interface channel was not able to poll the files.
    I got teh permissions changed back to 666 and all the files were pikced up in a minute.
    I got the folder checked and it seems like that the permissions were changed somewhere very early in the morning and we are trying to find out how it happened and who did that.
    However, another question i had - this sender file adapter was polling the source directory and deleting the files from there.
    I would have expected that if the channel had issues with the file permission because of which it was not able to access the file, it would have thrown an error something like the file permissions error.
    But there was not a single error in the channel monitoring.
    How can we configure it in a beter way so that we at least soem kind of error indication?
    Please advice.
    Regards,
    Archana

  • Sender File Adapter  not able to get file via FTP from an external system

    Hi,
    I have a Sender File Adapter using FTP which polls a server every 10 seconds looking for a file ".xml".  The adapter will connect and pick up the waiting file, but sometimes the adapter not able to get file via FTP from an external system. The file is on the server, but despite the polling, the adapter does not pick up it. There is no return error.
    The connect mode is Permanently and the transfer mode is Binary.
    Can you help me?
    Thanks.
    T.

    Hi Teresa,
    does this case appears with a file size higher the others?
    Personally, I do not recommend to have a polling under 1min.
    10s could be too just, if the file is not small and/or if the file server is far (several kilometers) to where the Adapter Engine is, and/or this file server is beside a firewall. Do not forget also that, with previous points, you could have like a conflict, betwen the 1st polling and the 2nd polling, if in less 10s PI adapter has not enough time: to connect to the FTP server (several Km), find the file (perhaps among 100 other files in the directory), go back to the file to Adapter Engine server (several Km again), convert your file to XML message (with a complex Content Conversion), then check the XML structure, and when all that is done, return back to FTP server (several Km), to archive the source file... Well It's my understanding of a FTP exchange with FILE adapter...
    If you really need a 10s polling, that's mean your have a pseudo real time interface. In that case, in my mind file should not be used! but we should use a Web service, JDBC JMS (any exchange without a physical object like a file). For me, it's a non-sens to have a file in that case.
    regards.
    mickael

  • Sender File Adapter - No error, but not generating any message

    I am working on a file to RFC scenario.  The sender file adapter is using content conversion to read a comma delimited file.  The file is being picked up and archived correctly, and the adapter monitor does not show any errors.  However, the process disappears at this point.  I don't see any messages in SXMB_MONI, and there is no sign that the process is reaching the RFC adapter.  Has anyone ever had this happen before?
    I have four line types for Buildings, Additions, Floors, and Rooms.
    I list all four in the recordset structure, and I identify a key for each with the keyFieldValue parameter.  I list a fieldSeparator of ',' and an endSeparator of 'nl' for each row.  And i have a list of the fieldnames in the fieldnames parameter.
    The only thing i'm not sure about is the keyFieldinStructure parameter.  I have specified ignore there, because I don't want that field in my XML.  Do I still need that field in my sender datatype, even if I'm ignoring it, or can I leave it out?
    Thanks for any help.  Please don't just list blogs unless they have something you think is helpful with my specific problem.  I have already read all of the blogs that deal generally with the sender file adapter and file content conversion, and I need more specific help at this point.

    I made one error before, it IS showing up in the Recovered Adapter Audit Log (it took that log about 10 minutes to open that particular tab so I didn't notice them there).
    Here is what it says there:
    2006-06-12 11:22:59 Success Channel CC_S_File_FIPM_Buildings: Entire file content converted to XML format
    2006-06-12 11:22:59 Warning Channel CC_S_File_FIPM_Buildings: Empty document found. Proceed without sending message
    2006-06-12 11:22:59 Success File "/interfaces/one line building.txt" archived after processing
    Here are my parameters in the file content conversion:
    Buildings.fieldNames     RecordType,PLTXT,STORT,STREET,POST_CODE1,CITY1,REGION,PARNR,X_COORD,Y_COORD,ASSIGN_SQ_FT,BLDG_NUM,CAMPUS,GR_SQ_FT,NET_SQ_FT
    Buildings.keyFieldValue     'B'
    Buildings.fieldSeparator     ','
    Buildings.endSeparator     'nl'
    Buildings.keyFieldInStructure     ignore
    Additions.fieldNames     RecordType,ASSIGN_SQ_FT,BLDG_ABBR,CAMPUS,ADDITION,BLDG_USE,BLDG__NUMBER
    Additions.keyFieldValue     'A'
    Additions.fieldSeparator     ','
    Additions.endSeparator     'nl'
    Additions.keyFieldInStructure     ignore
    Floors.fieldNames     RecordType,BLDG_ABBR,CAMPUS,ADDITION,FLOOR,ASSIGNABLE_SQUARE_FOOT,BLDG_NUMBER
    Floors.keyFieldValue     'F'
    Floors.fieldSeparator     ','
    Floors.endSeparator     'nl'
    Floors.keyFieldInStrucutre     ignore
    Rooms.fieldNames     RecordType,SHTXT,MSGRP,ADDITION,ASSIGNED_DEPT,BLDG_ABBV,FLOOR_CAMPUS,AREA,RCD_CODE,DEPT_CODE,BUILDING_NUMBER,ROOM_COMMON_KEY
    Rooms.keyFieldValue     'R'
    Rooms.fieldSeparator     ','
    Rooms.endSeparator     'nl'
    Rooms.keyFieldInStructure     ignore
    And here is my data type:
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:MT_FIPM_BuildingUpdate xmlns:ns0="urn:XXXXXX:FIPM:Buildings:SYS">
       <Buildings>
          <PLTXT/>
          <STORT/>
          <STREET/>
          <POST_CODE1/>
          <CITY1/>
          <REGION/>
          <PARNR/>
          <X_COORD/>
          <Y_COORD/>
          <ASSIGN_SQ_FT/>
          <BLDG_NUM/>
          <CAMPUS/>
          <GR_SQ_FT/>
          <NET_SQ_FT/>
       </Buildings>
       <Additions>
          <ASSIGN_SQ_FT/>
          <BLDG_ABBR/>
          <CAMPUS/>
          <ADDITION/>
          <BLDG_USE/>
          <BLDG_NUMBER/>
       </Additions>
       <Floors>
          <BLDG_ABBR/>
          <CAMPUS/>
          <ADDITION/>
          <FLOOR/>
          <ASSIGNABLE_SQUARE_FOOT/>
          <BLDG_NUMBER/>
       </Floors>
       <Rooms>
          <SHTXT/>
          <MSGRP/>
          <ADDITION/>
          <ASSIGNED_DEPT/>
          <BLDG_ABBV/>
          <FLOOR/>
          <CAMPUS/>
          <AREA/>
          <RCD_CODE/>
          <DEPT_CODE/>
          <BUILDING_NUMBER/>
          <ROOM_COMMON_KEY/>
       </Rooms>
    </ns0:MT_FIPM_BuildingUpdate>
    I'm going to recheck everything again, but maybe you guys will see something?  I don't.
    Vanda

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

    Hi 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

  • Archive file with errors in sender file adapter not working! please help!

    Hi Experts,
       I have a file to RFC scenario. the input is a XML file. I have setup the flag in sender file adapter channel for archiving the input files with errors. But it is not working.
    For testing I have used an invalid xML file for example without the main XML tag. I have also tested with a MSWORD file saved with.xml extension. But in both the cases the files are not getting archived.
    My archive location permissions are fine and in fact normal archive operation is happening. That is, if I select the processing mode as "Archive" and gave the Archive directory then files are getting archived. The problem is only with the "Archive faulty source files" option.
    What am I missing? DO I need to do some more configurations?
    What are the prerequisites if any for this option?
    How to test this?
    Please help me! I will be greatfull to you all!
    Thanks & Regards
    Gopal

    and go thru this links
    Creating a Single Archive of the Version Files
    http://help.sap.com/saphelp_nw04/helpdata/en/79/1e7aecc315004fb4966d1548447675/frameset.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/31/8aed3ea86d3d67e10000000a114084/frameset.htm
    Note: reward points if solution found helpfull
    Regards
    Chandrakanth.k

  • Error in sender file adapter: source directory does not exist

    Hi,
    The PI system is 7.11
    I've created sender file adapter with following details:
    Transport Protocol : File System
    Source directory: /interfaces/In
    I checked in AL11 that this path really exists and it does. (I can even see the .txt file that should be processed.)
    But still i get in Communication Channel Monitoring the following error:
    "Configured Source directory "/interfaces/In" does not exist.
    (i also tried to give the source directory as "interfaces/In" and as "//interfaces/In" but still the same error.
    Any suggestions as to what is wrong?
    kr
    Robert

    Actually, Need to use forward slash (/) to separate directory names in accordance with the Java specification.
    But wanted to try if that works..
    Also check directory name , path again as this is case sensitive...
    --Divyesh

  • Sender File Adapter Not Picking Any File

    Dear Expert,
    I am newbie in PI. Just tried to create File Content Conversion Scenario. Details as follow :
    1. Source Directory ..\file\log\test_q.txt
    2. Target Directory  ..\file\log\xml\test_q.xml
    Transport Protocol : NFS
    Message Protocol : File Content Conversion
    Adapter Engine    : Integration Engine
    I have completed all the design and configuration in IR and ID. However, when I produce the log file in the directory, nothing happen.
    Hacing checked in the RWB as well, I could not find any clue. simply nothing happen.
    Would you please advise me on how to trigger the interface? As per my understanding, sender file adapter will be activated directly once the file is created.
    Thank you very much in advance.
    Best Regards,
    Y

    Hi Yonisiwa,
       Things you should check here are:
    1) If the sender file adapter is active or not.
    2) If the source directory is correctly spelt or not. (Check if you are using the correct slash \ or /)
    3) The file name/mask is correct or not.
    4) The polling interval is too long.
    Alternatively, you can check the message monitoring in RWB at the adapter level and go into the audit log if the message.
    There you can see the reason for the file not being picked up.
    Also check the Communication Channel status in the Component Monitoring link in RWB.
    Regards,
    Ravi Kanth Talagana

  • Sender file adapter is not picking the file from windows server

    Hi Experts,
    We have a sender file adapter running on Unix server. Now we have changed the source directory path from Unix to Windows in file access parameters.  It is not picking the files from windows directory and not showing any error.
    In this scenario, input file for sender adapter is *.xml and no content conversion.
    Could any one please let me know is there anything needs to changed in file adapter.
    Thanks in advance,
    Sridhar. M

    Sridhar,
    What do you have in the directory path?
    If it is a shared drive in unix then the directory in windows should also be a shared drive from XI system. Else if it is FTP check the address.
    Regards,
    ---Satish

  • Sender File Adapter is not reading anything

    Hi,
    I have a really strange problem here. I'm tyring to read a file using file adapter (FTP) and the adapter doesn't read anything and it does not throw any error in the communication channel monitoring.
    I'm using a receiver file adapter to write files to the same FTP folder, so it can't be a connectivity problem. And I tried to get the file using Filezilla and it works fine...
    In the sender file adapter I tried to simplify the maximum to solve the problem:
    - NO File Content Conversion
    - NO advanced attributes
    - I used the "*" in the file name to read any file
    - I've only configured the FTP connection, the folder and the file name. I don't understand why it isn't working...

    Yes I got this message:
    Polling interval started. Length: 5,0 seconds
    Now I tried something... In the FTP Connection parameters, I set as the server a random and unexisting name, and I get the same result...
    I'm starting to thing that some firewall is blocking the connection, but I have to wait until next monday to know this. But I don't understand why the receiver FTP channel is working...
    PD: The cache is correctly refreshed because I changed the polling interval time, and it has been updated on the monitoring

Maybe you are looking for

  • How to add Animated GIF to an iWeb '11 page?

    Trying to take our existing website (not created in iWeb) and recreate in iWeb.  Have an animated GIF on our home page.  When I try to drag the GIF to the iWeb page, it's no longer animated.  And when I publish, again it's no longer animated.  I need

  • How to get mic level loud enough

    This is my first attempt at a "complete" iMovie...though have been fooling around with video and stills to practice. I was thinking about subtitles to make my video make sense, but then wanted to try narration instead. I got out my headset, usb Cyber

  • How to convert photo shop docs to .pdf

    I accidently used photo shop to opened a .pdf file and now all of my .pdf file have to be imported to photo shop to open and I am not able to get all the pages.  How am I able to correct this problem and use Adobe Acrobat to open the .pdf file?

  • Series of Changing Thumbnails in Flash

    I want to design a series of thumbnails where a larger version of the thumbnail appears in the top part of the interface. Here are two websites that give an example of exactly what I'm talking about: [1] http://xbox360.ign.com/ -- The "Today on IGN"

  • FieldLoop within TabPanel: HowTo pass loop variable to form within a Tab

    Dear all, I have a Tabbed User Form which contains a FieldLoop that creates Tabs based on the FieldLoop loop-variable. Each created Tab should include the same form which differs only by the value of the loop-variable. So I have a list of all my SAP