New Line with File Content Conversion

Hi there
I have a interesting question, I need to add a new line in the middle of a flat file. I read an idoc and using content conversion I convert it to a flat file. Is there any way I can divide the idoc into 2 parts separated by a new line?
Thanx,
Jan

> I have a interesting question, I need to add a new line in the middle of a flat file. I read an idoc and using content conversion I convert it to a flat file. Is there any way I can divide the idoc into 2 parts separated by a new line?
Hi,
In my opinion using the regular FCC method I guess it will be not possible to create a new line in the middle of flat file. You can take the help of java mapping as described in bleow mentioned blogs to convert it into flat file. I am not sure but you can try with these options...
"JAVA MAPPING", an alternate way of reading a CSV file
Java Mapping to handle flat files in SAP XI
Regards,
Sarvesh

Similar Messages

  • New line in file content conversion....

    hi,
    i have a  scenario where i need to seperate two records with 2 lines
    example
    <record1> name1    name2      name 3    
    <record2> name11  name22     name 33
    where each records seperated by 2 lines
    i have tried using a endSeparator with 'nl' two times but it was no help
    kindly helkp me on this
    with regards
    N pradeep

    Hi,
    In FCC use two time Record.endSeparators
    Like
    Record.endSeparator - 'nl'
    Record.endSeparator - 'nl'
    I think this will solve yr problem.
    Regards
    Vikas

  • Splitting to new line in file content conversion in File Receiver adapter

    Hi,
    I have a requirement where I have to split the Header and Line item in separate lines. If the Target structure as follows:
    RecordSet>Record>Header-->LineItem.
    If I do Header and LineItem at the same level, I do not have a problem. If I do that I could not able to map from Idoc correctly. Therefore, I have to do LinteItem tag within Header.
    Please thru some Ideas , how we can this.
    Thanks
    Venkat

    Hi,
    In FCC use two time Record.endSeparators
    Like
    Record.endSeparator - 'nl'
    Record.endSeparator - 'nl'
    I think this will solve yr problem.
    Regards
    Vikas

  • Problem with File Content Conversion

    Hi All
    I am facing a problem with file content conversion.
    This is my sample file structure:
    Header_Record (Occurance - 1)
    Field1 in Header
    Field2 in Header
    Item(Occ-1 to n)
    Field3 in Item
    Field4 in Item
    <<ItemType>> (Structure in Item) (Occ - 0 to n)
    <<Field5>> in ItemType
    <<Field6>> in ItemType
    <<ItemTypeCategory>> (Structure in ItemType)(Occ - 0 to n)
    <<<<Field7>>>> in ItemTypeCategory
    <<<<Field8>>>> in ItemTypeCategory
    Footer_Record (Occurance-1)
    Field9
    Field10
    There is a key field 'Type' in all the above records with unique value in each record.
    Now, I defined Field content conversion as follows:
    Recordset Structure: Header_Record,1,Item, * , ItemType, * ,ItemTypeCategory, * ,Footer_Record,1
    Recordset Sequence: Ascending
    KeyField Name: Type
    Following are parameters defiled:
    Header_Record.Keyfieldvalue: 00
    Header_Record.fieldseperator: ,
    Header_Record.fieldnames: Field1,Field2
    Header_Record.endseperator: 'nl'
    Item.keyfieldvalue: 05
    item.fieldseperator: ,
    item.fieldfieldnames: field3,field4
    item.endseperator: 'nl'
    ItemType.keyfieldvalue: 10
    itemType.fieldseperator: ,
    itemType.fieldfieldnames: field5,field6
    itemType.endseperator: 'nl'
    ItemTypecategory.keyfieldvalue: 15
    itemTypecategory.fieldseperator: ,
    itemTypecategory.fieldfieldnames: field7,field8
    itemTypecategory.endseperator: 'nl'
    Footer.keyfieldvalue: 20
    Footer.fieldseperator: ,
    Footer.fieldfieldnames: field5,field6
    Footer.endseperator: 'nl'
    Now, i pass the following file:
    00,111
    05,222
    10,333
    15,444
    20,555
    What i expect out of my FCC is this (Sample output to show the hierarchy of field values):
    00,111
    05,222
    <<10,333>>
    <<<<15,444>>>>
    20,555
    But, I am getting this output (Hierarchy is missing. All the structures are in the same order without hierarchy):
    00,111
    05,222
    10,333
    15,444
    20,555
    Field values are being identified according to field content conversion, but, the hierarchy of the fields is missing.
    Can you please tell me how should i change my FCC config?
    Sorry for this long question.
    Many Thanks
    Chandra
    Edited by: Chandra Sekhar H on Jan 30, 2009 7:10 PM
    Edited by: Chandra Sekhar H on Jan 30, 2009 7:16 PM
    Edited by: Chandra Sekhar H on Jan 30, 2009 7:17 PM

    You will always get a flat structure from FCC. If you want hierarchichal strucuture, you have to create a target and map. You will get only like -
    Root
    --Recordset
    Group1
    Fields
    Grop2
    Fields
    Group3
    Fields
    VJ

  • Problem with file content conversion in receiver file adapter

    Hi All
    I have a problem with file content conversion in receiver file adapter.
    This is my recordset structure: Header_Record,1,Claim_Record,*,Check_Rec,1
    These are the content conversion parameters:
    Header_Record.fieldSeparator = ,
    Header_Record.endSeparator = 'nl'
    Claim_Record.fieldSeparator = ,
    Claim_Record.endSeparator = 'nl'
    Check_Rec.fieldSeparator = ,
    Check_Rec.endSeparator = 'nl'
    In SXMB_MONI, i can see that the data is correctly extracted from proxy, and correctly mapped to receiver message, and i see a checkered flag (success).
    But, Adapter status is RED with the following error message:
    Conversion initialization failed: java.lang.Exception: java.lang.Exception: Error(s) in XML conversion parameters found: Parameter '1.fieldFixedLengths' or '1.fieldSeparator' is missing
    In communication channel monitoring, i get the following error message:
    Message processing failed. Cause: com.sap.aii.af.ra.ms.api.RecoverableException: Channel has not been correctly initialized and cannot process messages
    What is going wrong here? Can anyone please tell me?
    Thanks
    Chandra

    Posted in Incorrect forum.
    Posted again in Process Integration forum

  • File Sender adapter with File content conversion

    Hi
    I'm having problems picking up a flat file that has some junk characters in the file.
    I'm usign a file sender adapter with file content conversion. The adapters shows the following error-
    Conversion of complete file content of  to XML format failed around position 0: sun.io.MalformedInputException
    this is the sample data with junk char's -
    A20099201009999009999060815160505051700130008151vÿÿÿÿ³  r 0OK0476                     31N016227241915840IV  00840 ÿÿÿ ÿ ÿÿÿÿÿÿÿÿ ÿ ÿÿÿ             
    There is not much in the file content conversion. This is a fixed length file, I'm just pickign it up & passing it to an inbound proxy. All my processing is in the proxy.
    I'd appreciate any suggestions.
    Thanks
    Rachana

    Hi Rachana,
    Do you use a specific "encoding" like UTF-8 or ISO-8859-1 in your Sender CC?
    To be simple, Encoding is linked to country, you can find all "iso-nnnn" via google or some of them in sap help.
    http://help.sap.com/saphelp_nw2004s/helpdata/en/e3/94007075cae04f930cc4c034e411e1/content.htm
    Moreover, with your source file opened thanks to Notepad (for instance), use option "save UNDER", you will the encoding use by your file
    Mickael

  • Module processor enhancement with file content conversion

    Hi All,
      I have a bean (module processor) that converts the a PDF doc to text. I need to use the same bean with file content conversion. Module processor processing sequence is as follows:
    1) My Bean: localejbs/myBean
    2) Default: localejbs/CallSapAdapter (Bean for file content conversion).
    When I tried the same (myBean + File adapter with file content conversion) , it was not working as expected. But the same bean works fine with normal file adapter (myBean + File adapter without file content conversion).
    Couldn't figure out the reason. Please help.
    Regards,
    Ajay.

    As the content conversion of the file adapter is done before calling the customer module, it is not possible to use both.
    As workaround you can do the file content conversion with help of the MessageTransformBean. In the module chain you put the MessageTransformBean after your module.
    Note that the configuration of the MessageTransformBean has to be done like the J2SE sender file adapter:
    http://help.sap.com/saphelp_nw04/helpdata/en/0d/00453c91f37151e10000000a11402f/frameset.htm
    You find an example here:
    https://websmp206.sap-ag.de/~sapdownload/011000358700001186732005E/HowToConveModuleJMS.pdf
    Regards
    Stefan

  • Problem with file content conversion for multiple substrcture. Please help!

    Hi Experts,
       I am using file content conversion in file sender communication channel. The input file is a flat file with data like this:
       A01 AA8I0NBVDA      20090704     84900
       A02 AA8I0NBVDA      20090704     84900
       A03 AA8I0NBVDA      20090704     84900
       I want the data in sender side after content conversion to be like this:
      <ns:Receive_Schedules xmlns:ns="http://mynamespace">
         <ScheduleData>
              <line>A01 AA8I0NBVDA      20090704     84900</line>
              <line>A02 AA8I0NBVDA      20090704     84900</line>
              <line>A03 AA8I0NBVDA      20090704     84900</line>
         </ScheduleData>
    </ns:Receive_Schedules>
    I have tried many options in file content conversion but getting the data like this:
    <ns:Receive_Schedules xmlns:ns="http://mynamespace">
         <ScheduleData>
              <line>A01 AA8I0NBVDA      20090704     84900</line>
         </ScheduleData>
           <ScheduleData>
              <line>A02 AA8I0NBVDA      20090704     84900</line>
           </ScheduleData>
           <ScheduleData>
              <line>A03 AA8I0NBVDA      20090704     84900</line>
           </ScheduleData>
    </ns:Receive_Schedules>
    Following are the settings/properties have configured in content conversion:
    Document Name     Receive_Schedules
    Document namespace     http://mynamespace
    Document Offset     <no value>
    Recordset Name     <no value>
    Recordset namespace     <no value>
    Recordset structure     ScheduleData,*
    Recordset sequence     Ascending
    Recordsets per message     1
    Key field Name     <no value>
    Key Field Type     String
    ignoreRecordsetName     true
    ScheduleData.endSeparator     'nl'
    ScheduleData.fieldNames              line
    ScheduleData.fieldSeparator     'nl'
    How to get the desired message? What changes I need to do in content conversion settings? Please help!
    thanks
    Gopal
    Edited by: GOPAL BALIGA on Jul 1, 2009 12:11 PM

    Hi Ranjan,
      My structure is like what you ahve defined.
      scheduledata...1.1
    ...line....0...Unbound
      I also tried the parameters you gave but still getting the same.
      <ns:Receive_Schedules xmlns:ns="http://mynamespace">
    <ScheduleData>
    <line>A01 AA8I0NBVDA 20090704 84900</line>
    </ScheduleData>
    <ScheduleData>
    <line>A02 AA8I0NBVDA 20090704 84900</line>
    </ScheduleData>
    <ScheduleData>
    <line>A03 AA8I0NBVDA 20090704 84900</line>
    </ScheduleData>
    </ns:Receive_Schedules>
    Following are the settings/properties have configured in content conversion:
    Recordset structure ScheduleData,*   -
    > Is the value correct?
    Recordset sequence Ascending  -
    > Is the value correct?
    Recordsets per message 1  -
    > Is the value correct?
    ignoreRecordsetName true
    ScheduleData.fieldSeparator nl
    ScheduleData.fieldNames line
    ScheduleData.endSeparator nl
    Edited by: GOPAL BALIGA on Jul 2, 2009 5:28 AM

  • Error in configuring File Sender Adapter with File Content Conversion

    Hi
    i am designing a File to File scenario using file content conversion in which the input is comma separated file and output is a XML document.
    mentioned below are the configuration information:
    Recordset Name: Substr
    Substr.fieldSeparator: ,
    Substr.endSeparator: 'nl'
    Substr.fieldNames: Name, Password
    Substr.keyFieldValue: Name
    and the error i can see in adapter framework is:
    Sender Adapter v0830 for Party '', Service 'FileContentConversion':
    Configured at 14:30:45 2005-04-07
    Initialization error: Conversion initialization failed with java.lang.Exception: java.lang.Exception: java.lang.Exception: Error(s) in XML conversion parameters found:
    Mandatory parameter 'Substr.fieldNames': no value found
    plz help me ASAP.
    thanks and regards,
    Varun Joshi

    Hi Varun...
    Regarding ur error.....the name and password u send in csv is not getting recognised.. so u have to check the data type structure.
    there must be a recordset name and subelement must be recordset structure..the data type must be
    <datatypename>
          <recordsetname>
               <recordsetructurename>
                  <name>
                   <password>
    please try in this format and ur name and password will get recognised

  • Problem with File content conversion and parameters

    Hi experts,
       What is the use of file content conversion that is available in file adapter? For what cases we can use it?
      What do the different content conversion parameters mean?
    Kindly help
    Thanks
    Gopal

    Hi,
    We use the file content convertion to conver the flat file that is text file into XML,
    File adapter cant understand the format the file is,so we have to declare the content convertion parameters.
    Check some links which will tell how the convertion is done.
    /people/venkat.donela/blog/2005/03/02/introduction-to-simplefile-xi-filescenario-and-complete-walk-through-for-starterspart1
    /people/venkat.donela/blog/2005/03/03/introduction-to-simple-file-xi-filescenario-and-complete-walk-through-for-starterspart2
    /people/arpit.seth/blog/2005/06/02/file-receiver-with-content-conversion
    /people/anish.abraham2/blog/2005/06/08/content-conversion-patternrandom-content-in-input-file
    /people/shabarish.vijayakumar/blog/2005/08/17/nab-the-tab-file-adapter
    /people/venkat.donela/blog/2005/03/02/introduction-to-simplefile-xi-filescenario-and-complete-walk-through-for-starterspart1
    /people/venkat.donela/blog/2005/03/03/introduction-to-simple-file-xi-filescenario-and-complete-walk-through-for-starterspart2
    /people/venkat.donela/blog/2005/06/08/how-to-send-a-flat-file-with-various-field-lengths-and-variable-substructures-to-xi-30
    /people/anish.abraham2/blog/2005/06/08/content-conversion-patternrandom-content-in-input-file
    /people/shabarish.vijayakumar/blog/2005/08/17/nab-the-tab-file-adapter
    /people/jeyakumar.muthu2/blog/2005/11/29/file-content-conversion-for-unequal-number-of-columns
    /people/shabarish.vijayakumar/blog/2006/02/27/content-conversion-the-key-field-problem
    /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/arpit.seth/blog/2005/06/02/file-receiver-with-content-conversion
    http://help.sap.com/saphelp_nw04/helpdata/en/d2/bab440c97f3716e10000000a155106/content.htm
    Regards,
    Phani
    Reward points if helpful

  • Problmes with file content conversion

    Hi,
    I have a working ftp file adapter. When I now try to switch this adapter to file content conversion, the adapter doesn't work. It doesn't even tries to connect to the ftp-server.
    Is it possible, that I have forget to fill out some information in the content conversion parameters or is there something wrong with the installation of the XI server?!
    We have XI 3.0 SP11
    Thank you for your help
    Thomas

    Hi Thomas,
    i saw the links about the data type into which the CSV should be converted and the parameters you have given for the content conversion.
    You have entered the following values:
    Recordset Name: set
    Recordset Structure: row,3
    Key Field Name: empty
    and the data type that you want looks like:
    <DT_INPUT>
                  <row>
                          <A></A>
                          <B></B>
                          <C></C>
                   </row>
    </DT_INPUT>
    also u have given the occurrence of recordset row as unbounded.
    For this to happen, you need to change some entries in Content Conversion Parameters, these are:
    Recordset Name: row
    Recordset Structure: row,*
    Key Field Name: row
    Moreover in your additional parameters you have given:
    row.fieldNames -
      A;B;C
    please use comma ',' as a field separator and not the semicolon ';'
    Make these changes and i hope your scenario works fine,
    thanks and regards,
    Varun Joshi

  • Remove blank line after File Content Conversion

    I have a File>Conversion on PI7.0 (SP10).
    It seems to add a blank line. The XML is:
    <?xml version="1.0" encoding="UTF-8" ?>
    - <ns0:EPIWCountFile xmlns:ns0="urn:com.somewhere.overthere.nothere">
      <Personal_Area>LU</Personal_Area>
    - <detail>
      <recordCount>17</recordCount>
      </detail>
      </ns0:EPIWCountFile>
    The conversion is done:
    recordset Structure=detail,
    name=detail.fieldseparator    ,
    The output file is
    17
    Hopefully you can see the blank line before the number!???
    I have changed the contexts while processing, and played with other options, but it always adds a blank line at the begin.
    All this file is a count of the number of records processed.  (The personal_area is for a variable name for file/folder creation)
    How can I remove the blank line, as the target system fails due to this anomaly?

    If you are in a development environment, try this
    Make your target structure
    <?xml version="1.0" encoding="UTF-8" ?>
    - <ns0:EPIWCountFile xmlns:ns0="urn:com.somewhere.overthere.nothere">
    - <detail>
    <b><Personal_Area>LU</Personal_Area></b>
    <recordCount>17</recordCount>
    </detail>
    </ns0:EPIWCountFile>
    Content conversion parameter
    detail.fieldFixedLengths 0,2
    detail.fixedLengthTooShortHandling Cut
    P.S: If you need <Pesonal_Area> tag only for File/Folder Name, then why dont you use Adapter specific Identifiers to achieve the same.
    Regards,
    Jai Shankar

  • Problem with File Content Conversion (Receiver FIle Adapter)

    Hi Experts,
    I have following structure in receiver side:
    MT_Test
       F1
       F2
       F3
       F4
    Now I want a CSV file in target side in below format:
    F1,F2,F3,F4
    I have provided below config in receiver file adapter under content conversion tab:
    Recordset Structure : MT_Test
    MT_Test.fieldSeperator= ,
    MT_Test.endSeperator= 'nl'
    But this is generating blank CSV files in target directory..What might be the reason.. I have checked the msg in adapter engine, the XML file is correct and contains valid values for the fields..Its something like below:
    <?xml version="1.0" encoding="UTF-8" ?>
    <MT_Test>
       <F1>Hai</F1>
       <F2>Hello</F2>
       <F3>Bye</F3>
       <F4>Hi</F4>
    </MT_Test>
    I should get CSV file as
    Hai,Hello,Bye,Hi
    But I am getting a blank file with above said config parameters in content conversion tab.
    What might be the reason for getting blank CSV files in target side???
    Thanks,
    Adi

    Hi Adi,
    >>My target structure in below format:
    <?xml version="1.0" encoding="UTF-8" ?>
    - <MT_Test>
    <F1>Hai</F1>
    <F2>Hello</F2>
    <F3>Bye</F3>
    <F4>Hi</F4>
    </MT_Test>
    So, try to edit Data type and include hierarchy level above <F1>.
    Finally your Target Structure will resembles like this.
    <?xml version="1.0" encoding="UTF-8" ?>
    - <MT_Test>
    <Structure>
    <F1>Hai</F1>
    <F2>Hello</F2>
    <F3>Bye</F3>
    <F4>Hi</F4>
    </Structure>
    </MT_Test>
    FCC Parameters will be like this.
    Structure.fieldSeparator = ,
    Structure.endSeparator = 'nl'
    Hope you were clear.
    Thanks,
    Siva.

  • Strange Problem with File Content Conversion (Sender)

    Hi,
    I have a strange problem. I have a sender file adapter with content conversion (csv -> xml). The adapter produces the following error during the processing...
    - 2006-02-06 16:34:00 CET: Error: Conversion of part of file content of 'OE_Extractor_47_ISW112_SC-Ireland.csv' to XML format failed around position 1202: IOException: Stream closed
    After the 4th or 5th try the adapter processes the file correctly.
    Why does it works after several tries and not at the first time? (The file is not changed during the adapter is trying to convert it)
    Thanks
    Thomas

    I found the problem, something was wrong with the ftp server

  • Receiver File Adapter with File content Conversion

    I have a requirement to send 2 different files to the target directory. Source is the same and different mapping for the 2 files.
    This I can achieve through multi-mapping but there is a problem. How can I use the File content for receiver File adapter which is using Multimapping.
    The structure of the 2 files also different.

    Why would you need FCC on receiver file adapter? If you need different files to be generated from the source, you could create two receiver channels with different mappings and just add them to the same Receiver Detemination. Isn't feasible?

Maybe you are looking for

  • Why do my contact photos keep getting assigned to the wrong person/number?

    This has happened to me twice recently:  my phone rings and the wrong contact photo appears with the wrong phone number.  All my contact photos are assigned to the wrong person/phone number.  Any ideas on what's going on?  Thanks!

  • EHP4 upgrade query

    Dear All, We are planning to upgrade our PRD server. We are upgrading from  ECC 6.0 to EHP4 in dual stack (ABAP+JAVA). We are running cluster in Active Passive mode. DB + ASCS + APP server on node 1 and node 2 is for fail-over switch and one DI insta

  • Is Quad slower than Mac Pro?

    I read Apples benchmarks about the speed of the Mac Pro. However, as they were so far off with other models in the past I thought I would ask here what Quad users are finding as a speed difference between the basic retail Mac Pro and the Quad. Geek P

  • VF 02 Problem

    Hi I we have issue Am Trying to Release the Billing Document to Accounting using VF02 but accounting entries not happening and am getting this message The accounting document has not yet been created Message no. VF062

  • Help on execute_query

    Hi to all, In a Form I have placed a button. in the trigger WHEN_BUTTON_PRESSED I have a code that: 1) create a WHERE string (LC$Whr) with some filter Items, initialized in the Header block; 2) after use this statement: Set_Block_Property( 'MYBLOCK',