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

Similar Messages

  • File content conversion:move files to a new directory

    hi all,
              I have a file content conversion sender and receiver scenario.Now my doubt is: XI is running on sap27 server.Input file is being created by an ABAP program in r/3 and file being put in sap29 server.
    In source directory if i am giving the sap29 path it is not working.Is there any way that i can write a OS command to move files from 29 to 27 before message processing ??
    Any other option available??
    thanks,
    Nisheeta

    hi,
          Yes the basis people have shared the folder and they have mapped the sap29 folder into sap27 using I:\ drive
    But the files are not getting picked....am i giving the source directory wrong??
    I am giving I:\Folder_Name
    suggestions needed
    thanks,
    Nisheeta

  • Blogs for File content conversion in File Adapter

    hi all,
    Can some one give me the links for File Content Conversion for File to File Scenario. please.
    Thanks in advance.

    Hi
    For Sender
    /people/venkat.donela/blog/2005/06/08/how-to-send-a-flat-file-with-various-field-lengths-and-variable-substructures-to-xi-30
    /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/sap.user72/blog/2005/01/06/how-to-process-csv-data-with-xi-file-adapter
    /people/anish.abraham2/blog/2005/06/08/content-conversion-patternrandom-content-in-input-file
    SAP Help for sender
    http://help.sap.com/saphelp_nw04/helpdata/en/2c/181077dd7d6b4ea6a8029b20bf7e55/content.htm
    For Receiver:
    /people/arpit.seth/blog/2005/06/02/file-receiver-with-content-conversion
    SAP Help for receiver
    http://help.sap.com/saphelp_nw04/helpdata/en/d2/bab440c97f3716e10000000a155106/content.htm

  • Query regarding file content conversion using file adapter

    Hi All
    I have a question regarding file content conversion in file adapter.
    I have a file coming in the following format.
    AA,111,222,333
    BB,444,555,666
    CC,777,888,999
    My incoming message structure has a hierarchy. The CC record is a structure part of BB record. BB record is a structure part of AA record. It is like this:
    AA,111,222,333
    <<BB,444,555,666>>
    <<<<CC,777,888,999>>>>
    After file content conversion, in the resulted xml, i am getting a flat hierarchy instead of nested hierarchy.
    Is it possible to get a nested hierarchy as a result of file content conversion?
    Please let me know
    Thanks
    Chandra

    Hi Udo
    According to your suggestion, I am trying to use mapping.
    I am getting a flat file and i am reading it.
    This is my source structure:
    AA,11,22,33
    BB,44,55,66
    CC,77,88,99
    This is my required targer structure:
    AA,11,22,33
    <<BB,44,55,66>>
    <<<<CC,77,88,99>>>>
    To explain this, BB record can have multiple records of CC records.
    AA records can have multiple records of BB record.
    I am using removecontext node function.
    CC (Source)  (removecontext)-> CC (target structure)
    But here, when i rightclick on source CC field in the mapping editor, i cannot see any other context except root node. So, how can i proceed here??
    Many Thanks
    Chandra

  • File Content Conversion on the Receiving side

    Is there a way in which if I want a Pipe Delimited File as a result, after the last field also I get a pipe with next record starting in the next line.

    Hi,
    For | (Pipe), use corresponding hex code as fieldSeparator i.e. 0x7C as fieldSeparator.
    For FCC on receiver side refer -
    [Simple FCC|http://www.riyaz.net/blog/index.php/2008/02/19/xipi-file-content-conversion-for-simple-structure/], [Complex FCC|http://www.riyaz.net/blog/index.php/2008/02/20/xipi-file-content-conversion-for-complex-structures/]
    For separotor at the end of line you can try using a dummy field or use combination of pipe and newline i.e. '0x7C' and '0x0D' (stands for carriage return) or 'nl' as endSeparator
    Edit: You might consider using 'nl' as beginSeparator parameter and 0x7C as endSeparator. This will do the trick. However, this would add a blank line in the beginning of the file.
    Hope this helps.
    Regards,
    Riyaz
    Edited by: Riyaz Sayyad on Aug 21, 2008 3:00 PM

  • ** File Content Conversion Error in Receiver CC - How to solve this?

    Hi friends,
    My target structure looks like below.
    EmployeeJobDetails                                        --> Message Type
       JobCode                                                      --> Node
            EmployeeNumber            xsd:string
            Domain                           xsd:string
       JobTrack                                                     --> Node
             Department                    xsd: string
             Position                         xsd: string
    I use the FCC parameters in the receiver CC as below:
    Recordset Structure:    JobCode,JobTrack
    JobCode.fieldSeparator = |
    JobCode.endSeparator = 'nl'
    JobTrack.fieldSeparator = |
    JobTrack.endSepartor = 'nl'.
    Because, we want the output like below
    1099|Raja
    Accts|JuniorAccountant
    1100|Ram
    HR|Recruiter
    like this.
    In this scenario Source is XML and target is txt file.
    I am using XSLT Mapping. The FCC works fine, if my source input file contains some records. But, when we send empty source XML file as below
    <?xml version="1.0" encoding="UTF-8"?>
    <EMPLOYEE_DATA/>
    Mapping works fine. Message is processed successfully in SXMB_MONI. The payload in response also comes with Message Type name like below
    <EmployeeJobDetails    namespace >
    </EmployeeJobDetails>
    While convert this, the system throws below error.
    Error Message:
    Message processing failed. Cause: com.sap.aii.af.ra.ms.api.RecoverableException: Exception in XML Parser (format problem?):'java.lang.Exception: Message processing failed in XML parser: 'Conversion configuration error: Unknown structure '' found in document', probably configuration error in file adapter (XML parser error)': java.lang.Exception: Exception in XML Parser (format problem?):'java.lang.Exception: Message processing failed in XML parser: 'Conversion configuration error: Unknown structure '' found in document', probably configuration error in file adapter (XML parser error)'
    Friend, how to convert this when source XML is empty.
    But, if we remove JobTrack node in target strucutre and remove the JobTrack parameters in CC, then if we send the same empty XML file FCC is working  fine and  we  get the target text file 0 KB. (Amazing !!)
    But, in the first case, how to solve the issue?
    Kind Regards,
    Jegathees P.

    Hi friends,
    If we remove JobTrack node in target strucutre and remove the JobTrack parameters in CC, then if we send the <b>same empty XML file</b> FCC is working fine and<b> we get the target text file 0 KB</b>. (Amazing !!)
    But, if we give parameters like JobCode,JobTrack then send pass the same empty file, we face the problem 'File Content Conversion' Error.
    Searching solution for this problem ...

  • File content conversion in File-to-RFC without  BPM

    Hi,
    I am using FCC for file to RFc scenario.
    My input record is in the following format:
    Header record
    data rec1
    data rec2
    Trailer record..
    The parameters are used in File content conversion:
    Recordset Name : Header,item
    Recordset Structure: Header,1,item,*
    key field name : data1
    and in additional parameters:
    Header.fieldNames            HI,GenDate,Ftype,Fname,Fdate
    Header.keyFieldValue       Fname
    Header.fieldFixedLengths 1,8,1,50,8
    Header.endSeparator        nl
    item.endSeparator             nl
    item.fieldNames                  DATA1,DATA2,DATA3,DATA4
    item.keyFieldValue             item
    item.fieldFixedLengths       231,240,241,120
    item.lastFieldsOptional       YES
    Can anyone check whether any parameters are left, b'cos the file is not being read with this settings. and in the C.C its just showing file processing successfully but not able to see the actual file.

    Hi,
    I assume you have header, item and trailer structure in source file.
    Source Data Type will be as follows.
    RecordSet
    --> Header
          --> KeyField(Value OH)
          --> H1
          --> H2
    --> Item
          --> KeyField (Value OL)
          --> I1
          --> I2
    -->Trailer
          --> KeyField (Value OT)
          --> T1
          --> T2
    Where Item Strucutre can come multiple times.
    Please use following settings.
    Recordset name: RecordSet
    RecordSet Structure: Header,1,Item,*,Trailer,1
    Key Field Name: KeyField
    Header.fieldNames: KeyField,H1,H2
    Header.fieldFixedLengths: 2,3,4
    Header.processFieldNames: fromConfiguration
    Header.keyFieldValue: OH
    Header.LastFieldsOptional: YES
    Item.fieldNames: KeyField,I1,I2
    Item.fieldFixedLengths: 2,5,6
    Item.processFieldNames: fromConfiguration
    Item.keyFieldValue: OL
    Item.LastFieldsOptional: YES
    Trailer.fieldNames: KeyField,T1,T2
    Trailer.fieldFixedLengths: 2,8,9
    Trailer.processFieldNames: fromConfiguration
    Trailer.keyFieldValue: OT
    Trailer.LastFieldsOptional: YES
    Regards,
    Gouri

  • File content conversion for file with hierarchical structure

    Hi
    I want to read a flat file in the following message structure using file content conversion.
    Message structure is :
    01 ( occurence = 1)
    _ 1B (occurence = unbounded)
    _ 1G (occurence = unbounded)
    _1H (occurence = 1)
    _1N ( occurence = unbounded)
    99 (occurence = 1, trailer record)
    In short there will be one 01 ( header record) in file. There will multiple 1B records. Under one 1B record there will multiple 1G records. Under each 1G record there will be one 1H recoprd and multiple 1N record. At the end there will one 99 record.
    File format : Fixed length
    Data in the text file would be as follows :
    01Test
    1BF0001MS005       4855390859  
    1GF000172075F31501  GBPINV 040806
    1HF000172075F 
    1NF000172075F0011MS0051125002FOOUKSTFOOD
    1NF000172075F0021MS0056540003ICOMSIEARCA 
    1BF0111TT005       3454390859  
    1GF011172075F31501  INRINV 040806
    1HF011172075F 
    1NF011172075F0011MS0051125002FOOUKSTFOOD
    1NF011172075F0021MS0056540003ICOMSIEARCA 
    99002187004855390859
    Is it possible to do above using file content conversion or is there any method to do it. Please suggest.
    Thanks
    Varun

    you cant acheive this heirarchy using the file adapters cont. conv, cos it supports only to a single level.
    Maybe you can have a module or use the conversion agent !!
    Some good reads on the Conv. agent!!!
    /people/william.li/blog/2006/03/17/how-to-get-started-using-conversion-agent-from-itemfield
    /people/paul.medaille/blog/2005/11/18/conversion-agent-a-free-lunch
    /people/alexander.bundschuh/blog/2006/03/14/integrate-sap-conversion-agent-by-itemfield-with-sap-xi
    /people/paul.medaille/blog/2005/11/17/more-on-the-sap-conversion-agent-by-itemfield

  • File Content Conversion CSV File

    Hello All,
      I have a CSV file in the below format.
    a,b,c
    And my content conversion works.
    <1>a</1>
    <2>b</2>
    <3>c</3>
    Sometimes I get the records in the file as
    a,b,
    My conversion is failing, I mean it give me file as
    <1>a</1>
    <2>b</2>
    The last element <3></3> is not getting created.
    I tried to use lastFieldsOptional its not working.
    How can I achieve this.
    Regards,

    Okay Satish I will give a last try to explain you my issue..
    my CSV file is like this a,b,c,d
    my conversion works fine so the xml is after conversion
    <1>a</1>
    <2>b</2>
    <3>c</3>
    <4>d</4>
    Now few rows in the file may come as a,b,c, there is no d value it is blank.
    so I expect the conversion to be now
    <1>a</1>
    <2>b</2>
    <3>c</3>
    <4></4>
    like this, but what I am getting now is after conversion...
    <1>a</1>
    <2>b</2>
    <3>c</3>
    tag <4></4>  is not getting created and my Outbound expects the XML to be in that format, so for this I tried to use lastfieldsoptional so that empty <4></4> tag is created but no luck...
    This is what I want to do..
    In the process even though <4></4> is not created File Content Conversion is successful and so Adapter Monitoring is showing success and my mapping fails.
    Regards,

  • Doubt regarding file content conversion Recever File adapter.

    target structure.
    <?xml version="1.0" encoding="UTF-8"?>
    <ns1:MT_ChangeOfAddress xmlns:ns1="urn:passhe.com/ChangeOfAddressISA28">
         <BUSINESS_PARTNER>
              <item>
                   <CAMPUSCODE>65</CAMPUSCODE>
                   <STUDENTNUMBER>6500000192</STUDENTNUMBER>
                   <ST_OBJID>732298498</ST_OBJID>
              </item>
         </BUSINESS_PARTNER>
    </ns1:MT_ChangeOfAddress>
    target structure is look like this.
    MT_ChangeOfAddress
         BUSINESS_PARTNER  (1,1)
              item       (0 to unbounded)
                  CAMPUSCODE (0,1)
                  STUDENTNUMBER (0,1)
                        ST_OBJID      (0,1)
    I have given below parameters in recever file adapter (file content conversion)
    Recordset Structure : item
    item.fieldNames  : CAMPUSCODE,STUDENTNUMBER,ST_OBJID
    item.fieldSeparator: , (comma)
    i am getting first two digits in my output file: that  file has only first two digits that is : 65
    may i know how hould i define file contente conversion recever adapter to get proper data in file adapter.
    thanks,s
    Dhanush

    Hi,
    Go through these blogs:
    /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/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/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
    Thanks,
    Satya

  • Issues  in  File Content Conversion  in a Sender Adapter

    Hi Folks ,
    The XMl Structure of my input file is
    <?xml version="1.0" encoding="UTF-8"?>
    <ns:file_sender_mt xmlns:ns="urn:filetofiledemo">
      <recordset>
        <data>
          <name />
          <city />
          <age />
        </data>
        <adress>
          <fnaame />
          <lanme />
        </adress>
      </recordset>
    </ns:file_sender_mt>
    In my file conversion paramaters i have mentioned
    data.fieldSeparator ,
    data.fieldNames name,city,age
    adreess.fieldSeparator ,
    adreess.fieldNames fnaame,lanme
    ignoreRecordsetName  true
    recordset.fieldSeparator ,
    data.endSeparator ,
    I fail to understand when in my input file
    i give
    1,2,3
    4,5
    ie value of data and adrees on diff lines it works fine
    bt when i give the imput as 1,2,3,4,5
    it fails in adapater
    giving the exception
    Sender Adapter v1014 for Party '', Service 'filetofile_bs':
    Configured at 12:11:43 2006-07-18
    Last message processing started 05:22:34 2006-07-19, Error: Conversion of complete file content to XML format failed around position 0 with java.lang.Exception: ERROR converting document line no. 1 according to structure 'data':java.lang.Exception: ERROR in configuration: more elements in file csv structure than field names specified!
      last retry interval started 05:22:34 2006-07-19
      length 10,000 secs
    I dont understand why i am getting this error as my data.endSeparator is ,
    any inputs on this would be of grt help 
    Thanks
    Amit

    Mam if you look at my XML
    <?xml version="1.0" encoding="UTF-8"?>
    <ns:file_sender_mt xmlns:ns="urn:filetofiledemo">
      <recordset>
        <data>
          <name />
          <city />
          <age />
        </data>
        <adress>
          <fnaame />
          <lanme />
        </adress>
      </recordset>
    </ns:file_sender_mt>
    I have 5 paramaters
    name ,city ,age , fnaame , lname
    and i am pasing those 5

  • File Content Conversion on the Sender Adapter in PI 7.1

    Hi Experts
    I am working on a file to Proxy scenario where my file is fixed format length which will have only one Structures (Details Records) that would be coming from the text file but in the message type I have delcared Header, Detail , Trailer,
    However I would be receiving the only Detail part (No header and Trailer) in some instances  what value should I give for the header and trailer in the Content conversion part,
    Thanks
    PR

    Since you are going to get values only some instances  for header and trailer node, you can create
    Header  structure   &  Trailer structure  - make the occurence 0 to 1
    Note: if your Header and Trailer values are empty for some instances then no worries. You declare FCC fields for header and trailer similar to Details.
    Refer SAP FCC help link.

  • .csv file Vs .txt file Content conversion sender file channel

    Hi Experts,
                     I have a file with filename say input.csv.I want to do content conversion for these .CSV file.Is it same like we have to do for .txt file say input.txt.
    when i open my .csv file in notepad, i get multiple rows with each field separated by ';'.what are the content conversion parameters we have to define for .csv file and can we mention input.csv as the file name as a source file name.
    Thanks
    Deepak

    Hi,
    Use the following parameters for Sender file channel in case of reading .csv file
    Recordset Structure.fieldSeparator -
    Recordset Structure.endSeparator -
    'nl'
    Recordset Structure.fieldNames -
    provide field names separated with ,
    Regards
    Seshagiri

  • File Content Conversion at the receiver side

    Hello All,
    I have a field which has to be truncated at 50th character. What content conversion parameters do I need to add ...?!?!?
    Thanks,
    Smita

    Hi Smita,
    As understood by your question you want a target field to be of 50 character,
    either you can apply substring function in your mapping to that target node.
    It would be much more clear if you mention hows your source file structure is it fixed length or delimiter separated, if it fixedlength file you can apply this parameter in Content conversion <b>fixedLengthTooShortHandling</b> with value <b>Cut</b> nad mention your required length.
    Rewards point if it is helpful,
    Thanks
    Anu Singhal

  • File Content Conversion: Empty File

    Dear Experts,
    I'm doing a file to file scenario with FCC. My file gets picked up from the source folder but the communication channel doesn't send the file for processing ahead. This is the error I get in Communication channel monitoring:
    Channel Send_Acceptance_File: Entire file content converted to XML format
    2008-10-10 12:09:38| Warning |Channel Send_Acceptance_File: Empty document found. Proceed without sending message
    2008-10-10 12:09:38| Success |Confirmation mode test found. File will be resent next time
    I don't see any entry in sxmb_moni.
    What could be the possible reason for this.
    Thanks and Regards,
    Merrilly

    Hi Merrily
    Problem is with your FCC.
    Are you using Key field in FCC with and keyFieldInStructure      as ignore?
    This problem arises due to incorrect keys or Data type mis match for the record structure in FCC.
    Thanks
    Gaurav

  • File Content conversion at the sender adapter without Key field

    Hi All,
    I have a requirement ....We are using Message Transform Bean at the sender adapter (we are not going for FCC as we are tranforming a decryption) ..its is a flat file...
    we dnot have a key field for one of the node .....we have total 5 nodes under parent node and one of the node does not have key field ....
    NOTE: I guess we have to do either Java mapping or XSLT ..but not getting proper weblogs with program...
    and not well versed with coding...i got few codes which were either not fulfilling requiremment or they use stream tranformation where it is decaprecated in NWDS and does not allow to compile it properly .
    Can somebody get me a code for Java which uses Abstract tranformation ...which can full fill below requirement
    parent node
                  Node1
                       node 1a
                       node 1b
                  Node 2
                  Node 3
    Input Flat file is in below format
    example:
    Employee Headre Flat files
    Employee Detail Flat Files(this repeates numerous times as much as number of employees)
    Employee  Trailer Flat Files
    Loan Headre Flat files
    Load Detaisl Flat Files (this repeates numerous times as much as number of employees)
    Loan Trailer Flat files
    Assitance much appreciated thanks .
    Regards
    Kiran

    Hi Stefan,
    I will rephrase the question i guess its communication gap...
    1) we have an existing interface in 3.0..we are not copying the same interface to 7.1 as it was not according to standards and they are phasing out that system.
    2) In 3.0 they are reading the Flat files under one record .. the structure is as follows:
    Parent Node
               Node
                   Row
    They are reading all the flat files row by row.
    and even in receiver they are reading in the similar fashion
    3) In the current structure according to the FS we have to create a structure defined by them which is as below
          Employee
              Header
              Details   node 1
                 Details  node 1a
                  Details  node 1b
              Trailer
              Loan Header
              Loan Detail
              Loan Trailer
    Receiver structure is
    Employee
          Node (this will have the receiver fields which is about 30 fields)
    4) We have pulled a sample file from 3.0 for the existing interface as we din get the sample file for existing one in FS and Iam not sure whn are they gonna send it.
    5) In the existing interface payload we have everything matching even the field lengths and postions and even key fields and key fields we got from the FS
    6) problem is we donot have key fields for the Details node 1a and 1b even in FS or the existing payload and we got an update from the FS consultant that we will be receiving these fields but without keyfields...
    see i donot have any problem taking out the details 1a and 1b out of the details header and create the structure ,,,,but the main issue is without key field we will not be able to generate the 1a and 1b nodes or read it in the FCC or MTB (i have to use MTB as we are decryting the file from the sender).
    Or is there any other method apart from java mapping or module development to handle these files

Maybe you are looking for