SAP IDOC XML to Flat File Conversion

Hello,
I have downloaded SAP schema through the "Consume Adapter Service" with properties GenerateFlatFileCompatibleIdocSchema = "true" and FlatFileSegmentIndicator = "SegmentType". I am trying to convert IDOC XML into a IDOC Flat File.
Though the flat file gets created it has a "/" at the end of each blank field which I do not want in the flat file. I see the schema has <recordInfo structure="delimited"...> which I believe should be "positional". I tried
changing preserve_delimiter_for_empty_data="True" and suppress_trailing_delimiters="False" properties also but did not help.
I would appreciate any help on this.
Thanks,
Tarun

Hi Tarun....
please check this property set this property GenerateFlatFileCompatibleIDoc is set to false

Similar Messages

  • XML to flat file conversion

    Hi,
    Iam working on Idoc to file scenatio.Using java mapping I have mapped the Idoc to an XML format. Now I have a problem in converting the XML format to flat file format.
    My XML is as follows:--
    <Record_Idoc>
      <Record>
        <Header>
            <Order_no>10000398</Order_no>
            <Order_Type>ZSTQ</Order_Type>
            <Material_Head_no>1800406</Material_Head_no>
            <Material_Head_Desc>MARC MOL MEZ R16 FY02.</Material_Head_Desc>
            <Production_version>0003</Production_version>
            <Test_Order/>
            <Quantity_planned>801.00</Quantity_planned>
            <unit>PCE</unit>
         </Header>
        <operations>
             <operation_number>0010</operation_number>
             <Work_center>P_SIG</Work_center>
             <setup_start_date>20020619</setup_start_date>
             <Setup_start_time>060000</Setup_start_time>
             <Processing_start_date>20020619</Processing_start_date>
             <Processing_Start_Time>060000</Processing_Start_Time>
             <End_date>20020619</End_date>
            <End_Time>061600</End_Time>
         </operations>
        <operations>
             <operation_number>0020</operation_number>
             <Work_center>P_BFB</Work_center>
             <setup_start_date>20020619</setup_start_date>
             <Setup_start_time>060000</Setup_start_time>
                <Processing_start_date>20020619</Processing_start_date>
             <Processing_Start_Time>060000</Processing_Start_Time>
             <End_date>20020619</End_date>
             <End_Time>074926</End_Time>
          </operations>
      </Record>
    </Record_Idoc>
    My output flat file should be as follows:--
    Each record contains the following lines
    Header.........
    Operations......
    Operations......
    I have used File content Conversion in message Protocol
    These are my setting:--
    Header.addHeaderLine  nl
    Header.fieldSeparator  ,
    Header.endSeparator   nl
    operations.addHeaderLine  nl
    operations.fieldSeparator  ,
    operations.endSeparator   nl
    But seems that these settings does not work.
    Could some one help in solving this issue.
    regards
    Praveen

    try,
    Recordset Structure - Header,operations
    Header.fieldSeparator ,
    Header.endSeparator nl
    Header.addHeaderLine X  *****
    operations.fieldSeparator ,
    operations.endSeparator nl
    and in case it doesnt work try removing the Record_Idoc node from the XML in mapping and then try the Cont. Conv.
    X can be
    0 – No header line
    1 – Header line with column names from the XML document
    2 – As for 1, followed by a blank line
    3 – Header line is stored as NameA.headerLine in the configuration and is applied
    4 – As for 3, followed by a blank line

  • XML to flat file conversion using file content conversion in reciever CC

    Hi,
    Iam working on Idoc to File scenario.
    Iam having a problem in the communication channel of reciever.
    Iam using File content conversion in Reciever Adapter.
    My xml format is asfollows:--
    - <Header>
      <FILLER1>KTP</FILLER1>
      <YEAR_IDOC>YEAR 2006</YEAR_IDOC>
      <FILLER2>FIRSTWEEKNUMBER</FILLER2>
      <WEEK_IDOC>51</WEEK_IDOC>
      <FILLER3>NUMBER WEEKS 26</FILLER3>
      <PLANT_CODE>FACTORYM019</PLANT_CODE>
      </Header>
    - <Record>
      <First_material>731000</First_material>
      <First_quantity>0000.0</First_quantity>
      <First_quantity>0001.9</First_quantity>
      <First_quantity>0000.0</First_quantity>
      <First_quantity>0000.0</First_quantity>
      <First_quantity>0020.0</First_quantity>
      <First_quantity>0000.0</First_quantity>
      <First_quantity>0000.0</First_quantity>
      <First_quantity>0000.0</First_quantity>
      <First_quantity>0018.0</First_quantity>
      <First_quantity>0000.0</First_quantity>
      <Second_material />
      <Seond_quantity>000000</Seond_quantity>
      <Second_quantity>0011.0</Second_quantity>
      <Seond_quantity>000000</Seond_quantity>
      <Seond_quantity>000000</Seond_quantity>
      <Seond_quantity>000000</Seond_quantity>
      <Seond_quantity>000000</Seond_quantity>
      <Second_quantity>0049.0</Second_quantity>
      <Seond_quantity>000000</Seond_quantity>
      <Seond_quantity>000000</Seond_quantity>
      <Second_quantity>0067.0</Second_quantity>
      <Third_material />
      <Third_quantity>000000</Third_quantity>
      <Third_quantity>000000</Third_quantity>
      <Third_quantity>000000</Third_quantity>
      <Third_quantity>0008.0</Third_quantity>
      <Third_quantity>000000</Third_quantity>
      <Third_quantity>000000</Third_quantity>
      </Record>
    The file format should be as follows:--
    KTP   YEAR 2006 FIRSTWEEKNUMBER 51   NUMBER WEEKS 26  FACTORYM019
    731000  0000.0 0001.9 0000.0 0000.0 0020.0 0000.0 0000.0 0000.0 0018.0 0000.0
            0000.0 0011.0 0000.0 0000.0 0000.0 0000.0 0049.0 0000.0 0000.0 0067.0
            0000.0 0000.0 0000.0 0008.0 0000.0 0000.0  
    Could some one help me in resolving this issue.
    Regards
    Praveen

    Hi Praven,
    couldn't you simply modify your target DATA type so it will be easier to handle?
    For example something like:
    <Header>
    </Header>
    <Record>
    <Material>
    <Number>..</Number>
    <quantity>..</quantity>
    <quantity>..</quantity>
    </Material>
    In this way file content conversion will be easier (easy)!
    Regards,
    Sergio

  • Help needed with xml to flat file conversion

    Hi all,
    I am doing a webservice (SOAP) to file scenario. The file I get into the target directory is as below.
    <?xml version="1.0" encoding="UTF-8"?>
    <ns1:MT_Test_interface xmlns:ns1="http://test_namespace.co.uk"><fieldA>0000012345</fieldA><fieldB></fieldB><fieldC>0010203040</fieldC><transaction_type>NEW</transaction_type><transaction_date>2011/08/21</transaction_date><sales data>PARTNERS (((119006.258 169077.102), (372718.323 77854.466, 371449.872 70783.383), (382225.17 73214.976, 398410.463 95156.636)))</sales data></ns1:MT_Test_interface>
    But I want it to be a plain text file like below, not an xml file.
    0000012345
    0010203040
    NEW
    2011/08/21
    PARTNERS
    (((119006.258 169077.102), (372718.323 77854.466, 371449.872 70783.383), (382225.17 73214.976, 398410.463 95156.636)))
    What are all the modules I need and also the parameters and their values please?
    Any help is appreciated.
    Thanks.
    Ramesh.

    Thanks guys.
    My xml now is like this:
    <?xml version="1.0" encoding="UTF-8" ?>
    - <ns1:MT_test xmlns:ns1="http://test.co.uk">
    - <REPORT>
      <company_number>0000043239</company_number>
      <transaction_type>CREATE</transaction_type>
      <transaction_date>2011/08/21</transaction_date>
      <sales_data>Partners (((119006.258 169077.102), (372718.323 77854.466, 371449.872 70783.383), (382225.17 73214.976, 398410.463 95156.636)))</Partners>
      </REPORT>
      </ns1:MT_test>
    I am using the content conversion as below:
    Recordset Structure: REPORT
    Name: REPORT.addHeaderLine      Value: 1
    Name: REPORT.fieldSeparator      Value: ,
    Name: REPORT.endSeparator      Value: 'nl'
    Name: company_number.endSeparator      Value: 'nl'
    and I am getting the result as:
    company_number,transaction_type,transaction_date,sales_data
    0000043239,CREATE,2011/08/21,Partners (((119006.258 169077.102), (372718.323 77854.466, 371449.872 70783.383), 382225.17 73214.976, 398410.463 95156.636)))
    But I want file like this:
    company_number,transaction_type,transaction_date,sales_data
    0000043239
    CREATE
    2011/08/21
    Partners (((119006.258 169077.102), (372718.323 77854.466, 371449.872 70783.383), 382225.17 73214.976, 398410.463 95156.636)))
    What will be the CC parameters please?
    Many thanks.
    Ramesh.

  • Regd. Error in Adapter module for IDOCxml to flat file conversion

    Hi Champs!
    I am using PI 7.1 and i am trying out the blog for direct conversion of IDOC xml to flat file and vice versa.
    /people/william.li/blog/2009/04/01/how-to-use-user-module-for-conversion-of-idoc-messages-between-flat-and-xml-formats
    has anyone tried this in Pi7.1
    i am getting the following error:
    Message processing failed.
    Cause: com.sap.engine.services.jndi.persistent.exceptions.NameNotFoundException:
    Path to object does not exist at SAP_XI_IDOC, the whole lookup
    name is localejbs/SAP_XI_IDOC/IDOCFlatToXmlConvertor.
    I have done all the setting required .. as per the blog.Is it srictly for PI7.11?
    Regards,
    Abhi

    Hi Abhi,
    This feature is a part of PI 7.11  new features , as it is mentioned in the begining of the Blog itself.
    So i feel , yes its strictly PI7.11 feature which may not be available in PI7.1 version which you are using currently.
    There may be workarounds...lets c  fellow SDNer's replys:)...
    Regards,
    Srinivas

  • Xml to flat file scenario

    hi guys,
    I am new to XI.am tryin to configure xml to flat file scenario.i have configured the scenario but the problem is am getting the flat file into my receiver system with no content..what might be the problem.pls do help me out

    Hi,
    Please find here with the required parameters for receiver end file to get it as flat file
    Please refer below scenarios, this could be used as reference for your scenario
    IDOC-XML to flat file
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/46759682-0401-0010-1791-bd1972bc0b8a
    XML to Flat file conversion
    XML to flat file conversion
    File Receiver with Content Conversion
    /people/arpit.seth/blog/2005/06/02/file-receiver-with-content-conversion
    Configuring the Receiver File/FTP Adapter
    http://help.sap.com/saphelp_nw04/helpdata/en/95/bb623c6369f454e10000000a114084/frameset.htm
    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
    File Content Conversion for Unequal Number of Columns
    /people/jeyakumar.muthu2/blog/2005/11/29/file-content-conversion-for-unequal-number-of-columns - FCC
    Content Conversion (Pattern/Random content in input file)
    /people/anish.abraham2/blog/2005/06/08/content-conversion-patternrandom-content-in-input-file - FCC
    Thanks
    Swarup

  • Urgent, Help on conversion: xml to flat file

    Dear experts,
    Here is the scenario, XML FILE ->XI-> JMS
    In JMS recevier side, we use localejbs/AF_Modules/MessageTransformBean to convert xml to flat file.
    Transform.Class: com.sap.aii.messaging.adapter.Conversion
    Transform.ContentType: text/plain;charset=utf-8
    xml.conversionType: SimpleXML2Plain
    xml.fieldFixedLengths: 5,20,5,8
    When input source xml file contents are non-unicode, it works fine.
    But when the contents contain unicode characters such as Chinese word,  it works but with wrong length in the output flat file. It seems xi treat one Chinese word length is 1. Actually, one chinese word should take 2 bytes.
    My question is how to make XI handle unicode characters  with correct lengths while conversing to flat file.
    Thanks in advance.

    Jai Shankar
    Thanks for your response.
    I am already using the standard adapter modules provided by SAP:
    localejbs/AF_Modules/MessageTransformBean
    Transform.Class: com.sap.aii.messaging.adapter.Conversion
    My input file's encoding is UTF-8
    "You need to change the encoding scheme according to your input file" , do you mean change the output file's encoding or else?
    I can't find the article you mentioned: "Encoding schemes in XI", Would you please give me the link?
    Thanks a lot.

  • TCODE TO DOWNLOAD IDOC INTO A FLAT FILE

    Hi All,
       Please let me know if there is any tcode to download IDOC into a flat file..
    Regards,
    Kaveri

    try with we60 where you should have links to download the idoc type.
    Please check this:
    1. How to Download a Hierarchy to a Flat File
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/0403a990-0201-0010-38b3-e1fc442848cb
    2. How To Convert an IDoc-XML structure to a flat file and vice versa in XI 3.0 Version 1.10
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/46759682-0401-0010-1791-bd1972bc0b8a
    run the report RSEOUT00 with the idoc number, flat xml file will be generated at the location user/sap/XI/SYS/global/idoc_file
    Please rewrds if found help ful

  • Idoc data in flat file structure

    Dear Experts,
             We have  idoc data in flat file structure. We need to fetch it using ftp and map it to an idoc.
    please tell me how to proceed .
    Thanks,
    Aju

    Hi,
    For flat file you need to use the File content conversion parameters.
    Refer the blog,
    SAP Network Blog: How to process flat files with multiple documents like POs, SOs etc. in a File to IDoc scenario
    How to process flat files with multiple documents like POs, SOs etc. in a File to IDoc scenario
    Thanks
    Swarup

  • Receiver CC File - Complex Flat File Conversion

    Dear forum users,
    I want your opinion about the feasibility of the content conversion described below using Receiver CC.
    The structure of my file is the following
    - A File header segment (FH)
    - 1...N Business Object that is described by many segments
    - A file footer segment (FF)
    Exemple of business Object : Purchase Order :
    1 Header Segment (POH)
    N Item Segments (POI)
    Exemple of file :
    FH
    POH (PO 1)
    POI (PO 1)
    POI (PO 1)
    POH (PO 2)
    POI (PO 2)
    POI (PO 2)
    FF
    Is content conversion standard tool can deal with such a structure ?
    Note that in the file created, the order of each segment has a big importance :
    PO Items of PO 1 must be after PO Header of PO 1 but before PO Header of PO 2 !
    I thnik the structure requested by converter described in documentation do not fit with my case :
    <root>...
      <nameA>
            <value1>value</value1>
            <value2>value</value2>
            <value3>value</value3>
      </nameA>
      <nameB>
            <value4>value</value4>
      </nameB>
    </root>
    I should have :
    <root>
    <FH>
      <PO>
        <POH>...</POH>
        <POI>...</POI>
        <POI>...</POI>
      </PO>
      <PO>
        <POH>...</POH>
        <POI>...</POI>
        <POI>...</POI>
      </PO>
    </FH>
    </root>
    Thanks very much for your help and opinions
    Jean-Charles.
    Edited by: Jean-Charles CARRET on Jan 3, 2011 6:12 PM

    Thank you Stephan for your answer.
    Firstly, could you confirm whether the "row" elements under the root tag are on the same level than other elements (POH, POI, FF and FH) or not ?
    I just check the both following parts of the help documentation called :
    - [Inserting MessageTransformBean in the Module Processor|http://help.sap.com/saphelp_nwpi711/helpdata/en/57/0b2c4142aef623e10000000a155106/frameset.htm]
    - Using the dispatcher : Example
    For me, it is not clear.
    1. Do I need to create an external class (XSLT Library for example) to manipulate my XML data before passing it to the standard Flat File Conversion tool ? (Here the manipulation would be to remove the row XML elements)
    2. Where is located the famous "Data" directory in which I must put my xsl file ?
    Thanks for clarifications.
    Jean-Charles

  • IDoc as a flat file...

    I want to read a flat file that is an IDoc and post it as a XML after necessary conversion...So i wanted to know what are the feasible ways to read the flat file thats an IDoc?

    Your flat file is of fixed lenght format or tab delimited I believe. Get the flat file data into an internal table. Study the IDOC structure in transaction WE30. & according populate the idoc segemnts from the internal table value..
    For ABAP to XML conversion..Create XSLT & the extraction program..
    Create XSLT:
    In transaction SE80 browse menu Workbench -> Edit Object. In the popup window enter XSLT Program name (e.g. ZXSLT) and click on create button.
    Enter the following code into the editor..
    <xsl:transform version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" >
    <!xsl:output encoding="utf-8" indent="yes"/>
    <xsl:template match="D2CXML">
    <PurchaseOrders>
    <xsl:apply-templates/>
    </PurchaseOrders>
    </xsl:template>
    <xsl:template match="item">
    <PONO>
    <xsl:attribute name="no">
    <xsl:value-of select="EBELN"/>
    </xsl:attribute>
    <PORDNO>
    <xsl:apply-templates select="EBELN"/>
    </PORDNO>
    <Vendor>
    <xsl:apply-templates select="LIFNR"/>
    </Vendor>
    <PurchaseOrg>
    <xsl:apply-templates select="EKORG"/>
    </PurchaseOrg>
    <PurchaseGrp>
    <xsl:apply-templates select="EKGRP"/>
    </PurchaseGrp>
    <xsl:apply-templates select="X-MLSTRUCT"/>
    </PONO>
    </xsl:template>
    <xsl:template match="X-MLSTRUCT">
    <xsl:apply-templates/>
    </xsl:template>
    <xsl:template match="X-MLSTRUCT/item">
    <Product>
    <ItemNo>
    <xsl:apply-templates select="EBELP"/>
    </ItemNo>
    <Material>
    <xsl:apply-templates select="MATNR"/>

  • Facing Problem in IDOC to EDI FLAT File Scenario

    Hi,
    I am working on a scenario IDOC to EDI FLAT File. For this I have used ABAP mapping.
    The problem i am facing is that the EDI FILE contains the segment name as E1EDK01 for eg. while I need the name as per the latest segment definiton released. I have also tried this using File port and it gives the required segment names in file.  But we dont have to use File ports. Please suggest me if something is missing in PI Abap stack ?? Why I am not getting the segments name as per latest segment definition mainatined in R3.
    Thanks
    Neha

    Hi Neha,
                   Please check the segment name in sxmb_moni. Is this showing new value or the old value?
    If SXMB_MONI shows old value then the source SAP (R/3) system which is sending the idoc may not have released the segment after changing the name. You need to ensure that the idoc segment has been released properly. Then re-import the iodc into PI server again. Finally delete entry of the iodc structure in idx2 transaction, no need to re-import the idoc structute again in idx2, since once you run the scenario the metadata automatically gets imported.
    regards
    Anupam

  • Call Pipeline in orchestration for converting XML to flat file

    Hi ,
    Can we call Pipeline in orchestration for converting XML to flat file ?
    Or we have some another option for this task ?
    Prakash

    Hi,
    You can refer this article from Abdul Rafay on how to work with Flat files and how to call receive and send pipelines within your orchestration. He
    has provided detailed step by step explanation of the process.
    Calling Send and Receive Pipelines
    from the orchestration expression shapes
    The code shared by Abdul at http://abdulrafaysbiztalk.wordpress.com/files/2009/06/processingflatfiles.doc (Change the extention to rar) and try it.
    One common mistake I have seen people doing will working with Flat File Assembler is that they miss to set the Document schema property in the Properties
    window to the flat file schema.
    If the Document schema property is not specified, runtime schema discovery will be attempted. During schema discovery, BizTalk Server attempts
    to determine the correct flat file schema to assemble the message with, based on the namespace and root node of the message, its added performance hit.
    Rachit

  • OSB XML to Flat file(write)- MFL?

    Hi,
    OSB 11G
    I will be invoking the db to get XML data and I have to write to a text file(pipe delimiter).
    I saw below forum, but I am not sure how to create MFL .Can you anyone pls mention the steps. (MFL ->XML to flat file )
    Do I have import xsd in Native Builder and convert to a flat file with pipe delimiter ?
    How to write a CSV file in OSB
    Thanks
    Edited by: soauser on Jul 7, 2011 8:07 PM

    truth must be said, MFL is very sensitive to input data, any deviation from the contract is punished with a NullPointerException, especially when the input is in binary format. One would expect a better error message, but what can we do.
    Make sure your input data complies with the Schema, for instance do a xsd validation...

  • SAP XML and SAP IDOC XML

    Hi Friends,
    Can any one tell me what is the difference between SAP XML and SAP IDOC XML?
    Regards,
    Kumar

    Hi,
    Various XML standards are supported by SAP. It presents data according to an SAP specification either in IDoc-XML or BAPI-XML, the SAP XML extensions for IDocs and BAPIs. It uses preprepared representations of the SAP interfaces to XML Commerce Business Language (xCBL) messages to facilitate communication with the MarketSet marketplaces.
    Messages are stored in a generic envelope. This envelope contains metadata that controls, among other things, the routing of the messages. SAP supports two different standards for these envelopes - Microsoft BizTalk and a format similar to Simple Object Access Protocol (SOAP). Packaging SAP BAPIs in a standard envelope offers several advantages, including direct processing of messages by external applications and a uniform system of error handling.
    Regards'
    Aashish Sinha
    PS : reward points if helpful

Maybe you are looking for

  • Jabber/WebEx Connect SSO Questions

    I've got a few questions around exactly what needs to be done to get SAML working for our Connect accounts to successfully authenticate from Jabber for Windows, Mac, iPhone, and Android. We have both a Meeting Center and Connect account under WebEx u

  • Speed grade does not work on my surface pro 3

    Two questions: Speed grade does not work on my surface pro 3. It open normaly but when I import a video I ear only the sound the image is black.Why? So I try to install it on a over computer but in the creativ cloud software I didn't it. Why ?

  • New LoginManager cannot see all users

    Hi all, Just trying to get to grips with users and roles in Azure, and I've hit a couple of questions. Here's the process I've been through. I created a new server I exported a database from an existing SQL Server as a bacpac file, and successfully i

  • Changing field labels for JP29

    Hello friends, In transaction JP29 there are several field labels I want to change. I think I have to go to the MARA table and make the changes here, but I'm not sure where to do this.(trans se11 -> utilities-> database Utility?) In the test-system t

  • IE8 and :root

    Guys: I appears that IE8 does not correctly understand the CSS3 ":root" pseudo-class, which is a shame. http://www.w3.org/TR/css3-selectors/#root-pseudo This means that the lovely and elegant rule - :root { overflow-y:scroll; } which forces a vertica