Legacy flat file - XI - R/3 (IDocs)

Hi Liu,
I was trying to have some hands-on with XI 3.0 demo.
I tried with the following scenario-
Legacy flat file -> XI -> R/3 (IDocs)
e.g., say to create BOM data or material Master.
I take the flat file - create my own External Data Type, message type & message Interface for it in Design(Repository).
And try to map it with the required IDoc Type(msg. type) imported from R/3.
But while mapping, I found certain unknown fields like BEGIN (mandatory), inside the Control Record EDI_DC40- certain fields like SEGMENT, TABNAM, etc.
Al these fields are unknown & I could not figure what to map & how to map them.
Also how do we map Sender port/ receiver- dow e need to hard-code them or we can assign them/map them dynamically.
Would appreciate ur sppedy reply.
Thanks.

For BEGIN you map a constant with no value.
For the attributes SEGMENT you have to choose:
1. Is the IDOC segment available only once (occurence 1..1), just map constant '1'
2. Is the IDOC segment available multi times (occurence 1..unbounded), map arithmetic function 'counter' to make sure, that each attribut SEGMENT has an increasing number.
Regards
Stefan

Similar Messages

  • Legacy flat file to IDOC into SAP

    after been given the task of converting a flat file structure to SAP idocs my research as lead me into the daunting world of CAPS. Basically I would like to know if using CAPS is the best choice for me
    and if so what is actually involved to make this happen?
    Thanks
    Michael

    hi michael,
    from my point of view "the right thing to do" would be:
    consider if this is the only task for you that is somehow EAI ish...
    if it is do not care about technology... just do it with a very simple program
    if you have to evolve choose a tool that is capeable of your systems you own: e.g. SAP AS400 .......
    in caps you would typically do this:
    setup CAPS
    write an ftp2queue component
    write a converter (custom otd + convertion logic + IDOC OTD)
    write a idoc 2 sap component via TRFC
    run ;-)
    a good starting point would be:
    http://developers.sun.com/docs/javacaps/index.jsp
    or
    http://wikis.sun.com/display/JavaCAPS/Grok+Java+CAPS
    or try to convince your boss that sun will implement it for you if you have the money to do so.
    we did that when introducing CAPS (we got it for free besides the CAPS licences of course ;-)).
    regards chris

  • Reprocessing a legacy flat file....Avoid multiple postings

    Hello everyone,
    I am processing a file from application server and posting material documents in SAP against a unique number in legacy. This is a backgroung job. The same program can be executed in foreground also.
    My problem is with reprocessing the same input file or accidental processing of the same file again and again.
    Option 1:
    While posting the material document, i pass the legacy invoice number in MKPF-BKTXT using the same BAPI. For each processing i check the BKTXT before posting against a invoice
    Option 2:
    Maintain separate table for posted invoices
    Option 3:
    Maintain log file in application server against input file and check that before posting.
    For me option 1 seems to be the best method as for the other 2 options there is a chance that document is posted and while writing the log there is some termination unless i can combine and write the log in the same logical unit of work (LUW).
    Please share you opinion...
    Is there any better way to handle this ?
    Thanks

    R V,
    We use a 4th option.
    We created a database with the following fields;
    CHAR     15     Interface File Name, case sensitive
    DATS     8     Date Assigned by Source System
    TIMS     6     Time Assigned by Source System
    DATS     8     Date added to this table
    TIMS     60     Time added to this table
    All interface files contain a header record with these 3 fields:
    CHAR     15     Interface File Name, case sensitive
    DATS     8     Date Assigned by Source System
    TIMS     6     Time Assigned by Source System
    We created a program that compares the input file header record name, date, and time, with the database table values.  Duplicates send an email and stop the next program in the stream (program that creates the SAP transactions).  If the input file is not a duplicate, a record is inserted into the database table and the next program is the job stream runs.
    Bruce

  • 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

  • Flat File to IDOC

    Hi,
    I have to post the data from Flat File to SAP using IDOC. Please help me out with all the posibilities.
    Regards,
    Kiran.L

    Hi,
    Step 1 Read flate file into internal table.
    step 2  Follow below program to create a idoc through Z program,
    REPORT ZOUTBD_IDOC_TEMPLATE NO STANDARD PAGE HEADING.
    *************************START OF DECLARATIONS**********************
    *eject
    Table Declarations
      TABLES:  ZIDOC_TAB_EX1,  "Equivalent to an SAP Master table.
               ZIDOC_TAB_EX2.  "Equivalent to an SAP Master table.
    *eject
    Types Declarations with data work Areas / Internal tables.
      TYPES: begin of ty_idoc_par,
               werks      LIKE   ZIDOC_TAB_EX1-werks,
               c_rec_ind  LIKE   ZIDOC_TAB_EX1-c_rec_ind,
               name1      LIKE   ZIDOC_TAB_EX1-name1,
               name2      LIKE   ZIDOC_TAB_EX1-name2,
               stras      LIKE   ZIDOC_TAB_EX1-stras,
               pfach      LIKE   ZIDOC_TAB_EX1-pfach,
               ort01      LIKE   ZIDOC_TAB_EX1-ort01,
               counc      LIKE   ZIDOC_TAB_EX1-counc,
               pstlz      LIKE   ZIDOC_TAB_EX1-pstlz,
               telf1      LIKE   ZIDOC_TAB_EX1-telf1,
               regio      LIKE   ZIDOC_TAB_EX1-regio,
            end of ty_idoc_par.
      TYPES: begin of ty_idoc_chd,
               werks     LIKE    ZIDOC_TAB_EX2-werks,
               eroed     LIKE    ZIDOC_TAB_EX2-eroed,
               schld     LIKE    ZIDOC_TAB_EX2-schld,
             end of ty_idoc_chd.
      TYPES: begin of ty_message,
               OBJNR      LIKE    MCMAILOBJ-OBJNR,
               OBJLEVEL   LIKE    MCMAILOBJ-OBJLEVEL,
               OBJTYPE    LIKE    MCMAILOBJ-OBJTYPE,
               OBJNAM     LIKE    MCMAILOBJ-OBJNAM,
               OBJDES     LIKE    MCMAILOBJ-OBJDES,
               OBJLINE    LIKE    MCMAILOBJ-OBJLINE,
             end of ty_message.
      TYPES: begin of ty_mess_output,
               v_err_out(1000)     TYPE  C,
               v_err_out_2(1000)   TYPE  C,
             end of ty_mess_output.
    *eject
    Data Declarations
    Essential declarations for populating the IDOC:
      DATA:  begin of itab_idoc_data occurs 0.
               include structure edidd.                    "Data record.
      DATA:  end of itab_idoc_data.
      DATA:  begin of itab_comm_idoc_control occurs 0.
               include structure edidc.                    "Control record.
      DATA:  end of itab_comm_idoc_control.
    Internal Table for Mail Recipient.
      DATA: BEGIN OF ITAB_RECIPIENT OCCURS 0.
              INCLUDE STRUCTURE  ZINT_RECEIVER.
      DATA: END OF ITAB_RECIPIENT.
    Declare an internal table for Parent segment.
      DATA:  itab_idoc_par TYPE ty_idoc_par occurs 0 with header line.
    Declare an internal table for child segment.
      DATA:  itab_idoc_chd TYPE ty_idoc_chd occurs 0 with header line.
    Declare variables for Parent and Child Segments
      DATA:  i_z1parseg  LIKE   z1parseg,     "PARENT SEGMENT DATA.
             i_z1child   LIKE   z1child.      "CHILD  SEGMENT DATA.
    Internal table to process function to send error mails.
      DATA: itab_err_mess  TYPE   ty_message     occurs 0 with header line.
      DATA: itab_mess_output TYPE ty_mess_output occurs 0 with header line.
    Variables for sending error mails.
      DATA: objnr                 LIKE   SOOD1-ACNAM, "Name of object.
            V_ERR_DESC_1          LIKE   SOOD1-OBJDES,
                        "Error message on pop up box after program executes.
            V_OBJLINE             LIKE   ITAB_ERR_MESS-OBJLINE,
            V_MESSAGE_1(60)       TYPE   C,
            V_MESSAGE_2(120)      TYPE   C,
            V_MESSAGE_3(75)       TYPE   C,
            V_MESSAGE_4(150)      TYPE   C,
            V_MESSAGE_5(150)      TYPE   C,
            V_MESSAGE_6(150)      TYPE   C,
            V_RDATE(10)           TYPE   C,
            V_RTIME(8)            TYPE   C,
            V_RECIPIENT(12)       TYPE   C,
            v_itab_idoc_par_lines,
            v_itab_idoc_chd_lines,
            child_counter         TYPE   C,
            parent_counter        TYPE   C,
            idoc_counter          TYPE   C,
            v_mess_output(1000)   TYPE   C,
            v_error_detail(88)    TYPE   C,
            v_final_detail(1000)  TYPE   C,
            V_DUMMY               TYPE   C.   "Dummy File Indicator.
    *eject.
    Constant Declarations
      CONSTANTS:
    BASIC IDOC TYPE AS CREATED FROM TRANSACTION CODE we30.
      C_Segment_type1(8)         TYPE C  VALUE  'Z1IDOCOB',
      C_mestyp(11)               TYPE C  VALUE  'ZSAMPLEMESS',
      C_SENDMODE                 TYPE C  VALUE  'B',   "Sending Mode
      C_EXPRESS                  TYPE C  VALUE  'E',
      C_LANGUAGE                 LIKE sy-langu   VALUE  'E'.
    **********************END OF DECLARATIONS*****************************
    *eject
    Initialisation
    INITIALIZATION.
    Assign the initial settings for sending error mails.
      v_err_desc_1   = 'Message from processing ZOUTBD_IDOC_TEMPLATE.'.
                       "Error message in pop up box after program executes.
      v_error_detail = 'A complete set of detail records is not held for'.
      idoc_counter   = '0'.   "No of Idocs processed.
      parent_counter = '0'.   "No of parent segments selected.
      child_counter  = '0'.   "No of child segments selected.
    *************************BEGIN OF PROCESSING**************************
    Call form to initialize standard structures
      PERFORM clear_Structures.
    Fill report to tell user when the interface was run.
      PERFORM fill_mail_report.
    Call function to populate parent structure:
      PERFORM select_parent_data.
    Call function to populate child structure:
      PERFORM select_child_data.
    Inform the user of the number of records that were selected.
      PERFORM fill_record_selected.
    Loop at contents of parent structure:
      LOOP AT itab_idoc_par.
    Populate the control structure with the partner and port sending and
    receiving details.
       REFRESH itab_idoc_data.
       PERFORM populate_Control_structure USING  c_mestyp
                                                 c_SEGMENT_type1.
       PERFORM transfer_Parent_data_to_seg.
    Loop at the children structure - retrieving the children segments
    for this parent.
       LOOP AT itab_idoc_chd WHERE WERKS = itab_idoc_par-WERKS.
    Call form to transfer data to child Idoc.
       PERFORM transfer_Child_data_to_seg.
    ENDLOOP.      "Stop looping through the children structure.
    Call SAP function to transfer data.
       PERFORM master_idoc_distribute.
    Form to close logical unit of work.
       PERFORM COMMIT_WORK.
    ENDLOOP.   " Stop looping through the parent structure.
    Fill the number of articles processed for online mail.
       PERFORM fill_process_record.
    Write to online mail report on data interface has processed.
       PERFORM FILL_ERR_MESSAGE USING  V_OBJLINE
                                       V_MESSAGE_1
                                       V_MESSAGE_2
                                       V_MESSAGE_3
                                       V_MESSAGE_4
                                       V_MESSAGE_5
                                       V_MESSAGE_6.
    Send online mail with contents of message fields.
       PERFORM SEND_MAIL.

  • 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

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

  • 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?

  • 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

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

  • Simples for IDOC - Flat files (Formated) process

    Hi all,
    I m looking for same exemple showing how to create formated flat files from a standard IDOC.
    Thanks in advance,
    Fouad,

    hi,
    have a look at this :
    https://websmp102.sap-ag.de/~sapdownload/011000358700001795162005E/HowToIDocXMLToFlat.pdf
    abap mapping from IDOC to flat file
    all the code is inside the pdf
    or you can generate a file from R3 directly
    /people/stefan.grube/blog/2006/09/18/collecting-idocs-without-using-bpm
    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>

  • IDoc flat file to IDoc

    I am receiving flat file in SFTP Server which need to be posted into SAP (No mapping involved)
    What will be the best approach ?
    1. I tried using IDOCFlatToXmlConvertor (The limitation in the format of source file. The parent and child node relationship should be explicitly mentioned in IDoc flat file which legacy system is not able to do) - Any workarounds ?
    2. I moved the Idoc flat file into SAP application server. Now need to schedule job using program RSEINB00
    3. File Content Conversion
    Any other better solution ? Appreciate your help.
    Thanks and regards,
    Jose Augastine

    For converting Idoc Flat file to idoc xml, ABAP mapping is one of the feasible option.

  • Send IDOC to  flat file without mapping will it possible???

    Hello everybody,
    Iwould like to  know, We have middleware tech is Webmethods. I want to send IDOC from SAP R/3 to flat file in Legacy system. how to do that? What willbe the structure of Flat file.

    hi
    Create a FILEPORT uing transaction WE20 and assign the fileport to your outbound message type in processing option, you can give the physical path in fileport and create the flat file format of IDOC.
    hope this helps
    regards
    Aakash Banga

  • Data Extraction  or IDOC to flat file

    hi,
    I have a project to create a flat file from SAP, for an external legacy system. There are 3 requirement.
    What approach should I take. Simple data extraction OR Idoc to flat file.
    There are 4 requirements:
    1. first time extract all data.
    2. on subsequent run, extract only changed & new records
    3. if in SAP table, a record is deleted, then marked deleted in flat file.
    What approach should I take if I use data extraction.
    Thanks.

    I read your question, my first thought would be to look at where the data is going?
    What are the data requirements of the legacy system. IDOCs can speed up the development related to pushing the data out from SAP. Using ALE and change pointers you can automatically pass out the delta with a limited amount of development.
    However, the receiving system then needs to parse the IDOC data. depending on the IDOC you are working with this can be a challenge especially if the legacy developer doesn't get IDOCs.
    Sometimes its easier to collect and write the data from SAP using "simple data extraction". The data is more readily organized into a format the receiving system is expecting.
    You can also pass the idoc to a middleware maping application if one is available and do the SAP to legacy mapping there.
    Cheers

  • Inbound IDOC Format (Flat File)

    Hi,
    I'm using SAP CRM Middleware for communication between CRM and Legacy System.
    I have configured Outbound IDOCs and I see something like this:
    EDI_DC40  2200000000000000023700 3012  CRMXIF_PARTNER_SAVE_M01                                     CRMXIF_PARTNER_SAVE_M
    E201CRMXIF_PARTNER_COMPLEX000 220000000000000002300000100000001CRMXIF_PARTNER_COMPLEX
    E201CRMXIF_PARTNER_HEADER000  220000000000000002300000200000102CRMXIF_PARTNER_HEADER         BusinessPartner                 U
    E201CRMXIF_PARTNER_KEYS000    220000000000000002300000300000203CRMXIF_PARTNER_KEYS           0000000014488DDB8AD891249EE10080010A6CA883
    The questions are:
    I need to know how do the following information must be filled in an Inbound IDOC:
    The first characters I understand that corresponds to the Structure name, IDOC Number, IDOC Line...
    So I need how do fields like IDOC number must be filled in an Inbound IDOC
    Thanx in advance..
    BTW. I'm expecting IDOCs as flat files so I need to explain to the Legacy Technician how to fill this fields.

    Hi,
    Go to transaction WE30 and give the IDoc basictype name CRMXIF_PARTNER_REL_SAVE_M01 and press the view-button (or press F7 key).
    This information you will need.
    The records are builded using the following structure:
    1st record contains control record information and follows the structure of table EDIDC.
    Starting at where "220" is given (this is the CLIENT), it is followed by the IDoc number field DOCNUM (16 digits) and so on. Not all fields must be filled, only those that are used for inbound messaging. Keep here in mind: Less fields filled will probably work better (because SAP will add its own details on arrival of the IDoc).
    All following records follow the structure of table EDID4 upto the field: HLEVEL (Hierarchy level, identical to the level found in WE30).
    Thereafter it is followed by the name of the segment (including spaces) and after this it will follow the exact structure of the segment.
    To view a sample, just generate a dummy (test) IDoc and use transaction WE19 to fill in the fields after changing to the correct IDoc type.
    Hope this helps you out.
    Regards,
    Rob.

Maybe you are looking for