File Conversion in Rec File Adapter with subnodes

Hi
My XML Structure is like this -->
<?xml version="1.0" encoding="UTF-8" ?>
- <ns0:MT_Test xmlns:ns0="urn:TESTconversion">
  <MstName>Hello</MstName>
- <Header>
  <TableName>1tst</TableName>
  <PayDate>0102</PayDate>
  <TotalAmt>24.00</TotalAmt>
  <Total>000002</Total>
  <PaySource>CHK</PaySource>
- <Subheader>
  <TableName>1tst</TableName>
  <SelectCatgry>test</SelectCatgry>
  <CustID>200</CustID>
  <PayAmount>11.00</PayAmount>
  </Subheader>
- <Subheader>
  <TableName>1tst</TableName>
  <SelectCatgry>test</SelectCatgry>
  <CustID>400</CustID>
  <PayAmount>13.00</PayAmount>
  </Subheader>
  </Header>
- <Header>
  <TableName>1tst</TableName>
  <PayDate>0103</PayDate>
  <TotalAmt>10.00</TotalAmt>
  <Total>000001</Total>
  <PaySource>ONE</PaySource>
- <Subheader>
  <TableName>1tst</TableName>
  <SelectCatgry>test</SelectCatgry>
  <CustID>100</CustID>
  <PayAmount>10.00</PayAmount>
  </Subheader>
  </Header>
</ns0:MT_Test>
which means
MT_Test is root 1..1
Header is the sub-node of MT_test as 1...*
Subheader is sub-node of Header which is also 1...*
rest of the fields are elements as 1..1
Now I need to convert this into Flat file using Receiver File Adapter, I gave this in my content conversion logic
recordset Structure -
MstHeader,BFKKZK,BFKKZP
MstName.addHeaderLine     0
MstName.fieldFixedLengths     8
MstName.endSeparator     'nl'
Header.addHeaderLine     0
Header.fieldFixedLengths     30,10,15,6,6
Header.endSeparator     'nl'
Subheader.addHeaderLine     0
Subheader.fieldFixedLengths     34,10,35,16
Subheader.endSeparator     'nl'
But with this I am getting exception as -->
Could not process due to error: java.lang.Exception: Exception in XML Parser (format problem?):'java.lang.Exception: Message processing failed in XML parser: 'Conversion configuration error: Unknown structure 'ns0:MT_Test' found in document', probably configuration error in file adapter (XML parser error)'
I know that http://help.sap.com/saphelp_nwpi711/helpdata/en/44/686e687f2a6d12e10000000a1553f6/content.htm says following -->
The expected XML structure contains the structure as nodes filled with any number of elements without additional subnodes.
But does that mean Structure with sub-nodes cannot be converted in flat format.
Pls. suggest the solution for this.
- lalit -

Shab
I resolved the issue & able to convert the hierarchical XML file into flat file with the desired format I wanted.
Rather then FCC, I use MessageTransformBean module and I have to insert more dummy contexts & dummy fields in the target structure in order to achieve the flat file format.
I am getting file ( not actual file below just template is shown below) like this now
Header1 ....details....
SubHeader1.1
SubHeader1.2
SubHeader1.x
Header2 ....details....
SubHeader2.1
SubHeader2.2
SubHeader2.x
Headerx ....details....
SubHeaderx.1
SubHeaderx.2
SubHeaderx.x
Once the total development is over on my side I will create the blog for this. So this following statement is only correct when you use protocol as FCC but not with module.
"The expected XML structure contains the structure as nodes filled with any number of elements without additional subnodes."
Thanks
Lalit

Similar Messages

  • File conversion and append file in receiver file adapter

    Hi
    I have a batch IDoc -> XI(3.0) -> file scenario with file conversion to create a flat CSV-like file. The problem is that because of the amount of data sent from R/3 (~20000 employees), the idoc is split into several idocs. In my receiver file adapter I want to append all the idocs contained in this data transfer to one flat file, before transmitting to FTP server.
    For the next batch transfer (the next day) XI should start all over and create a new file and append all idocs contained in that transfer before transmitting the flat file to FTP server.
    Can this be done using the 'Use Temporary File' and 'Append' options in the FTP connection Parameters in the comm-channel?
    It is not an option to append the file in the FTP-server, because the files in the destination folder are moved immediately after arrival, so the file will be moved before file adapter can append all the files.
    Does anyone have any suggestions to how to solve this?
    Br
    Kenneth

    Hi Kenneth
    Did you ever get a solution to this problem?
    Regards
    Russel Irvine
    [email protected]

  • File conversion in a file adapter

    Hi
    I am using a FTP file adapter to place the file in the ftp servers.
    The structure of the file is
      <?xml version="1.0" encoding="UTF-8" ?>
    - <p2:MT_Cust xmlns:p2="http://RashidaBPM">
      <Cust_no>KRTEST2</Cust_no>
      <Cust_Name>XI CUSTOMER 2</Cust_Name>
      <Cust_Address>GB</Cust_Address>
      </p2:MT_Cust>
    I want the resulta to come in as cust_no , cust_name, cust_address
    Can someone please help me to get the centent conversion parameters correct to get the desired result
    Thanks
    Nikhil

    Hi Nikhil,
    To convert a XML file into a flat file you need to have a Stucture of the XML file like this one mentioned below:
    <root>
    <substructure>
    <data>
    </data>
    </substructure>
    <root>
    By XML I mean the input data, that will be routed from XI server to FTP servers.
    now the parameters to be given in Content Conversion Tab and which are of utmost importance are:
    substructure.fieldSeparator
    root.fieldSeparator
    substructure.endSeparator
    you can also use the methods such as fieldFixedLengths etc.
    Include these methods and test your scenario again.
    I hope it helps,
    Thanks & Regards,
    Varun Joshi

  • XML file conversion after sender file content conversion

    Hi,
    I have issue refarding file content conversion.
    My input structure is
    <MT_RCICrecords>
    <TRNH>
      <RCIC>
        <RECH>
        <RECL>
      <RCIC>
    <TRNH>
    Afetr sender File content conversion (csv to xml) it produces xml file as below (since file conversion does not support 3rd level of hierarchy)
    <TRNH>
    <RECH>
    </RECH>
    <RECL>
    </RECL>
    </TRNH>
    It does not recognize RCIC.
    Now i am trying to map this to IDOC and getting error as
    'MT_RCICRecords tag found instead of IDOC BEGIN ='.
    CAn anyone suggest me how to chaage this xml output after File content conversion to add RCIC tag in xml file?
    I am new to XI so please give me some sample code to.
    Thanks.
    Yashpal
    Its urgent!

    My problem is xml generated from content conversion is like below
    <MT_RCICrecords>
    <TRNH></TRNH>
    <RECH></RECH>
    <RECL></RECL>
    <TRLR></TRLR>
    </MT_RCICrecords>
    and i want it to be
    <MT_RCICrecords>
    <TRNH></TRNH>
    <RCIC>
    <RECH></RECH>
    <RECL></RECL>
    </RCIC>
    <TRLR></TRLR>
    </MT_RCICrecords>
    which is not happening
    My input message structure is
    MT_RCICrecords
    TRNH
    RCIC
    RECH
    RECL
    i hope it is clear now
    TRLR

  • Howto use Converting File Content in Rec. Adapt. to suppress a xml-element

    Hi,
    we use PI/700, SP6.
    I have following structure (example):
    <MsgOut>
      <Sender>Partner1</Sender>
      <Receiver>Partner2</Receiver>
      <FlatPayload>
         blabla blabla
      </FlatPayload>
    </Msgout>
    Now I wanna use a XI-File-Adapter to write just a Flat-File with the content (of the element <FlatPayload>):
        blabla blabla
    (in other words: I wanna suppress all other xml-elements beside of FlatPayload)
    But I'm not able to configurate this with the function "Converting File Content"
    I tried different possiblities:
    e.g.
    setting yyy.fieldFixedLengths = 0 and yyy.fixedLengthTooShortHandling = Cut
    (yyy = Sender and Receiver)
    or
    just defining "MsgOut,FlatPayload" as RecordSet Structure (without Sender and Receiver)
    Result: no success.
    Now my question: is it possible to suppress some xml-elements?
    Thanks for your help!
    bye
    Wolfgang

    HI,
    You can suppress the XML Nodes/Elements over here. Not Fields ..
    For e.g if your outout xml is like this
    <MsgOut>
        <Sender>Partner1</Sender>
        <Receiver>Partner2</Receiver>
    <FlatPayload>
       <flatdata> blabla blabla</flatdatat>
    </FlatPayload>
    </Msgout>
    In this case you can suppress the <FlatPayload> node/element here.. Using Cut Parameter in the Receiver File Content COnversion.
    /people/sravya.talanki2/blog/2005/08/11/solution-to-the-problem-encountered-using-variable-substitution-with-xi-sp12
    So in your case, you can restructure your data type as you required.. I have mentioned in vice-versa here
    Hope this helps,
    Regards,
    Moorthy
    Message was edited by: Krishna Moorthy P

  • Sending File as attachment using Mail adapter with naming convention

    Dear All,
    I am working on a scenario in which my sender file adapter is sending one file named 'ABC.ok' in one of the folders in application server. I have to send the same file with the same name  to one of the folders at FTP and also to my customer at his email id.
    I have used File Content onversion at the receiver side and has selected adapter specific attributes due to which the required file is getting generated at FTP folder with the same name as that of the source. But how to send the same file using the mail adapter by keeping same name as "ABC.ok". Kindly guide me out in this.
    Regards,
    NJ

    what you need to do:
    1) Select ASMA in Sender and receiver File CC...already done
    2) Using the Dynamic Config UDF get the sender file name in the field Content-Type...for this you need to have a return statement in your UDF
    3) now before pushing this file name to the Content-Type you have to append (concat)the actual type of the file content (xml, txt)
    so your entire Content-Type node will have something like text/plain; name="abc.ok"
    SAP Note has reference on how to do this:
    https://service.sap.com/sap/support/notes/856599
    From the note:
    Q: How can I set the file name of a mail attachment?
    Regards,
    Abhishek.

  • Problem with omwb.mde file, conversion of mdb file to xml file

    I am trying to migrate MS Access 2000 to Oracle 8i.
    At the OMWB Wizard where it tells me to execte omwb.mde. Whenever I try and execute omwb.mde, MS Access opens up and I get the a radio box that says "Convert Database " or "Open Database" ,on selecting any of them
    i get the following message
    you can't convert or enable a MDE file
    What shud i do to overcome this problem
    Thanx in advance
    bhrigu

    DOMSource src = new DOMSource(resultDocument);
    resultDocument should be of type org.w3c.Node

  • Text file conversion - EDI data file

    Hi experts,
    I have a file as below :
    N1VNVendorName1VendorID
    N2VendorName2VendorName3
    N3VendorAddressLine1VendorAddressLine2
    N4VendorCityDU*823
    N1, N2......  are segment name and "*" is delemeter
    after that the data is filled in the attributes of segment. File is ".txt" file.
    How i can convert the file by using file adapter ?
    what will be the entries in file Comm. Channel tab : Content Conversion parameters ?
    Please help, its urgent,
    Regards,
    Study SAP

    follo these blogs for CCP:
    /people/venkat.donela/blog/2005/06/08/how-to-send-a-flat-file-with-various-field-lengths-and-variable-substructures-to-xi-30
    /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/michal.krawczyk2/blog/2004/12/15/how-to-send-a-flat-file-with-fixed-lengths-to-xi-30-using-a-central-file-adapter
    the field separator here wull be '*'

  • N93: VIDE0 FILE CONVERSION playback: AVI file to 3...

    I would like my AVI movie collection to play on the N93...
    Does anybody have a good tutorial to do so? i.e what software, settings, etc, Of course there is Adobe Premiere Elements, quicktime pro and this free software Super @,
    But how to use it?
    thanks!

    Check also http://forum.nokia.com/video for tables of supported audio/video formats.
    Use that information to choose which converter and what conversion settings to use, when you want to make your AVI files work on the phone.
    A fairly powerful tool for such conversions, IMO, is SUPER by eRightSoft:
    http://www.erightsoft.com

  • File conversion, from .mpg files to useable files for iMovie on new MacBook

    i wasnt really sure where to post this, but since my end goal is to be able to use all my videos for editing on iMovie it seemed like the best place, i have many .mpg files that i would like to simply convert to a file of equal quality that iMovie will recognize, theres pages and pages of converters on google but they either are trial versions that will leave water marks or there are websites that will only convert files up to 100mb, i just need a simple converter for the videos i have, i dont want to spend 50 bucks on software that ill only use once and i obviously dont want water marks or a decrease in quality, if anyone has any suggestions that would be great.

    You want MPEG Streamclip: http://www.squared5.com/svideo/mpeg-streamclip-mac.html which is a free download.
    If your movie is an MPEG-2 or VOB file (i.e. from an unencrypted DVD), you also need the MPEG2 Playback Component from Apple: http://www.apple.com/quicktime/mpeg2/ which costs US$19.99

  • File conversion for more than one level of substructure

    I have the following file format that needs to be converted into XML, but because it has more than one level of substructure I'm not able to give the correct file conversion parameter
    source file sample:
    1headeryyyyyyyyyyyyy
    2itemsyyyyyyyyyyyyyy
    2itemsyyyyyyyyyyyyyy
    2itemsyyyyyyyyyyyyyy
    3trailer1yyyyyyyyyyyyy
    4trailer2yyyyyyyyyyyyy
    2itemsyyyyyyyyyyyyyy
    2itemsyyyyyyyyyyyyyy
    2itemsyyyyyyyyyyyyyy
    3trailer1yyyyyyyyyyyyy
    4trailer2yyyyyyyyyyyyy
    Thus you see above that there is one header followed by a bundle that conrains many items and 2 trailers and this bundle can repeat any number of time.
    Could anyone let me know how to parse this type of file to XML?
    Thanks,
    Lakshmi

    Hi Lakshmi,
    See this blog:
    <a href="/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/michal.krawczyk2/blog/2004/12/15/how-to-send-a-flat-file-with-fixed-lengths-to-xi-30-using-a-central-file-adapter
    []´s
    Marcelo Macedo

  • How to find the File name using the FTP Adapter

    hi all,
    how to find the File name using the FTP Adapter with BPEL.
    Regards

    Found the solution for this.
    First In the mediator's routing rule use assign property $in.property.jca.file.FileName to $out.property.jca.file.FileName
    In the BPEL's receive activity go to the properties tab and get the property to a BPEL variable. That should do it.
    Thanks for the posts

  • 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

  • Sender File Adapter with file conversion

    Hi guys,
    I’m using a Sender File adapter with file conversion. The message to be processed has a structure with fixed lengths and in your content are some values that needs to be ignored.
    An example:
    value1  <b>value2</b>  value3…
    I want to ignore <b>value 2</b> but I can’t find a parameter for that! Do I need to define dummy fields on my data type and ignore those fields during mapping? Or there is a specific parameter for that?
    Thanks in advance,
    Ricardo.

    hi,
    there always is another way:)
    you can import the whole line to one field
    and cut it inside the adapter module
    (then you can define start and stop of the substring that you need to use)
    but of course it's not standard even though it's quite easy to achieve in java
    Regards,
    michal
    <a href="/people/michal.krawczyk2/blog/2005/06/28/xipi-faq-frequently-asked-questions"><b>XI / PI FAQ - Frequently Asked Questions</b></a>

Maybe you are looking for

  • Why can't I sync my ipod with iTunes 7.0.2?

    I'm using itunes 7.0.2 and am having problems syncing my ipod. I have recently formatted my computer and reinstalled everything, including itunes. My whole library was lost. When I reinstalled itunes the library was empty and so it erased all the son

  • RE: Server side objects-if attributes/methods are addedis

    Hi Richard, in addition to Peter Sham's mail you might have a look at tech note N 11545. The subject is different but you will see how to implement 'anchored' objects(use proxies) or reference partitions. If your server object project is a supplier p

  • Array

    i get the following result when i try to run my program below. any help or suggestion will be appreciated. thanks again../Paul Can't make static reference to method boolean isOperator Can't make static reference to method boolean isInteger here's the

  • Transferring DW8 site details?

    I've got to upgrade to a new, larger hard drive.. has anyone figured out how to transfer DW8 site details instead of having to manually re-create each one? There was an application to do that, but it doesn't work with DW8. Other thoughts?

  • OFI_AP_4  Delete all data and REINIT the load to FIAP ODS and Cube

    Hi bw GURUS I need a quick help, I have requirement to Delete all data and REINIT the load to FIAP ODS and Cube  i have data source ofi_ap_4, please tell me what should i do as i know LO extraction but whats is the transaction code to run the set job