Conversion of multiple xml idocs to flat file

Hi,
I did ABAP mapping to convert xml idoc to flat file by using the reference how to do abap mapping in xi3.0.pdf
It is working for only one idoc at a time.
If I have multiple idocs in a single xml file, the above code is not working.
Please let me know what cchange to be done to work out for this.
Hope am clear.
Regards,
Anil.

Look For the Occurances of target Field node...It should be 1 to unbounded

Similar Messages

  • XML-IDoc to flat file (Release 4.0 and 3.0)

    Hello experts,
    I implemented the guide "[How to Convert an IDoc-XML structure to a flat file and vice versa in XI 3.0|https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/46759682-0401-0010-1791-bd1972bc0b8a]". Now I get a flat file, but it is IDoc-Version V3 (for Release 4.0). Is it possible to create another mapping which creates a Relase 3.0 IDoc instead as shown in transaction WE61 with version 2?
    Best regards,
    David

    Hello all,
    thank you for your answers. But again, it's not about IDoc types!
    Please go to transaction WE61 the last selection on the screen is version (1 for SAP Release 2.0, 2 for SAP Release 3.0 and 3 for SAP Relase 4.0). What the ABAP class from the guide creates is a V3 IDoc for SAP Release 4.0. If you choose the HTML view, you will see, that the versions are different, although the IDoc type is exactly the same. We create Version 3 and we need Version 2.
    Best regards,
    David

  • IDOC to flat file without XML conversion

    Hi,
    I want to implement a scenario like this:
    IDOC --> XI --> flat file
    The flat file has to have the IDOC structure as you have when you write an IDOC to the R/3 file port. But we want to have this process running through XI.
    When you use the IDOC Adapter the IDOC is converted to XML first, which is time consuming. So this I want to skip this step.
    So is it possible to receive the IDOC directly in XI without converting it to XML? How should this process be designed.
    Ron

    Ron
    Looks like you need IDOC tunneling. It is possible by making a configuration parameter.
    You can find more information in http://help.sap.com/saphelp_nw04/helpdata/en/ab/bdb13b00ae793be10000000a11402f/content.htm
    While you try it, I will try to simulate this requirement in our system and let you know the result.
    KK

  • IDOC to flat File----Problem in File Content Conversion at receiver

    hi experts,
    I am doing a IDOC to flat file secnario.
    My requirment is IDOCXI-Flat file
    Format of flat file is like:--
    Every segment in the IDOC will be converted into a single line of file(without any delimiter). So number of lines in flat file will be equal to number of segments in IDOC.
    I am facing problem in File Content conversion. 
    Please help me out..
    Thanks
    Jaideep

    Check this doc...
    [How To...Convert an IDoc-XML structure to a flat file and vice versa in XI 3.0 |https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/46759682-0401-0010-1791-bd1972bc0b8a]

  • Multiple idoc to flat file

    Hi,
    i have  a scenario from idoc to flat file.There is two idoc that send message in same file.Without flat file content messages come succesfully.the format should be following:
    at the first  row should be the first idoc,
    at the second row should be the second idoc
    01  1FONEX0045               FONEX0045               FONEX SIVI SABUN 400+850ML FLOWERS                    =>1.idoc
    02  1FONEX0045               8691988000162           8691988000162                                                             =>2.idoc
    01  1DOVE0199                DOVE0199                   DOVE SAC DOKULMELERINE COZUM SAC BAKIM M     =>1.idoc
    02  1DOVE0199                8718114638348           8718114638348                                                               =>2.idoc
    Thanks in Advance
    Nurhan

    Hi,
    You have to MessageTransformBean Module.
    The MessageTransformBean module enables conversion of XML files to flat files and vice versa. You can use this module in the sender and receiver communication channels.
    In receiver communication channel, specify MessageTransformBean module before standard adapter module CallSapAdapter and use
    Module Name: localejbs/AF_Modules/MessageTransformBean
    Module Key : XML2Plain
    Please see the below links, it might be useful to you.
    /people/gabrielsagayaselvam.panneerselvam/blog/2009/12/07/standard-adapter-framework-modules-afmodules-in-pi-71-150part-2
    http://help.sap.com/saphelp_nw04/helpdata/en/24/4cad3baabd4737bab64d0201bc0c6c/frameset.htm
    Regards,
    P.Rajesh

  • IDOC to flat file and vice versa

    Dear community,
    we should send IDOCs to flat files and read plain files and map them to IDOCs.
    Is there any comfortable way to do this without doing a huge content conversion for
    IDOCs? Exist a SAP standard for such process?
    We receive the IDOC as normal IDOC. Would it be more easy to save the IDOCs
    directly as flat file on ERP file system??
    System PI 7.11
    IDOCS: WHSCON, WHSORD and WMMBXY
    Regards
    Chris
    Edited by: Christian Riekenberg on Feb 1, 2012 2:41 PM

    Hey folks!
    We have a PI 7.31 SPS5 Java-only installation here and are using the module IDOCFlatToXmlConvertor. For single IDocs with one line for the EDC_DC40 header and the others for the IDoc payload the conversion works. But when we want to process multiple IDocs from the same type within one file, we see this error in the log:
    Module Exception 'com.sap.aii.af.idoc.exception.IDOCModuleException: No data segments for DOCNUM = ' found, cause: <null>
    Are there any requirements how the multiple IDocs have to be structured within the file?
    Best regards
    Heinrich
    Update:
    I found out that the module wants each record to contain the corresponding DOCNUM to find the matching records. The non-SAP sender system normally does not set this value. Is there a way to "convince" the module to convert the IDocs nevertheless?

  • Generating Deeply nested XML from a flat file

    Hi All,
    I am working on a MQ to IDOC scenario.
    I am getting a flat file as input. I need to convert it into XML( so that XI can understand it).
    But conversion is into a "Deeply Nested XML from a Flat File" at sender side (JMS Adapter).
    Any inputs on this.
    Regards,
    Vikas

    You can only convert flat file into xml structure with 3 levels.
    If you need to convert flat file into deep nested xml structure, you have to do java mapping or xslt or abap mapping. There is a tool, I think it's called conversion agent by itemfield (bought by SAP), which can do pretty everything with conversion. Never used it though.
    Jayson

  • How to convert IDOC to flat file in XI

    Hello SDNers
    I have a scenario IDOC --> XI  --> Flat file. My question is how to conver IDOC to flat file. At least there are two ways to do that:
    1) Define a flat structure in PI that reflects the IDOC structure, then using content conversion to convert the flat structure to flat file in hte receiver communication channel.
    2) There is a [document |https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/46759682-0401-0010-1791-bd1972bc0b8a] talking about using a generic ABAP mapping to map any IDOC to flat file.
    For the option 1, I don't want that way, because I would need to define a flat structure in PI for each IDOC which is too much effort. (I would have dozens of IDOC scenarios)
    The second one is very attractive. However the document is not complete to follow. Basically it does not explain how the inbound flat structure looks like. I guess the generic ABAP mapping is used to map any IDOC_XML structure to a flat structure, then in the file receiver communication channel to convert the flat structure to flat file format. But the document does not mention how the flat structure looks like. Has somebody tried this scenario? If yes, can you please let me know the steps to do in ESR (IR) and ID? Basically what structure the IDOC_XML should be mapped to using the generic ABAP mapping class?
    Or somebody has other ideas on how to convert IDOC to flat file?
    Thank you so much
    Eric

    > 1) You are saying that for Java mapping and abap mapping, the target data type (messag type) is just a dummy one, the real (XML) message the receiver will recieve is the one (stream) produced by the java or abap mapping. Is that correct?
    Definitely yes!
    >
    > 2) For the abap mapping option, I would define a dummy target data type. Do I need to do any content conversion in the receiver adapter (communication channel)?
    None wat so ever.The output of your Java Mapping will be the Native Idoc Format.
    >
    > 3) I tried with a dummy target data type as mentioned in my second post, can you see any clue in the error message what is wrong?
    Dats one thing I cant help much. Just make sure that the ABAP report is valid and take the help of a ABAP'er to debug what is going wrong. Not much of a ABAP guy, can read ABAP code, but cant write one myself
    Try to test the program standalone to see how it works. Maybe take some Idoc XML file as input and then dump the output to a .txt file and so on.
    Regards
    Bhavesh
    PS : All this is from what I have read of this guide. I have not convert Idoc XML to Native Idoc but have used this guide to convert Native Idoc to Idoc XML .

  • Develop IDOC to FLAT FILE

    Hi friends,
    I need help do develop a new interface using IDOC -> FLAT FILE scenario.
    Please send exemples and links.
    In found only XML file formats, i need FLAT FILE.
    Thanks,
    Marco

    new interface using IDOC -> FLAT FILE scenario.
    idoc to flat file scenario is very simple but you have to provide FCC Parameters in Receiver File Communication channel based on target structure and remain ecvery thing is same what was you found idoc to xml scenario.
    ex for Fcc Parameters in Receiver File Communication channel :
    http://www.riyaz.net/sap/xipi-file-content-conversion-for-complex-structures/79/

  • IDoc to Flat File in SAP PI 7.11

    Hi Experts,
    I am working on PI 7.11 and I have scenario from Idoc to Flat File.
    Idoc is posted from source side R/3 system.My requirement is "With out Converting the Idoc structure to XML Structure  i want to send the data to Target system i.e. File system.
    But the structure of the target structure is different from source structure.
    My questions are:
    1). Is it Possible to send the data to Target system without converting Idoc structure in to xml format through our PI 7.11 ?
    2). If possible please provide me the way that executes in the Interface is?
    Could you please provide the Inputs.
    Best regards,
    satya.T
    Edited by: satyatanuku on May 24, 2010 3:26 PM
    <Moved from Trial, Preview~ forum>
    Edited by: Prateek Raj Srivastava on May 25, 2010 1:02 PM

    Hello Folks ,
    I am also facing the same scenario please provide me any options to achieve this scenario .
    I am searched in Forums of SDN but no inputs or blogs available.
    Let me know i am having one solution is it right or wrong ?
    we have to achieve this IDOC Tunneling .... is it right  friends ?
    Still inputs required....
    Regards,
    Ravi.

  • Doubts in SAP(Idoc)-XI-Flat file scenario

    Dear All,
    I am sending Delivery Idoc from R/3 and I am able to view the Idoc in XI in transaction IDX5. Also i m able to see the XML structure with the data of the idoc in SXMB_MONI.
    Now as per my scenario I have to download this to a flat file from XI.
    My question is, should I have to do the creation of Data types, message types, mapping interface & interface mapping in IR or should I directly do the designing in the ID.
    waiting for your reply.
    Warm regards,
    N.Jain

    Hi,
    DT, MT, MI  : you will create these things for receiver flat file only.
    First create
    In Integration Repository :
    1.     Import structure of IDOC in your scenario, In imported objects &#61664; IDOCs
                  a.     In Interface Objects
    1.     Create Data type for your flat file
    2.     Create Message Type
    3.     Create Message Interface (inbound Asy.)
                  b.     In Mapping Objects
    1.     Message Mapping :  IDOC  to  Message Type of Flat File.
    2.     Create Interface Mapping  : IDOC to Flat file by using Message Mapping which you have created.
    Make activate all these things.
    In Integration Directory :
    1.     Create Communication channel for File Receiver.
    2.     Sender Communication channel is not required.
    3.     Create Receiver Agreement.
    4.     Sender Agreement is not required.
    5.     Interface Determination
    6.     Receiver Determination
    At sender side you will take your IDoc and at receiver side you will take your flat file.
    It can help you,
    Regards,
    Sandeep Kaushik

  • Idoc to flat file mapping using XSLT

    Hi,
    i am using XSLT mapping. my requirement is mapping between idoc and flat file(xml to text). as i do not want to use FCC, i have opted for xslt mapping. please let me know any article which would be helpful for this.
    regards,
    Meenakshi

    Hi Meenakshi,
    Two things:
    1. Achieving this functionality  using XSLT is very difficult.
    2. Secondly you may not be able to find a direct document to convert IDoc-XML to flat file using XSLT in sdn. Try google.
    I found one link like that may be you can get some idea from there
    http://www.stylusstudio.com/SSDN/default.asp?action=9&read=6453&fid=48
    Also if you have a XSLT editor like XMLSPY or stylus studio then creating your specific XSLT will b much more simpler
    Regards
    Suraj

  • Packaging IDOCs - SAP R3(IDOCs) - XI - Flat File

    Hi,
    I've got the scenario SAP R3(IDOCs) -> XI -> Flat File.
    The IDOCs are sent from R3 with the Option Send by Packet. There is 10 Idocs per packet.
    What I want to do is create one flat file for each packet.
    So one packet of 10 Idocs must create 1 flat file.
    Is it possible to do that whithout BPM ?
    Regards,
    Vincent

    Hi,
    Refer to this weblog which gives step by step process for IDoc to file scenario.
    /people/prateek.shah/blog/2005/06/08/introduction-to-idoc-xi-file-scenario-and-complete-walk-through-for-starters
    Use BPM to collect tyhe Idoc, standard pattern is available for the same.
    http://help.sap.com/saphelp_nw04/helpdata/en/08/16163ff8519a06e10000000a114084/content.htm
    This following weblog explains the collection of Idoc.
    /people/pooja.pandey/blog/2005/07/27/idocs-multiple-types-collection-in-bpm - Collection of IDoc to Single File
    This also explains the IDoc package.
    /people/sravya.talanki2/blog/2005/12/09/xiidoc-message-packages
    Thanks,
    Prateek

  • IDoc - SFTP (Flat File) file name

    Dear Experts,
           Thanks for helping me so far, please find below my new request :
           We have IDoc - SFTP (flat file) scenario in which I have did ESR by pass scenario and used standard module to convert IDoc xml to flat file.
           But now user is asking to have the naming convention of the receiver flat file as SHPMNT05_<IDoc number>_<Reference number>.idoc.
           Could you please let me know how this can be approachable. Many thanks in advance for your valuable inputs. Awaiting your replies.
    Thanks
    Ravi..

    Thank you very much Botha,
    In the thread Idoc to file problem with DynamicConfiguration please find below my doubts.
    1. I am using receiver SFTP adapter and IDoc to flat file module configuration as key 1, so how it will works.
    2. What are the Parameter name and Paremeter value for the module mentioned in the blog :
    Module Configurations:
    1  key.0      write http://sap.com/xi/XI/System/File FileName
    1  value.0   message.interface
    Which is the parameter and which is the value in the above blog.
    Waiting for your response.
    Thanks
    Ravi

  • IDOC to Flat FIle Examples

    Hi,
    Can Anyone provide an Example for IDOC to Flat File Conversion using Java Mapping.. Thanks in Advance.

    Hi Sudeep,
    See the IDOC to File Scenario
    https://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/e07dcaa0-a92b-2a10-3a96-b3d942bd1539
    Modify the receiver with FCC by using below links...
    File content conversion links...
    /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
    Please see the below links for file content conversion..
    /people/michal.krawczyk2/blog/2004/12/15/how-to-send-a-flat-file-with-fixed-lengths-to-xi-30-using-a-central-file-adapter - FCC
    /people/michal.krawczyk2/blog/2004/12/15/how-to-send-a-flat-file-with-fixed-lengths-to-xi-30-using-a-central-file-adapter - FCC
    Thanks,
    Sriram
    Edited by: Sri Ram Devarapalli on Sep 1, 2009 1:25 PM

Maybe you are looking for

  • Double click on output in write statement

    hi, i have a list of PO as outout thru write statement(classical).i wamt to open me23n with the double click on that particular po. how could i do this? answer with full code.

  • Lost songs from playlist / can't drag songs in playlist

    Hey I created a playlist of about 7 hours and seem to have lost a whole bunch of songs without deleting them and now can't move anything around in that playlist. My other playlists appear to be working fine. Any ideas? Thanks! Kirsty

  • Using XPath

    Hi All, This is a JDBC-Proxy(scenario). Based on a particular field content say "receiver". I need to use 2 different receivers. For example, if the value is "1" I need to send the message to first receiver and if the value is "2" I need to send the

  • Two editors on two edit systems sharing the same footage, suggestions?

    So I just got done shooting my first feature and now I've got to come up with a plan for editing. Here's what I got: 1 Core 2 Duo iMac with FW800 FCS2 1 Core Duo iMac with FW400 FCS2 ~40hrs of DV25 footage $800 dollars to spend on a storage solution

  • Stop taking away colour (color) icons!!!

    Please can someone tell me a way to bring back the colour icons that Apple keeps stealing from me? First iTunes, then OSX, mail and Safari, now Aperture 3.3 and iPhoto 9.3 (P.S. if you, like me, hate the loss of easy to find and generally more visual