Create IDoc from flat file - How to do the message mapping

Hi everybody,
I want to create an IDoc from a flat file.
The file structure looks like this:
MT_XYZ
- Node001       0...1
  - Leaf001
- Node002       0...unbounded
   - Node003    0...1
      - Leaf002
      - Leaf003
   - Node004    0...1
      - Leaf004
   - Node005    0...1
      - Leaf005
I have created a mapping and all the other stuff to set up the IDoc adapter.
Now when I try to test the interface the IDoc is created properly but obviously no information from the nodes "Node003" to "Node005" is inserted in the IDoc. Only the information kept in the elements (leafs) of "Node001" are inserted.
All IDoc segments and their "Segment" elements are linked to the root node of the file structure "MT_XYZ". I tried to link some IDoc segments only to "Node002" but then this segment is not created.
So how can I set up the message mapping in a way that the information from "Node003" to "Node005" is transported to the IDoc? Can anyone help me here?
Thanks in advance for all answers!
Regards,
Torben
Edited by: Torben Hönemann on Dec 14, 2009 4:26 AM

Hi Torben,
>>I want to create an IDoc from a flat file.
So you are using File content Conversion on the sender side. Right?
>>no information from the nodes "Node003" to "Node005" is inserted in the IDoc.
Are these information available in the source XML (you can check in transaction SXMB_MONI-> Input Payload).. There is a limitation in File Content Conversion of File adapter and it is that I can make an XML structure of 3 level.. Since these nodes details are in level 4 and 5 they should be missing in Source XML structure itself (after content conversion of File adapter). check that
>>So how can I set up the message mapping in a way that the information from "Node003" to "Node005" is transported to the IDoc? Can anyone help me here?
So you need to take an alternate approach where you do File Content Conversion and make 3 level structure.. then using a mapping convert this three level structure to your 5 level one and then try to map with the idoc.
Check this blog for an idea
http://www.riyaz.net/blog/xipi-file-content-conversion-for-complex-structures/
http://www.riyaz.net/blog/xipi-convert-flat-file-to-deeply-nested-xml-structures-using-only-graphical-mapping/
Regards
Suraj

Similar Messages

  • I am batch processing in PS 2014 (watermark and saving as jpeg from ps file). I get the message for some but not all 'this file needs to be saved as a copy with this option'. And then I have to save it manually. Does anyone know why this happens? (It is j

    I am batch processing in PS 2014 (watermark and saving as jpeg from ps file). I get the message for some but not all 'this file needs to be saved as a copy with this option'. And then I have to save it manually. Does anyone know why this happens? (It is just a plain photoshop file, a watermark is added, then save as jpeg - the jpeg is saved to a different folder than the original photoshop file.)  It happens for about 10 of 30/40  files approximately . Thank you, Kathryn

    I believe I have figured it out - I need to flatten the image, even though there are no layers except for layer 0, first.

  • Creating JCo IDoc from flat file structure

    Hi,
    I need to send an IDoc into SAP using JCo.
    The input to my program is a string containing lines representing a flat file idoc, e.g.
    Line 1="EDI_DC40                           2   ORDERS04.."
    Line 2="E1EDK01                                          00000100000001    USD..."
    Line 3="E1EDK14                                          0000030000000...."
    Is there a simple way to use JCo to create & send the IDoc? 
    i.e.
    1) If I use JCo and RFC IDOC_INBOUND_ASYNCHRONOUS, what would be all the steps/calls to SAP (create TID, call IDOC_INBOUND_ASYNCHRONOUS, confirm TID..?)
    And can IDOC_INBOUND_ASYNCHRONOUS be called using the flat file structures (without having to map to all the JCo ParameterList fields)?  Since the flat file structures are  in the format required by the RFC, just in one long string.
    Line 1=>IDOC_CONTROL_REC_40
    Lines 2..n=>IDOC_DATA_REC_40
    2) Similarly, if I were to use JCo plus the JCO IDoc library, is there a way to pass the flat file structures without having to do all the mapping to segment fields?
    3) Other options..?
    I want to use ALE to SAP, not files, even though the input is in the flat file structure.

    Your reply gives a link to the general JCo documentation.
    It doesn't give ideas on how to call an RFC or IDoc from JCO without mapping each and every field from a flat file structure.
    I'm looking for a way to do something like this:
    Function IDOC_INBOUND_ASYNCHRONOUS has table parameters
          IDOC_CONTROL_REC_40 STRUCTURE  EDI_DC40
          IDOC_DATA_REC_40 STRUCTURE  EDI_DD40
    Since I have the flat file representation of the IDoc, the first line should overlay exactly onto the EDI_DC40 structure.  And the subsequent lines should overlay onto EDI_DD40.  (all fields in this RFC are strings)
    However JCO and JCO IDoc library seem very strongly typed, so it looks like I would have to map each field from the flat file structure to a field in the JCO Function or JCO IDoc object. 
    This could be done in a generic way using the function/idoc metadata, however there would still be some overhead.
    Is there a way to get round this, and build the function/idoc treating its parameters as one long string?

  • How to create a inbound IDOC from flat file in Application server

    HI All
    Our requirement is to create the Inbound idocs from a flat file from application server with in R/3
    Could any body please let me know the steps required for this.
    Thanks
    Malli

    1. Read the file using OPEN DATASET and read and fill up the segment info and fill the EDIDC header data
    and then call function
    CALL FUNCTION 'INBOUND_IDOC_PROCESS'
        TABLES
          IDOC_CONTROL       =  i_edidc
          IDOC_DATA          =  i_edid4.

  • How to Create Hierarchy From Flat file Structure

    Hi Gurus,
    There is a scenario for me regarding the Hierarchy.
    Required Hierarchy structure - Region>Director>Manager-->Sales id
    I have flat file which gives the info like user id , sales id , manager id, director id.
    But the transaction data Flat file has structure with sales id, region id, sales amt, sales qty.
    Note : Region id is another Master Data.
    How i can create hierarchy from the first flat file which doesnot have region info in that but it is available in the transaction data Flat file.
    Is there anyway we can create hierarchy based on the first Flat file structure which contains more that 1,00,000 records.
    Try to Suggest me in this regard .
    This is urgent.
    Regards,
    Mano

    Hi Mano,
                    Defining the source system from which to load data
    Choose the source system tree File  ® Create.
           2.      Defining the InfoSource for which you want to load data
    Optional: choose InfoSource Tree ® Root (InfoSources) ® Create Application Components.
    Choose InfoSource Tree ® Your Application Component ® Other Functions  ® Create InfoSource 3.x ® Direct Update.
    Choose an InfoObject from the proposal list, and specify a name and a description.
           3.      Assigning the source system to the InfoSource
    Choose InfoSource Tree ® Your Application Component ® Your InfoSource ® Assign Source System. The transfer structure maintenance screen appears.
    The system automatically generates DataSources for the three different data types to which you can load data.
    ○       Attributes
    ○       Texts
    ○       Hierarchies (if the InfoObject has access to hierarchies)
    The system automatically generates the transfer structure, the transfer rules, and the communication structure (for attributes and texts).
           4.      Maintaining the transfer structure / transfer rules
    Select the DataSource for uploading hierarchies.
    IDoc transfer method: The system automatically generates a proposal for the DataSource and the transfer structure. This consists of an entry for the InfoObject for which hierarchies are loaded. With this transfer method, the structure is converted to the structure of the PSA during loading, which affects performance.
    PSA transfer method: The transfer methods and the communication structure are also generated here.
           5.      Maintaining the hierarchy
    Choose Hierarchy Maintenance, and specify a technical name and a description of the hierarchy
    Hope this helps
    Regards
    Karthik
    Assign points if Helpful

  • Convert IDOC to flat file - How to guide

    Hello,
    I have found the how to guide for converting IDOCs to FlatFiles via ABAP Mapping.
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/46759682-0401-0010-1791-bd1972bc0b8a
    What is not clear to me. This sounds like I do not need a message type for the flat file with a full implemented structure corresponding to the source IDOC.
    Is this right?
    Or it is really necessary to create a mess.type with data type for rebuilding the IDOC structure in the flat file!
    Can anyone help?
    Best regards
    Dirk

    Dirk,
    Well, am not exactly sure if my reasoning is technically correct, but here it goes,
    Java Mapping and ABAP mapping takes the Input Source as an InputStream and return the output also as Streams. These streams are not validated against the source and the target strucutres.
    In the case of XSL, the only requirement is that theinput / output should be a well formed XML  content.
    Graphical Mapping produces a Java code internally and I guess the code has a validation check against the source / target schema.
    Regards,
    Bhavesh

  • Create IDOCs from DMEE Files

    Hi SDN,
    Can I create Custom IDOCs from the DMEE file format.
    The file is getting downloaded after the DMEE Run in a specific format individual to every company code.
    I want to generate IDOCs for every DMEE Run.
    Thanks,
    Manu

    Take a look at this :
    http://www.sappoint.com/ppt/idoc.ppt
    you need to create File port in Tr.WE21 , as file port
    Then you have to sechdule the program RSEout00 to collect Idocs .
    You can test it in Tr.WE19 , you can also use the Tr.BD87 to see your Idoc status
    Hope this’ll give you idea!!
    <b>P.S award the points.</b>
    Good luck
    Thanks
    Saquib Khan
    "Some are wise and some are otherwise"

  • Creating IDoc from DMEE File Format

    Hi SDN,
    Can I create Custom IDOCs from the DMEE file format.
    The file is getting downloaded after the DMEE Run in a specific format individual to every company code.
    I want to generate IDOCs for every DMEE Run.
    Thanks,
    Manu

    Hi,
    your problem is just like filling the segements using the data in other segements. that means if you have knowledge of enhancing the idoc and populating the enhanced segments then in the same way you can populate the BATCH segment also.
    you just go to the function module which will be creating the idoc(if its outbound) / function module which will be posting the idoc which is for inblund and then find the perform where it fills the segments ( it will be the one which you will use to fill the segment BATCH )and go that and at last of form you will find one customer function which you can use to fill the BATCH segment.
    i think this will help u,
    Regards,
    Ravi

  • Create IDOC from XML file

    Hi,
    I want to create Scheduling Agreement from idoc using XML file means i am receiving XML file and i want to convert this XML file into IDOC and finally process this IDOC to craete scheduling agreement.
    But i don't have any idea for this.pl. tell me what should i do for this.
    Thanks,
    Rahul

    Hi,
    You are receiving XML file and you want that to converted into the IDOC and inturn to be processed in your system, for this you need to create an XML port and you need to read the file from that port then an IDOC will be created.  Create an XML file port in WE21 transaction and then goto WE16 transaction and you can use that transaction to upload a file as an IDOC into the SAP system.
    Once the IDOC is created rest of the activity is same.
    Thanks,
    Mahesh.

  • Load of hierarchies from R/3 via flat file: how to generate the flat file?

    Hello,
    I need to build a custom extractor for a hierarchy. The hierarchy exists in R/3, but there's no standard datasource to extract it. I know I can upload it via flat file, but I have a question related to this.
    Does anyone know if there's a program (standard or custom by SAP) or function module in R/3 which allows me to generate that flat file, with the required format by BW?
    I would appreciate very much any help about this topic
    Thanks in advance

    In CO-PA there is a way to generate Hierarchy Extractors (see Note 422175 for more details). With a Custom Program you generate a specific DataSource.
    Hope it helps
    GFV

  • How to Edit the message mapping in Quality server

    Hi Experts,
    Can you plz tell me, is there any way to edit the message mapping in QUALITY system?

    Hi,
    >>>>Can you plz tell me, is there any way to edit the message mapping in QUALITY system?
    the correct one:
    - correct on DEV
    - export/import
    and it's edited on quality
    if you edit on qulity by changing the SWCV to editable then remember to
    do the change in DEV later and export import and solve the version conflict on quality
    as if you forget to do this someone will have to solve in the future and will not know why....
    Regards,
    Michal Krawczyk

  • Create inbound invoice from flat file

    Hi Folks,
    for periodic creation of PO invoice from flat file, what would be the best way to go?
    Thanks and Rg. Jimbob

    1. Read the file using OPEN DATASET and read and fill up the segment info and fill the EDIDC header data
    and then call function
    CALL FUNCTION 'INBOUND_IDOC_PROCESS'
        TABLES
          IDOC_CONTROL       =  i_edidc
          IDOC_DATA          =  i_edid4.

  • Inbound idocs with flat file

    Hi
    Iam creating INBOUND IDOCS from flat file ...so my sending and recieving systems are same...
    In WE20 i have setup the logical system and assigned inbound parameters with message type and proces code.
    Iam using IDOC_INBOUND_ASYNCHRONOUS to create the inbound IDOCS but iam getting the error
    EDI: Partner profile inbound not available
    It looks like iam missing some settings here..
    Please let me know what checks i need to make sure to get rid of this error and post the idoc.
    Thanks
    Govi

    Hello,
    You need to create partner profile in WE20 transaction code.
    For more details follow the link: [creating PARTNER PROFILE|http://help.sap.com/saphelp_nw04/helpdata/en/2d/f371e4d24a11d289810000e8216438/frameset.htm].
    Hope this resolves your issue!
    Thanks,
    Augustin.

  • Create Idoc from transaction

    Hi,
    I want to create a Idoc from a transaction.
    For example, if i will execute transaction "MM02" to change the material detail then i want to create a idoc for that changed material,
    Does anyone have idea regarding this?
    {{Actually remaining configuration i have done to sent a idoc from one system to other system but right now i am generating idoc manually using transaction "BD10" in which i am selecting the material manually.
    Now i want the whole procedure to be done automatically so that whenever a change in material will be done, a idoc will be generated.}}

    Actually i have already set "Trigger idoc immediately" in WE20. I am using Transactional RFC instead of file in we21.
    Configuration for WE21 is for port defination i am using transactional RFC which is defined in SM59.
    In WE20 i am creating Logical system in which i am using message type MATMAS in outbound for which i am using transactional RFC in receiver port.Output mode i am choosing "TransferIdoc immediately". and Idoc type is "MATMAS02".
    In BD50 i am assigning change pointer to "MATMAS".
    Also i have created distribution model but i am not able to distribute which i have already told u.
    At the receiver side i am creating another logical system in WE20 in which i am defining message type "MATMAS" as inbound parameter.Process Code is "MATM". and i am choosing "Trigger immediately" in processing option.
    So this is the configuration i have done and i m able to send idoc successfully but still i cant make it automatically. I have to use transaction bd21 to create idoc from change pointer. This is the only problem i am getting.
    So anything else is required to be done????????

  • I need help to create  idoc from scrach.

    i need help to create  idoc from scrach.

    Swamy Katta,
    Please read "[the rules|https://www.sdn.sap.com/irj/sdn/wiki?path=/display/home/rulesofEngagement]" before you post any further, and confirm that you have read them?
    => Search first, ask questions later please!
    Julius

Maybe you are looking for

  • Screen painter groups

    I have made with screen painter a program that has 2 screens . I want now to be able to have the screen No 1 to be only for viewing and not for editing . I suppose that i can do it with the attributes of the screen (Screen group ) . Can someone pleas

  • The subscription have been marked inactive and must be reinitialized into a replication

    Hi Team I keep on getting the following error on Transnational Replication setup in SQL 2005. below is the error message: The subscription(s) have been marked inactive and must be reinitialized. NoSync subscriptions will need to be dropped and recrea

  • Long delay opening socket

    I'm seeing a very strange behavior in a simple client/server application. When we run it all on "localhost" (ie both client and server on "localhost") everything works fine. But when we run the application with Client and Server located on two differ

  • Ipod nano HELP files currupt!!!

    Please help, I have been trying to transfer music onto my nano for the past 2 days. At first it will only sync about 10 songs, so I resync and it takes about 30 min to sync 5 more songs. After that it tells me that my "files cant be snyced file direc

  • Change gearing sign (reverse slave axis)

    Hello, I am building a precision winding machine: the mater motor controls a cylinder and the slave motor movese the head with the wire. The objective is to wind the wire in a 3d helix. I am using a cRIO 9022 with two NI 9512 drivers. The problem is