Conversion of Flat file Idoc to Idoc

hello SDNers
I am currently working on conversion of Flat file representation of an IDoc to IDoc XML. There is a document available in
https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/46759682-0401-0010-1791-bd1972bc0b8a regarding this
conversion.I am new to this field. Please help me out
1)  step by step process of how its working?
2) Or any other ways to do the conversion?

Hi,
>>>1) step by step process of how its working?
the document you mention is just a mapping which you need to add to your scenario
and it will work
>>>2) Or any other ways to do the conversion?
if you have PI 7.1 and EhP1 then there is a java adapter module that you can add to the file adapter
and it will do the transformation automatically
Regards,
Michal Krawczyk

Similar Messages

  • Creating a flat file in the IDOC format

    Hi everybody,
    Need help.....urgently. Can somebody please tell me how to create a flat file in the IDOC format? I am creating a bill of lading/Documentary payments (EDI 858) and can't figure out a way to write the data generate through the report in a flat file in IDOC format. My deadline is right around the corner and I need help.
    Thanks,
    M

    Hi Minal,
    I still don't understand your question.
    So, you have a report which selects data and puts it into an internal table.  This part looks fine.
    You want to create a flat file?  Ok, to create a flat file on the application server then use the commands OPEN DATASET, TRANSFER, and CLOSE DATASET.  To create a flat file on the presentation server then use the FM GUI_DOWNLOAD (or the GUI class, I forgets its name for the moment).
    In both cases you should build up an internal table which has the exact structure required for your (EDIFACT?) EDI message, and then use the appropriate method to write the file.
    If the following steps are manual then there is nothing more for you to do.
    I don't see any need to use Idoc technology, or make any reference to it in your solution.
    I hope that helps.  If not, please be more specific when asking your questions.
    Brad

  • Flat File to Delivery IDOC scenario

    Dear All,
    I am having one scenario in which I am having the flat file (.txt) of the Delivery Idoc and now I want to convert that flat file into a Delivery Idoc with the required data.
    Kindly suggest me some good blogs which gives the step by step process for doing this scenario.
    Warm Regards,
    N.Jain

    Hey Nishu,
    You have  to use File Content Conversion Paramters to acheive this.
    http://help.sap.com/saphelp_nw04/helpdata/en/e3/94007075cae04f930cc4c034e411e1/content.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/2c/181077dd7d6b4ea6a8029b20bf7e55/content.htm
    You can Follow the following blogs
    /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/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
    Or juz post your sender datatype structure some one might give u exact fcc params.
    Hope itz Helpfull.
    <b>Cheers,
    *Raj*
    *REWARD POINTS IF FOUND USEFULL*</b>

  • Flat file to several IDOC instaces

    Hi everyone,
    I have the follow scenario: I will have a Flat file with a common structure (Header, Detail ) this structure will be repeated several times into the flat files, I have to send several times an IDOC this depending of  a change in one field in the header strucutre on my Flat File.
    I know how to read the flat file and how to send an IDOC but I don't know how to send many IDOCs and How to know when a field change in the structure.
    Could anybody help me with this? or send me a Weblog with a similar scenario.
    Thanks

    In your File Adapter under the "Content Conversion Parameters"
    Document Name           Messagetype Name
    Document Namespace      Namespace Name
    Recordset Name           root
    RecordsetStructure      Header,,Detail,
    Recordset Sequence      Ascending
    Keyfield Name           Field1
    Header.fieldNames       Field1,Field2,Field3
    Header.fieldFixedLengths 1,1,25
    Header.separator        'nl'
    Header.keyFieldValue     H
    Detail.fieldNames       Field1,Field2,Field3,Field4
    Detail.fieldFixedLengths 1,1,5,25
    Detail.separator        'nl'
    Detail.keyFieldValue     D

  • Flat file to multiple IDOCs

    Hi experts,
    I have a bit of a problem here wit a flat file to IDOC interface.
    My input CSV file structure (shortened) is as follows -
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:POINBOUND_MT xmlns:ns0="urn:xx:xi:dwn:xx:pf:xxx:poinbound:100">
       <Record>
          <Row>
             <PO_HEADER_ID/>
             <TYPE_LOOKUP_CODE/>
             <LINE_NUM/>
             <AMOUNT_LIMIT/>
          </Row>
       </Record>
    </ns0:POINBOUND_MT>
    the target side is an idoc - PORDCR1.PORDCR102.
    in the input file, for each row the PO_HEADER_ID field will have repeated values. the structure for eg.-
    PO_HEADER_ID < other fields> < otherfields> ...
    12345 <other fields>..<..  >
    12345 <other fields>..<..>
    12345 <other fields>..<..>
    56789 <other fields>..<..>
    56789 <other fields>..<..>
    Now i need two idocs ( 2 distinct header values) on target side - the 1st idoc will have first 3 line items and 2nd idoc will have the last 2 line items.  have already edited the IDOC in xsd format to make it unbounded.
    <b><u>Problem</u></b> - i am able to create two idocs by handling contexts(splitbyvalue and a UDF), but with the line items its not working i.e. <u>the first idoc gets the 3 line items created but the 2nd idoc does not have any!</u> 
    my mapping for line items is -
    PO_HEADER_ID <-> splitbyvalue(value changed) <-> count <---> UDF (for result.addvalue using count)  <----->  lDOC LINE_ITEM node.
    This logic does not work incase i need to create more than one idoc on the target side, it only works for the first idoc..so wat can i do??
    Plz help.
    thnx in advance!
    Raju.

    Hi Raju,
    check these links...
    /people/anish.abraham2/blog/2005/12/22/file-to-multiple-idocs-xslt-mapping
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/877c0d53-0801-0010-3bb0-e38d5ecd352c
    Sachin

  • FM to create a flat file in given IDOC type format

    Hi,
    I need to create a flat file having IDOC format.
    I have data in some other source file.
    Which function module can be used for the same?
    Could you pls provide some sample code?
    Appreciate the help.
    Thanks.
    -Shreyas

    My Exact requirement is:
    I have some data in a source file.
    Now I want to create a flat file while which should be in a standard IDOC format(WMMBID02) so that I can process it later using IDOC processing say EDI_DATA_INCOMING or any appropriate FM which will process IDOC later.
    I dont want IDOC to be created in the system right now. I just need to reformat my source file into a standard IDOC format flat file.

  • Conversion of EDI File format to IDOC format

    We have a file in u201C.ediu201D format. We could not process this file with RSEINB00 ( IDoc inbound processing using file ) program.
    1-) Could we directly do our process with this u201C.ediu201D file ? Or do we have to convert this u201C.ediu201D file to IDOC format?

    If it's EDI format file (Ex: EDIFACT, X12 ...etc), we should convert the file to IDOc file by using mapping in subsystems like Gentran or TLe..etc. Conversion from edi format to idoc format will not be done in SAP.
    Reddy

  • Conversion of Flat file to XML

    Hi ,
            I have a scenario where i need to convert a FLAT File to XML ...
               Since I am using Seeburger Adapter the   usage FCC is ruled out.
               Is there any inbult Adapter Module available in SAP PI which can be used to convert a Flat file to XML.
             The Flat file has many rows... I just want a single record to repeat n times.
             Please help me on this.
    Thanks,
    Siva

    Why don't try with Message Tran Bean
    Check this below details out:
    Processing Sequence:
    1 localejbs/Seeburger/solution/sftp Local Enterprise Bean solutionid
    2 localejbs/AF_Modules/MessageTransformBean Local Enterprise Bean mtb
    3 localejbs/CallSapAdapter Local Enterprise Bean exit
    Module Configuration:
    mtb Transform.Class com.sap.aii.messaging.adapter.Conversion
    mtb Transform.ContentType text/xml;charset=utf-8
    mtb xml.conversionType SimplePlain2XML
    mtb xml.documentName XXX_EXPENSES_mt
    mtb xml.fieldContentFormatting trim
    mtb xml.fieldNames FIELD1,FIELD2,FIELD3,FIELD4
    mtb xml.fieldSeparator '0x09'
    mtb xml.processFieldNames fromConfiguration
    mtb xml.structureTitle RECORD
    Regards
    Pothana

  • Automation of Query generation and Conversion to Flat File CSV

    I have a requirement for Generating / Executing the refresh for the existing Query IN BEX automatically on 3 rd Business day of Every Quarter in BEX Analyzer AND also to convert it to flat file after generation. Please give me some documents or exact steps on how to go about this
    automation. Please reply me in detail and soon
    Thanks
    Soniya

    Hi Sir, I will be very grateful if u can clarify
    1. User want the flat  file on the Company Server, which means there are folder on my company BMW server , and he wants to see the flat file there so that he can review it
    2. I saw some AL11 and directories how can I create my directory or Create the file in DIR_HOME and see the file in flat file format it shows like a screen which my user do not want, he just want a flat file.
    3.Please suggest me if this method rscrm_bapi will work or should u suggest download scheduler or report agent and how.
    4. Sorry for the question but my problem and requirement of user is not solved
    please reply soon
    thanks
    soniya

  • Conversion of Flat file to tables in oracle

    hi
    i am doing my project in oracle and i have got stuck up at a point where i have to convert flat files to tables in oracle
    Please suggest a solution for the above problem
    Regards,
    Mahesh

    Hi,
    Sql*Loader, to load data from file to an oracle internal table
    or
    External table (from 9i and later), to query directly the file like an other internal table
    Nicolas.

  • Conversion of flat file to word document

    Hello,
    I have a reqt where in I have data available in the flat file on the presentation server .
    I want to extract some information based on some logic from the flat file and move it to the word document.
    In case anyone has an idea how to go about it, please let me know.
    Thanks.

    Here is the sample report to open word doc with some testing message......
    Report Test.
    INCLUDE ole2incl.
    DATA: word TYPE ole2_object, documentos TYPE
    ole2_object,
    documento TYPE ole2_object,
    selection TYPE ole2_object,
    font TYPE ole2_object.
    CREATE OBJECT word 'WORD.APPLICATION'.
    CALL METHOD OF word 'Documents' = documentos.
    CALL METHOD OF documentos 'Add' = documento.
    CALL METHOD OF documento 'Activate'.
    GET PROPERTY OF word 'Selection' = selection.
    GET PROPERTY OF selection 'Font' = font.
    SET PROPERTY OF word 'Visible' = 1.
    SET PROPERTY OF font 'Name' = 'Arial'.
    SET PROPERTY OF font 'Size' = 12.
    SET PROPERTY OF font 'Bold' = 1. "o 0
    SET PROPERTY OF font 'Underline' = 1. "o 0
    CALL METHOD OF selection 'TypeText' EXPORTING #1 = 'Word Doc Test'.
    CALL METHOD OF selection 'TypeParagraph'.
    CALL METHOD OF documento 'SaveAs' EXPORTING #1 = 'c:test.doc'.
    CALL METHOD OF word 'Quit'.
    Hope this will help.....

  • Mapping a flat file to the iDoc OILLDD

    Hi.
    <b>I have a file with this structure after I got it from the fileadapter.:</b>
    B Dataxxxxxxxxx
    C Datayyyyyy
    D Datazzzzzz
    D Datazzzzzz
    C Datayyyyyy
    C Datayyyyyy
    D Datazzzzzz
    C Datayyyyyy
    C Datayyyyyy
    E Dataxxxxxxxxx
    B
    E
    B
    E
    etc.
    <b>I want to map this structure to the Idoc OILLDD which  have this structure.:</b>
    OILLDD01
       IDOC
          E1OILT1
              E1OILT2
              E1OILT3
                  E1OILT4
    each  B-Recor shall produce a new iDoc.
    each  C-Record  shall make an E1OILT1-segment
    each  D-Record  shall make an E1OILT3-segment(if the D-record exist)
    My problem is.:
    How can I make an new iDoc for each B-Records in the file.
    I got the file  tthrough the filadapter. 
    Hope someone can help me.
    Thanks.

    The file from the file adapter have to be parsed using the File Content Conversion.
    Now this converted XML will have the fields with value "A", "B","C" etc.
    This can be then mapped according to ur requirements. U need to export the IDOC as XSD , change the occurrence and then reimport it in the external definitions.
    Regards,
    Prateek

  • Conversion of flat files in csv to oracle table format:"error encountered"

    hello friends
    thanks for replying
    i have written the following code
    create table ext_table_csv (
    i Number,
    n Varchar2(20),
    m Varchar2(20)
    organization external (
    type oracle_loader
    default directory ext_dir
    access parameters (
    records delimited by newline
    fields terminated by ','
    missing field values are null
    location ('file.csv')
    reject limit unlimited;
    After writing this code i got an error saying u dont have sufficient privileges
    what does this exactly mean ?????
    Please help me out with this
    i also got an error saying that[b] the directory does not exist
    Please help me out with the same
    Regards,
    Mahesh

    possibly that you don't have priveleges to create a table. also the command you are trying is applicable only to server side not client side. it should be run to where your database is installed.
    you can also check if the existing directory exist
      select *
        from all_directories
       where directory_name = 'EXT_DIR'if the directory does not exist you have to ask your database administrator to create the EXT_DIR.

  • Convert flat file to Idoc format

    Due to some security reasons , the ALE scenario for material master is not allowed directly between 2 SAP systems
    So the SAP system A is sending a flat file (not in Idoc format)
    From SAP system B , we need to do an Inbound process to post the Idocs with following rough steps
    1) Flat file upload
    2) Flat file -> Idoc format conversion  (EDI subsystem is not existing in this scenario and so this step has to be done within SAP)
    3) Idoc processing
    Even though this scenario can be accomplished without using Idocs ,
    for better monitoring and reprocessing options it is required that Idocs need to be used.
    Please explain the detailed steps for the above scenario

    Hi,
    This sounds very much lie complicating things unnecessary...Are this 2 SAP systems of the same company ?
    Why would using IDOCS be more insecure then using flat files ?
    If the purpose is to have a manual check before upload, you can achieve the same with IDOCS.
    Please add some background to the process,
    regards
    Dirk

  • 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"/>

Maybe you are looking for