File adapter sender content Convertion

Hi all,
I need to read a flat file and convert it,
The file structure is a long row with different types of segments:
For example:
AA111222333BB4455
where AA - the first segment and BB the second segemnt,
I want to convert this string to -
<AA>
<first>111<first/>
<second>222<second/>
<third>333<third/>
<AA/>
<BB>
<first>44<first/>
<second>55<second/>
<BB/>
I tried impliment this by using  endSeparator and beginSeparator as AA,BB, but I get an error -
Conversion of file content to XML failed at position 0: java.lang.Exception: ERROR consistency check in recordset structure validation (line no. 1: missing structure(s) in last recordse
anyone????????
Thanks,
Naama

hi,
Declare the message type as:
mt                 
*record            
    **AA      1          
      ***key  0..1 
      ***first         
      ***second
      ***third
   **BB      1
     ***key  0..1 
     ***first
     ***second
content conversion parameters:
Document Name: mt
Document Namespace:http://xxxxx
Document Offset:
Recordset Name: record
Recordset Namespace:
Recordset Structure:AA,1,BB,1 
Recordset Sequence:Ascending
Recordsets per Message:1
KeyField Name:key
KeyField Type:String(Case-Sensitive)
Additional Parameters:
AA.fieldFixedLengths 1,3,3,3 
AA.fieldnames key,first,second,third
AA.keyFieldValue 1
AA.keyFieldinStructure ignore
ignorerecordsetname true
BB.fieldFixedLengths 1,2,2 
BB.fieldnames key,first,second
BB.keyFieldValue 2
BB.keyFieldinStructure ignore
Thanks,
Durga
Edited by: NagaDurga Nannapaneni on Sep 8, 2008 1:11 PM
Edited by: NagaDurga Nannapaneni on Sep 8, 2008 1:15 PM

Similar Messages

  • Cannot process a Fixed Field Length file using the File Adapter (Sender)

    Hi -
    I have checked throughout these posts and blogs but I still have not been able to find a solution to my issue.  When using the File Adapter (Sender) I get a Conversion initialization failed with "xml.keyfieldName", no value found.  Why would I require a key field when I am using fixed field lenghts?  The file is comprised of 2 structures - 1 header and multiple details (see below).  There are no key fields in the flat file that I would be able to use.  Any suggestions?
    011000390      Customer Americas        20080605164317 000000000000000800000008000000000016000000                              
    12345678          100500       100500       Supplier 1                         0000000000030000002008040400                    
    12345678          100501       100501       Supplier 2                         0000000000052000002008042100 
    The File Adapter is configured as follows:
    Document Name = Rfchke00
    Document Namespace = 'my namespace'
    Recordset Name = Rfchke00
    Recordset Structure = Dtachkh,1,Dtachkp,*
    Recordset Sequence = Ascending
    Recordsets per Message = 1
    Key Field Type = String (Case-Sensitive)
    Dtachkh.fieldFixedLengths = 15,25,8,6,1,8,8,8,15,3,31
    Dtachkh.fieldNames = F1,F2,F3,F4,F5,F6,F7,F8,F9,F10,F11
    Dtachkh.processFieldNames = fromConfiguration
    Dtachkp,fieldFixedLengths = 18,13,13,35,15,3,8,2,21
    Dtachkp,fieldNames = F1,F2,F3,F4,F5,F6,F7,F8,F9
    Dtachkp,processFieldNames = fromConfiguration
    Thanks,
    Dave

    Hi,
    you can use the module from which u can convert your structure to
    H011000390 Customer Americas 20080605164317 000000000000000800000008000000000016000000
    D12345678 100500 100500 Supplier 1 0000000000030000002008040400
    D12345678 100501 100501 Supplier 2 0000000000052000002008042100
    Please note the extra H,D in the struture added by the module.
    You can then use them as your key fieldValues.. The module should be deployed in Visual Admin and then can be used in the Module tab of your adapter CC
    While writing the content conversion after that please dont forget about the added new characters
    Please note also that i can find that the word supplier kept repeating in all the Dtachkp records
    Please use that
    Also if you feel that the field is of 13 characters and that would cause a problem dont worry... create a dummy field eg split tht 13 to two fields and use the common one as key field Value and identifier... as i see in ure case its like 500 Supplier , 502 Supplier . u can split the first 4 char and the remaing 9 char are key field value.
    try this out
    Rgds
    Aditya

  • File Adapter with Content Conversion

    Hi -
    I am trying to convert a Flat file which has data as
    firstnamelastnamecompanyName
    Now i have created a message type which has a root name as Contact and its children are FirstName,LastName,Company.
    And in the configurator i have created a file adapter with the content conversion, but being very new to XI i have never used a file adapter with content conversion.  This is what i have in my Content Conversion Parameters.Please correct my code.
    Document Name      ::   MT_Contact
    Document Namespace ::   http://venkat
    Document Offset    :: <i>i did not enter anything here</i>
    Recordset Name     ::   RootNode(i gave this name just like that,,, Should it be something from the IR??
    Recordset NameSpace:: <i>i did not enter anything here</i>
    Recordset Structure::   Contact (this is the name in my IR
    Recordset Sequence ::  Ascending
    Recordsets per Message :: Contact,* (Can someone explain what should be given here)
    Then in the bottom in the name value pairs i have given
    Contact.fieldNames   =   FirstName,LastName,Company
    Contact.fieldSeparator = #
    When i am using the above configuration the error i am getting in RWB is Error: Conversion initialization failed: Exception: java.lang.Exception: java.lang.Exception: Error(s) in XML conversion parameters found:
    Format error in 'xml.recordset' argument: incomplete structure (name,number) pairInvalid 'xml.recordsetsPerMessage' value 'Contact,*' found
    I am very new to XI and i am unable to understand what exactly each field means in the file adapter when the content coversion is used. Can someone take the pain of explaining them.
    Thank you
    Venkat

    Hi,
    Use the following to create an XML strucutre like this,
    <MT_CONTACT>
    <CONTACT>
    <FirstName> </FirstName>
    <LastName> </LastName>
    <CompanyName> </CompanyName>
    </CONTACT>
    <MT_CONTACT>
    DocumentName : MT_TEST
    DocumentNamespace : Yournamespace
    RecordserName : record
    RecordsetStructure : CONTACT,1
    In the table,
    ignoreRecordsetName  : true
    CONTACT.fieldNames : FirstName,LastName,CompanyName
    CONTACT.fieldSeparator : #
    Go through the links suggested by moorthy and also these blogs to understand content conversion better,
    /people/anish.abraham2/blog/2005/06/08/content-conversion-patternrandom-content-in-input-file
    /people/jeyakumar.muthu2/blog/2005/11/29/file-content-conversion-for-unequal-number-of-columns
    /people/michal.krawczyk2/blog/2004/12/15/how-to-send-a-flat-file-with-fixed-lengths-to-xi-30-using-a-central-file-adapter
    /people/shabarish.vijayakumar/blog/2006/02/27/content-conversion-the-key-field-problem
    /people/sap.user72/blog/2005/01/06/how-to-process-csv-data-with-xi-file-adapter
    Regards,
    Bhavesh

  • Synchronous file adapter sender side configuration in sap pi

    Hi Experts
    synchronous file adapter sender side configuration in sap pi
    can you explain any one tell me step by step procedure?
    Regards
    Sagar

    Hi,
    You can use RequestResponseBean in the sender file adapter module .
    RequestResponseBean (SAP Library - SAP Exchange Infrastructure)
    Request/Response Bean for IDOC_AAE adapter
    Instead of IDOC_AAE adapter you can use FILE adapter.
    Regards,

  • Sender file adapter with content conversion  Simple XML

    Hi experts,
    I'm trying to parametrize my sender file adapter content conversion.
    I'm receiving a text file with one single line like:
    AA1;AA2; AA3;
    and I want to convert it to an XML like
    <MT_A1>
    <field1>AA1</field1>
    <field2>AA2</field2>
    <field3>AA3</field3>
    </MT_A1>
    Actually I know how to do somenthing like
    <MT_A1>
        <LINE>
              <field1>AA1</field1>
              <field2>AA2</field2>
              <field3>AA3</field3>
         <LINE>
    </MT_A1>
    What I want is remove the <LINE> tag from my XML.
    Regards
    Gonzalo
    Edited by: Gonzalo del Castillo on Nov 28, 2008 2:18 PM

    Hi
    Use this help document for receiver FCC
    http://help.sap.com/saphelp_nw04/helpdata/en/d2/bab440c97f3716e10000000a155106/content.htm
    Content Conversion (Pattern/Random content in input file)
    File conversion text to xml (Few Last Post)

  • Sender File Adapter and content conversion

    Hi,
    How can we remove the last line from the file using content conversion?
    The last line should not be read from the input file.
    Like for the first line we can use Document Offset .......similarly do we have any option for the last line?

    >
    neelansha singh wrote:
    > date                       Empno         Empname
    > 19.03.2009            12345            Neel
    > 20.03.2009             34566           Neelkanth
    > EmpDes                 Japan        100
    >
    >
    > The file is like this first row i have removed using document offset.......from 2nd row till nth row the structure is as shown above and the last row has no. of fields 1 less than all other rows and also its root node is different like shown above its rootnode is EmpDes..........How to use File content conversion for this?
    do you want to avoid the last line i.e
    EmpDes                 Japan        100
    in that case the 3 options are
    1. use a adapter module and remove the last line - this is the ideal option
    2. use a OS script - will work but only if you are using the NFS option in the file adapter instead of FTP
    3. read that also using content conversion (treat it as a trailer) and ignore it during the mapping

  • Polling by file adapter (sender) with FIFO functionality

    Hi,
    here are one question:
    What happen if, for example, the sender system generates multiple files with the same timestamp (HH:MM:SS), or the file adapter on XI is stopped for a moment, and then, when activated, in the source directory (polling directory) there are many files? How can XI handle the correct sequence of messages? Is this impossible. How XI poll on a file (sender) - what is the logic? The files should be polled by FIFO.
    Thanks in advance.
    Regards
    Frank

    Hi,
    There is a logic called EOIO. Its exactly once in Order (EOIO). It takes care of all these iisues. Also XI gurantees the delivery of files.
    Refer these links
    http://help.sap.com/saphelp_nw04/helpdata/en/e3/94007075cae04f930cc4c034e411e1/content.htm
    Regards
    Aashish Sinha
    PS ; reward points if helpful

  • File adapter (sender) module throws exception, but adapter proceeds again

    Hello dear reader,
    I wrote a module that converts a flat file into XI-XML and tested it within the file adapter. It works fine so far. But if I force the module to throw an exception to handle an erroneous flat file, the file adapter tries to proceed the erroneous file again and again. Not very nice, isn´t it?
    Has anybody an idea, how to configure the file adapter to stop the processing of an erroneous file?
    Thank you in advance
    Yours
    Frank Waskow

    Hello Satish,
    the weblog doesn´t describe my problem correctly. Let me show you the Audit Log from the Messeage Display Tool of the Adapter Engine:
    Audit Log for Message: 06ff54a0-a258-11db-b9e2-003048226013
    Time Stamp     Status     Description
    2007-01-12 16:14:49     Success     Send text file "Invoice_error_wf.edi" from FTP server "HH-168:/XI_Infotag_Testdaten/EDIX/In", size 27993 bytes with QoS EO
    2007-01-12 16:14:50     Error     Attempt to process file failed with null
    2007-01-12 16:15:00     Success     Send text file "Invoice_error_wf.edi" from FTP server "HH-168:/XI_Infotag_Testdaten/EDIX/In", size 27993 bytes with QoS EO
    2007-01-12 16:15:00     Error     Attempt to process file failed with null
    2007-01-12 16:16:00     Success     Send text file "Invoice_error_wf.edi" from FTP server "HH-168:/XI_Infotag_Testdaten/EDIX/In", size 27993 bytes with QoS EO
    2007-01-12 16:16:00     Error     Attempt to process file failed with null
    2007-01-12 16:17:00     Success     Send text file "Invoice_error_wf.edi" from FTP server "HH-168:/XI_Infotag_Testdaten/EDIX/In", size 27993 bytes with QoS EO
    2007-01-12 16:17:00     Error     Attempt to process file failed with null
    2007-01-12 16:18:00     Success     Send text file "Invoice_error_wf.edi" from FTP server "HH-168:/XI_Infotag_Testdaten/EDIX/In", size 27993 bytes with QoS EO
    2007-01-12 16:18:00     Error     Attempt to process file failed with null
    It seems to me that the Adapter gets the error of the module, but it is not handled as an error like shown in the blog <a href="/people/sap.user72/blog/2005/11/29/xi-how-to-re-process-failed-xi-messages-automatically:///people/sap.user72/blog/2005/11/29/xi-how-to-re-process-failed-xi-messages-automatically.
    The adapter tries to proceed the same file again and again, till I delete it from the source directory.
    Any more idea?
    Frank

  • FIle Adapter Receiver - Content Conversion

    I have a xml file as below that I am trying to convert to a simple csv file. All I get is a blank csv file at the ouptput. I tried different setting for the file conversion in the reveiver file adapter. No luck yet. I could write to an output XML file with no problem, so my interface is working!
    The SAP Help doesn't provide  much info on this. Your help is highly appreciated.
    Thnaks.
    ?xml version="1.0" encoding="UTF-8" ?>
    - <ns:PlantMaintenanceMessageType xmlns:ns="http://cs.par/demo/plantmaintenance">
      <EquipmentID>10005661</EquipmentID>
      <FunctionalLocation>KB</FunctionalLocation>
      <Date />
      <Time />
      </ns:PlantMaintenanceMessageType>

    What is your root node ?
    For your content conversion you need to specify the Recordset Structure but in your case i dont find an entry for the same.
    If your XML had an extra tag like
    xml version="1.0" encoding="UTF-8" ?>
    - <ns:PlantMaintenanceMessageType xmlns:ns="http://cs.par/demo/plantmaintenance">
    <b><details></b>
    <EquipmentID>10005661</EquipmentID>
    <FunctionalLocation>KB</FunctionalLocation>
    <Date />
    <Time />
    <b></details></b></ns:PlantMaintenanceMessageType>
    then your record set structure wud be details
    and in you content conversion parameters you cud say
    details.fieldSeparator -> ,
    details.endSeparator 'nl'
    I guess you are on sp13 or above hence there even if you content conversion fails a blank file will be created (thats what i have experienced).
    Reagrds,
    ShaBZ

  • Get File Name in UDF from file adapter sender

    Hi,
    I've looking for this solution, but I couldn't find any usefull information.
    I want to obtain the name of the file, sended by the file adapter.. and later use it in the mapping logic.
    I've readed about sustitution... any help?
    Thanks.

    HI Stortoni,
    Take a look at these blogs:
    http://wiki.sdn.sap.com/wiki/display/XI/CombiningthreedifferentaspectsofPIinoneshot
    /people/michal.krawczyk2/blog/2005/11/10/xi-the-same-filename-from-a-sender-to-a-receiver-file-adapter--sp14
    /people/sap.user72/blog/2005/07/15/copy-a-file-with-same-filename-using-xi
    Regards,
    ---Satish

  • Reading severl files in file adapter sender

    Hi all,
    I need to read several files and perform checks on there attributes,
    like name and date of creation.
    and only if the checks are o.k i need to transfer them to, otherwise i need to send an email reporting the error.
    I saw in the sender file adapter an option of reading several files, how does it work, how can i perform the checks.
    I thing that i can also perform this task using BPM, but from whet I understand it can be problematic when reading big files.
    Thanks,
    Naama

    >>NFS
    You are going to pick the files of same types or different types?
    If it is of same type: Use below informtion.
    file.sourceFileName=<filename>
    Specify the name of the file that you want to process.
    The name can contain a placeholder (*) at any point, so as to be able to select a list of files for processing.
    The following are valid examples for filename:
    myFile.txt
    my*.txt
    *.txt
    [Read Multiple Files from File Adapter.|http://help.sap.com/saphelp_nw04/helpdata/en/0d/00453c91f37151e10000000a11402f/frameset.htm]
    Names that comprise more than two parts are also permitted.
    If the files are of different types the use this approach:
    Thanks
    Farooq.

  • File Adapter - Sender/Receiver

    We may have scenario where XI will be using File adapter to deliver messages to Application X  in the landscape.
    As part of Load balancing of Application X, there are multiple servers running. Say, If Iam delivering the  file to one location, If that server is down I should send files to different location.  How can I achive that ?

    Hi ST,
    I guess your 10 receivers are physically different. So they will have different IPs.
    I do not know if you can adress a receiver dynamic. As far as I know it is not possible.
    Maybe one solution is to write your own adapter.
    On the other hand, thinking about a webService that pings the receiver systems and gives a message back to XI, which servers are online.
    Than first call the WebService. In BPM you receive a list/ a message which servers are online. In a fork you could decide with a condition, which branch to use.
    Sorry, that I cant give you a better solution.
    Regards Mario

  • File Adapter - Sender Problem

    Hi,
    While implementing a file to file interface I am facing problem in Integration Engine. Data is not passing to Integration engine, so it is not able to reach receiver.
    Receiver file adapter is working fine for other scenarion like IDoc to File.
    File Adapter status is Green in RWB.
    I am not able to see message in SXMB_MONI
    The error details in Adapter Engine is bellow
    Audit Log for Message: 410424a0-c496-11da-aa48-00111120e6db
    Time Stamp Status Description
    2006-04-05 16:51:37 Success Channel file2file_in_channel: Send binary file  "D:\usr\sap\QN7\DVEBMGS00\work\XiPattern2\testfile2in.xml". Size 209 with QoS EO
    2006-04-05 16:51:37 Success Application attempting to send an XI message asynchronously using connection AFW.
    2006-04-05 16:51:37 Success Trying to put the message into the send queue.
    2006-04-05 16:51:37 Success Message successfully put into the queue.
    2006-04-05 16:51:37 Success The application sent the message asynchronously using connection AFW. Returning to application.
    2006-04-05 16:51:37 Success The message was successfully retrieved from the send queue.
    2006-04-05 16:51:37 Success File "D:\usr\sap\QN7\DVEBMGS00\work\XiPattern2\testfile2in.xml" deleted after processing
    2006-04-05 16:51:37 Success The message status set to DLNG.
    2006-04-05 16:51:37 Error Transmitting the message to endpoint http://sapep:50000/sap/xi/engine?type=entry using connection AFW failed, due to: Received HTTP response code 404 : Not Found.
    2006-04-05 16:51:37 Success The asynchronous message was successfully scheduled to be delivered at Wed Apr 05 16:56:37 GMT+05:30 2006.
    2006-04-05 17:01:37 Success The message status set to WAIT.
    2006-04-05 17:06:37 Success Retrying to send message. Retry: 3
    2006-04-05 17:06:37 Success The message was successfully retrieved from the send queue.
    2006-04-05 17:06:37 Success The message status set to DLNG.
    2006-04-05 17:06:37 Error Transmitting the message to endpoint http://sapep:50000/sap/xi/engine?type=entry using connection AFW failed, due to: Received HTTP response code 404 : Not Found.
    2006-04-05 17:06:37 Error The message status set to NDLV.
    Please suggest the solution.
    Is there any place where I can find the exact error log?
    Thanks,
    Smita.

    Hi,
    I found there was a problem with HTTP port in the URL. After fixing this, I am able to see the message in SXMB_MONI. But it is with an error. The error details is as bellow.
    <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
    - <!--  Call Adapter
      -->
    - <SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="">
      <SAP:Category>XIServer</SAP:Category>
      <SAP:Code area="INTERNAL">AE_DETAILS_GET_ERROR</SAP:Code>
      <SAP:P1>af.qn7.sapep</SAP:P1>
      <SAP:P2 />
      <SAP:P3 />
      <SAP:P4 />
      <SAP:AdditionalText>no_messaging_url_found: Unable to find URL for Adapter Engine af.qn7.sapep</SAP:AdditionalText>
      <SAP:ApplicationFaultMessage namespace="" />
      <SAP:Stack>Error when reading the access data (URL, user, password) for the Adapter Engine af.qn7.sapep</SAP:Stack>
      <SAP:Retry>M</SAP:Retry>
      </SAP:Error>
    In RWB->Adapter engine there is a success message, But in the RWB->Integration Engine there is an error with Error Code : AE_DETAILS_GET_ERROR.
    Please suggest how to fix this. I am able to logon to XI system with user XIAFUSER.
    Thanks,
    Smita

  • Setting the File Adapter Sender Source Directory...

    Good morning, Experts
    We have 2 sender file adapter communication channels in XI 7.0. Source directories for each are as follows:
    Channel A - //757spgmr16-xp.sauder.com/SAP
    Channel B - //devqas.sauder.com/ROOTBIN
    Channel A works.  Channel B does not.  It returns "Configured source directory '//devqas.sauder.com/ROOTBIN' does not exist".  When I remote into the XI box as the administrator I can open a Windows Explorer window and can see both of these source folders.
    What user ID is used to access the NFS for the communication channel???
    Any help you could give would be greatly appreciated.
    Thanks,
    Chad

    Is the integration engine running in a service on the XI server???  There are a number of SAP labelled services.  Some are started with the log on of "Local system", some with the administrator account and then some with an ID of "SAPServicePID".
    My guess here is that possibly this SAPServicePID user is running the integration engine and does not have permissions to the source directory???  Could this be the case???
    Can somebody tell me the name of the service for the integration???

  • File adapter sends return message to SOAP adapter

    Hi,
    I have managed to send a message using a SOAP sender adapter to a file using the file adapter. The respective message is written to a file. Though both adapters are configured to work in an asynchronous way, the file adapter seems to try to return as message. This results in an error message: "Das Interface-Mapping ... ist nicht im Laufzeit-Cache vorhanden". I have updated and checked the runtime cache. The respective mapping program is available and working, since the file adapter writes the send date to the file. So why this message?
    Kind regards,
    Heiko

    The file adapter replies the sent message, when it is addressed in sync mode.
    Set in the SOAP sender channel the Quality-of-Service to Exactly-Once to avoid this behavior.
    Regards
    Stefan

Maybe you are looking for

  • Issue with the field (Trading Partner) in the BW report

    The Info Object 0PCOMPANY (Trading Partner) is having a reference char 0COMPANY in the BW system so the data for the field Trading partner text will be pulled from 0COMPANY_TEXT data source. I have checked in the info object 0PCOMPANY in the tab mast

  • RE: GR Processing Time not showing in MD04 and Exception List

    Hi, Just a quick question on GR Processing Time. A sales order has been raised and delievery day is for lets say 05/04/2010. MRP runs and it creates a planned order to be finished on the 05/04/2010 but it should finish on 04/04/2010 and as I have a G

  • How do I put a picture in this box here?

    And how do I start making points?

  • Can I import Photos NOT in iPhoto?

    I have a large number of photos on my computer that I'd like to use in iMovie but DON'T want to import them into iPhoto. Is there any way to accomplish this? Seems like the only options for Photos is either via a connected camera or thru iPhoto. Am I

  • SFTP channel error

    Hi, I am using SFTP where I am converting a flat-file to XML using module. I am getting the following error in channel: Could not deliver message to XI: com.sap.aii.af.service.cpa.CPAException: Couldn't retrieve inbound binding for the given P/S/A va