IDOC DELVRY05 TO EDI 856 - Mapping problem

Hi all,
i'm currently working on a outbound mapping with the delivery idoc (DELVRY05) and the EDI 856 (Advance Shipping Notice Definition)
The problem is that i can't map the items for every pack in the structure because the ocurrency doesn't match.
The EDI 856 has a segment called G_SHL (ocurrence 0.200000), that i replicated 4 times for shipping, order, pack and item data
And this segment has a subsegment called  G_SHL/S_HL (ocurrence 0.1)
RESULT DESIRED GIVEN BY THE CLIENT: (1 pack/1item)
3     HL1*S~                        ======> S: shipping, 1 hierarchy)
4     TD1CTN251***G223.997*LB~
5     TD5*2ABFSM*CC~
6     REFBM003030987~
7     REFCN086044619~
8     DTM01120080128*180610~
9     DTM06720080204~
10     FOB*PP~
11     N1SFStiefel Labs~
12     N4DULUTHGA*30096~
13     HL21*O~ ======> O: order, 2 hierarchy, 1 was the previous hierarchy)
14     PRF*4064561~
15     HL32*P~ ======> P : Pack, 3 hierarchy, 2 was the previous hierarchy
16     MANGM00000734620052976193~
17     HL43*I~  ======> I: Item , 4 hierchay, 3 was the previous hierarchy
31     LIN*UP073462150651LT45X5147ND00145150605~
32     SN1*12EA~
33     DTM03620090930~
34     HL52*P~  ======> P : Pack, 5 hierarchy, 2 was the previous hierarchy
35     MANGM00000734620052975189~
36     HL65*I~ ======> I: Item , 6 hierchay, 5 was the previous hierarchy
37     LIN*UP073462150651LT45X5147ND00145150605~
38     SN1*12EA~
39     DTM03620090930~
40     HL72*P~ ======> P : Pack,7 hierarchy, 2 was the previous hierarchy
41     MANGM00000734620052975196~
42     HL87*I~ ======> I: Item , 8 hierarchay, 7 was the previous hierarchy
43     LIN*UP073462150651LT45X5147ND00145150605~
44     SN1*12EA~
45     DTM03620090930~
46     CTT*8~
47     SE479220014~
As u see, all packs belong to "2 hierarchy" (order), and items to their correposding pack
(has a comment, the "hierarchy number" is always given by a counter so u won't find the exact number again)
so, the client wants us to create an structure that is like this..
1º Pack
1º item
2º item
2º Pack
1º item
2º item
(the example has only one item, but they say that is going to be with many items)
- The problem is that the structure data of the Idoc doesnt match EDI 856 structure
E1EDL37 (0.99999)  -
Pack data -
G_SHL (0.200000)
E1EDL37/E1EDL44 (0.99999) -
Item data -
G_SHL/HL (0.1) <====
i was doing different G_SHL for pack and items but that leaves me with a wrong structure, and with all the hierarchy data wrong for items (since the mapping can't see which item belong to his pack)
1º Pack
2º Pack
3º Pack
1º Item
2º Item
3º Item
- How can i map the structure Pack/item if in the idoc got too many item positions for only one EDI corresponding segment??
Thanks in advance!

Alains,
We have the same tear, pack and item problem with one of our customer in one of my project. To acheive this result with the standard schema is not possible because this is a custom one.
So I would suggest to change the schema in BIC like the occurrence and within the third G_SHL you should have S_HL and within this you should have a S_HL so that for every pack you will have multipe items.
The bottom line is to have the schema as required by your mapping. Once you change the schema deploy the maps in J2EE and use them else it will throw an error in RWB.
Regards,
---Satish

Similar Messages

  • Biztalk EDI 856 Mapping H1 Segment

    Hi,
    I'm new to EDI 856 mapping in Biztalk. I have to map xml schema to EDI 856 XSD and generate a EDI file through biztalk.
    I've 3 datasets (repeating nodes) in internal schema (shipment level, order level and item level) I have  to map this data to EDI 856 in Biztalk mapping. But the complexity is i have to map all the data's with-in HL loop. I have to repeat HL loop thrice
    for shipment level , order level , and item level and each time i should map data to different segments. (ex: i should have LIN segment only at item level).
    My output should be like
    <HL> --SHIPMENT LEVEL
    <TD1></TD1>
    <TD3></TD3>
    <REF></REF>
    <FOB></FOB>
    <HL> -- ORDER LEVEL
    <TD1></TD1>
    <REF></REF>
    <N1></N1>
    <HL> --ITEM LEVEL
    <LIN></LIN>
    <SN1></SN1>
    <TD></TD>
    The problem i face is since i loop HL segment the N1 which should be present only at order level gets repeated at shipment and item level too. Please help me or suggest any study material , its urgent.
    Thanks in advance..

    Hi,
    I can anyone help me to map a flat XSD to a structured XSD in biztalk mapping.
    Incoming Schema
    Record
    <Shipmentdata>
    <Shipmentdata1>
    <Shipmentdata2>
    <Orderdata>
    <Orderdata1>
    <Orderdata2>
    <ItemData>
    <ItemData1>
    <ItemData2>
    OutputSchema
    <shipmentData>
    <OrderData>
    <ItemData>
    My input schema is a flat one which i take from DB (ex: if there is 15 items in one shipment and 3 orders the xml will repeat 15 times with repeating data in shipment node and order node). I should convert it into a Structured XML with 3 level of hierarchy.
    Please help with Biztalk mapper example. Thanks in advance.

  • Idoc File to File scenario mapping problem

    Dear All,
    I am working on File to File scenario in which my source xml file is having multiple deliveries Idoc structure to which I want to convert into output structure as required.
    In my source file there is possibility that there can be multiple delivery idocs for the same delivery number so i want to pick all the data for  the unique deliveries and if same delivery number repeats then the delivery created last should only be picked without considering others.
    Please guide me in mapping this scenario.
    Regards,
    NJ

    Hi,
      Use the below UDF.
    Set set = new HashSet(Arrays.asList(var1));
      String[] array2 = (String[])(set.toArray(new String[set.size()]));
      Arrays.sort(array2);
      for (int i = 0; i < array2.length; i++) {
        result.addValue(array2<i>);
    Map like below:
    source fieldremove contextUDF--Target(delivery number )
    Regards,
    Prakasu.M
    Edited by: prakasu on Jun 2, 2009 6:43 PM

  • Context Mapping Problem from IDoc to EDI

    Hi,
    I'm trying to map an IDoc to an EDI and I get this problem.
    In my IDoc, I have segment E1ADRM1 (1:N)
    My mapping condition is if E1ADRM-PARTNER_Q = OSP then copy E1ADRM-REGION into x (EDI field)
    So here is my problem:
    In my IDoc test, the segment E1ADRM1 is repeated 6 times and the field REGION is not populated in all iterations so the wrong
    REGION is being copied to my EDI field.
    If I do a display queue on E1ADRM-PARTNER_Q, the value OSP is at the 5th position
    AG
    SP
    VE
    WE
    OSP  ***
    OSO
    If I do a display queue on E1ADRM-REGION, since only 5 segment E1ADRM have the field REGION populated, I get
    KS
    VA
    KS
    ON
    VA
    **(E1ADRM-PARTNER_Q = SP do not have the RIGION populated so not showing in the IDoc)
    So now, since E1ADRM-PARTNER_Q = OSP is at the 5th position, it is copying the 5th E1ADRM-REGION from the list but it should be the 4th.
    How can I do that?
    Rgds,
    Yves

    Hi,
    For the mapping to work as you are expecting the queue should look like this(<b>CC</b> denotes context change)..
    KS
    <b>CC</b>
    <b>CC</b>
    VA
    <b>CC</b>
    KS
    <b>CC</b>
    ON
    <b>CC</b>
    VA
    If you are not having the context changes, check at what level is field REGION at, right click on REGION in graphical mapping and choose menu item context, the 1st entry should have the tick mark(same should be for the PARTNER_Q field also).
    Thanks,
    Renjith.

  • Using PI to map IDoc BENEFIT3 to EDI 834

    Has any used PI/XI to map IDoc BENEFIT3 to EDI 834?  We are looking to use this approach but have had problems finding a standard map.  You would think SAP would have one since they stand by their BENEFIT3 IDoc being sufficient to map to the 834.  This will take forever to do it from scratch or even without an example.  Help please.

    Hi
    You can do 1:n multimapping
    in message mapping in messages tab ..add both the structures in target tab and do the mapping
    and in operation mapping add both the message interface on the target side
    PLease go through this blog
    /people/jin.shin/blog/2006/02/07/multi-mapping-without-bpm--yes-it146s-possible

  • IDOC to EDI Seeburger Mapping Issue

    Hi,
    I am new to seeburger, Currently I am working on PAYEXT IDOC to EDI scenario using seeburger adapter.
    As per my little knowledge i can understand that i need two step mapping:
    1) IDOC XML to EDI XML
    2) EDI XML to EDI
    Now the problem is how can i do 1st mapping if i have to do 1:1 mapping in PI mapper than it will be a tedious task as I dont know which idoc field is mapped to which EDI XML field.
    Also i dont know how i can map the 2nd mapping.
    when we installed seeburger adapter than i got three files from basis guys related to PAYEXT
    msg_PAYEXT_UN_D96A.xml
    msg_XML_PAYEXT_UN_D96A.xml
    XML_PAYEXT_UN_D96A.xsd
    Note: I imported .xsd file in IR, but i dont know what to do with these xml files.
    Please experts reply soon as it is delaying my project
    Regards,
    Shradha

    Shradha,
    You can check the seeburger software component versions where all the mappings would be provided by Seeburger as part of the package.
    You can have a look whether PAYEXT is there and would be useful
    To start with
    1. You need a functional or EDI Business analyst to guide you on the various mapping specifications needed.
    2. You should also liase with your business partners to prepare an business rules and other conditions.
    3.Also decide whether you are going to deliver it via AS2 communication or via VAN
    4. Accordingly you need to configure the seeburger adapters.
    5.The mappings provided to you are from XML to EDI and EDI to XML which is a second  stage automatically done by seeburger once you specify the module steps in the comms channel.
    I am afraid that without knowing business rules or mapping specifications, you can't work on EDI.
    Regards
    Krish

  • Mapping Problem ORDERS Idoc to Edifact

    Hi,
    I have a mapping problem with the IDOC ORDERS:
    I get the IDOC with several E1EDP01. Each E1EDP01 has several E1EDPT1, where i want only the first one (which I get over the TDID value). Each E1EDPT1 has min. 1 E1EDPT2.
    Now I have to map each field TDLINE from first two E1EDPT2 of the first E1EDPT1 to the Edifact fields /LIST/S_UNB/S_UNH/G_SSG25/S_LIN/S_IMD[1]/C_C273/D_7008 (from the first E1EDPT2) and, if a second E1EDPT2 exists in /LIST/S_UNB/S_UNH/G_SSG25/S_LIN/S_IMD[1]/C_C273/D_7008_2.
    I use following UDF:
    //a = TDLINE
    //b = Number of entry in the List
    int pos =Integer.parseInt(b[0]);
    if ( pos < a.length )
    result.addValue(a[pos]);
    else
    result.addValue(ResultList.SUPPRESS);
    Unfortunatly, I think becaus of the context problems (not every E1EDPT1 has two E1EDPT2), it's not working. Could somebody help me with this problem?
    Thanks in advance
    Dominic

    Dear Dominic ,
    I had same problem when I was trying to do the same thing for FTX segment.
    Your UDF is fine but you don't need else condition.
    //a = TDLINE
    //b = Number of entry in the List
    int pos =Integer.parseInt(b[0]);
    if ( pos < a.length )
    result.addValue(a[pos]);
    for C_C273 assigned contant value and
    D_7008 assigned TDLINE but change the context to E1EDPT1
    and for D_7008_2
    TDLINE(context to E1EDPT1 )
                                                      ====>UDF====>D_7008_2
    Contant(=1)
    It should work becasue my map is working fine. If not let me know error message.
    Thanks
    Shubhankar

  • Mapping Problem with IDOC HRMD_A05

    Hi All,
    When i am mapping source structure with IDOC HRMD_A05 i am getting Mapping not sufficiently defined...
    The idoc is used to change the address of employee(infotype 0006)..
    my source structure is
    EMPADDR_MT
       EmpAddr1
         Trans_INFTY *
        Address1
          AddressType *
          PERNR       *
          EFdate      *
          Addr1       *
          Addr2       *
          ADDR4       *
          City        *
          Country     *
          state       *
          Postalcode  *
    the fields to be mapped
    So can any one help me out what r fields to be maintained for <b>HRMD_A05</b>...
    Regards,
    Sridhar
    Message was edited by: sridhar reddy kondam

    All the required fields & segments(shown red in mapping editor or min occurence:1) of idoc need to be mapped.If any of the fields are not available in your source for mapping..map those fields with empty constants using constant option of the mapping editor.

  • EDI 830/860 problem

    Hi
    My scenario from EDI  Files to IDOC and we are sending some value to the TXT01 field in IDOC DELFOR01.
    We are mapping an UDF with TXT01 field.
    The UDF have code:
    if (txtTwo.equals(""))
        result.addValue(result.SUPPRESS);
    else
       result.addValue(txtTwo);
    So now the sequence of qualifiers in the outbound file is causing problem.
    When the IC came before the ST ,IC code was picked up.
    When the ST came before IC,IC code was ignored.
    So now the IC code is not populating the result in the IDOC and hence the IDOC is not giving the correct result and hence now the customer are facing the problem,
    Please give urgent reply.
    Looking for reply...

    Hi Raj,
        Can you please explain the scenario, what transaction you are using / idoc types ...are you using 'Change pointers' ?
    Thanks
    Donepudi

  • EDI 856 & EDI945

    Hi
    what would be the message type and basic type in sap to map EDI 856 & EDI 945
    this is urgert help needed.
    Thanks in advance
    ajvj

    EDI 856 -
    message type : DESADV
    IDOC Type : DELVRY03
    EDI945 -
    message type :SHPADV
    idoc type : SHPMNT05

  • Mapping problem:from E1EDK14-ORGID to PORDCR102-PUR_GROUP

    Mapping problem:from E1EDK14-ORGID to PORDCR102-PUR_GROUP
    E1EDK14 occurs 4 times in the source sys:
    1   E1EDK14-QUALF = '014'
         E1EDK14-ORGID = 'YP01'      <=  purchase organization
    2   E1EDK14-QUALF = '009'
         E1EDK14-ORGID = '001'      <=  purchase group
    3   E1EDK14-QUALF = '013'
         E1EDK14-ORGID = 'NB'      <=  document type
    4   E1EDK14-QUALF = '011'
         E1EDK14-ORGID = 'C999'      <=  company code
    I always want to copy "E1EDK14-ORGID = '001'" to PORDCR102-PUR_GROUP.
    I have a solution which works but not perfect:
    E1EDK14-ORGID=>copyvalue[1]=>PORDCR102-PUR_GROUP
    I want to have the perfect mapping as follow:
    IF E1EDK14-QUALF = '009'.
      E1EDK14-ORGID = '001' => PORDCR102-PUR_GROUP
    ENDIF.
    I did it in the data flow editor as follow:
    /PORDCR102/IDOC/E1PORDCR1/E1BPMEPOHEADER/PUR_GROUP=
    ifWithoutElse([keepss=false]stringEquals
    (removeContexts(/ORDERS05/IDOC/E1EDK14/QUALF=),
    const([value=009])), /ORDERS05/IDOC/E1EDK14/ORGID=)
    But the result in the target sys is always 'YP0'(The first E1EDK14-ORGID)
    How to solve this problem?
    Thanks
    ming yu

    Hi,
    Try like this.
    E1EDK14-QUALF   --------
    Constant(009) ----------------   EqualsS --------------- 
                                                                 And(Boolean Function)     ------ IfWithoutElse -- PORDCR102-PUR_GROUP
    E1EDK14-ORGID -------                                                      E1EDK14-ORGID  ----------------
    Constant(001)  --------------   EqualsS ------------------
    Regards,
    P.Venkat

  • Message Mapping Problem with UTF-16LE Encoded XML

    Hello,
    we have the following scenario:
    IDoc > BPM > HTTP Sync Call > BPM > IDoc
    Resonse message of the HTTP call is a XML file with UTF-16LE processing instruction. This response should then be mapped to a SYSTAT IDoc. However the message mapping fails "...XML Parser: No data allowed here ...".
    So obviously the XML is not considered as well-formed.
    When taking a look at SXMB_MONI the following message appears: "Switch from current encoding to specific encoding not supported.....".
    Strange thing however is if I save the response file as XML and use the same XML file in the test tab message mapping is executed successfully.
    I also tried to use a Java Mapping to switch encodings before executing message mapping, but the error remains.
    Could the problem be, that the codepage UTF-16LE is not installed on the PI system ? Any idea on that ?
    Thank you!
    Edited by: Florian Guppenberger on Feb 2, 2010 2:29 PM
    Edited by: Florian Guppenberger on Feb 2, 2010 2:29 PM

    Hi,
    thank your for your answer.
    This is what I have tried to achieve. I apply the java conversion mapping when receiving the response message - i tried to convert the response to UTF-16, UTF-8 but none of them has helped to solve the problem.
    I guess that using adapter modules is not an option either as it would modify the request message, but not the response, right?

  • Read EDI-856 interface data in ABAP program

    HI Experts,
    I have a requirement to read the incomming EDI-856 interface data from ABAP program and generate an IDOC.  I have gone through few EDI-856 documents and theformat in which to read the data .
    Request you to let me know the code logic , function module to use or if  you have any document which can help me in the development.
    Thanks in advance
    Regards
    Santosh

    Please help regarding
    First could you please help me regarding the SCN search option?
    please always try to attempt from your side if not able to solve than search in SDN finally you may land on SDN with thread.

  • PI Seeburger Map Problem

    Hi,
    Plzz help me on this issue,
    I am working on edi to idoc scenarion using seeburger.
    I want to map EDI850 to Idoc. In PI Repository I have standard Mappings with version 4010.BUt,
    I need Version 4030 Mappings. Where do i get these version mappings.
    Can  use same version mappings. Plzz help me on this.
    Thanks,
    Singh.

    Hi Seenu/Singh ( Why mutiple names??),
         When you say mappings, there are two types of mapping in Seeburger EDI scenarios.
    1) EDI2XML, XML2EDI mappings which convert the ED formatI to XML and vice versa.
    2) The actual EDIXML data to the IDOCXML data.
    The first type of mappings, you should use BIC mapping designer to develop and then deploy in the PI server.
    The second mapping, you have to create in your Integration repository(Within PI system).
    The External definition that you see is not the one you want.
    If you want to map the IDOC to the EDI 850 V4030, then you should do the following.
    1) Login into the physical server of the PI system using Remote Desktop (The userid and pwd are not the ones u use for logging into IR or ID. Contact your basis team to get access to the physical server of PI system)
    2) Open the file explorer in that system and navigate to a directory by name seeburger. Inder that you have to search for XSD file corresponding to your EDI Document and version.
    3) Copy that file and paste it on your desktop.
    4) Then open your IR.
    5) Right Click on the external definitions node and click on new.
    6) Then import the xsd file which is now tehre on your desktop into PI system.
    7) Now, create a message mapping under the mappings node.
    8) Drag your IDOC structure as the source and External Definition as your target.
    9) Then you can do your mapping as per the requirement.
    Regards,
    Ravi Kanth talagana

  • Difference btw idoc ale and edi

    Hi all,
    I'm a beginner in abap, can anyone send me the concepts of ALE, IDOC and EDI and the difference btw all the three.
    Also do send some materials for the same.

    Hi,
    ALE (Application Linking and Enabling)
    Ale Technology is SAP’s technology to support distributed yet integrated processes across several SAP systems.
    Distributed Process:
    A distributed process is one in which part of a business process is carried out on one system and part on another. The two systems would exchange data with each other at appropriate points to stay synchronized.
    Need for Distributed Process:
    • Business in Different Geographical Locations.
    • Non availability of dedicated network.
    • Cultural and language differences in Geographical locations.
    • Running of Mission-critical Applications (Like Maintenance downtime etc.).
    • Separate up gradation of Modules.
    Distributed SAP SYSTEM – CHALLENGES
    • A system that understands the syntax and semantics of the data. It was important from the very beginning to base the distribution of data on business rules, not on database replication techniques.
    • Distributed systems that can maintain their autonomy while being integrated as one logical SAP system. The systems should be able to operate independently and support logical processing of transactions and data.
    • Distributed systems that can handle different data models. A local implementation should be able to customize the system to meet its local needs.
    • Receiving systems that can handle their own problems and not tie up the sending system.
    • Systems that maintain continued operation in spite of network failure. Changes made to either system should be synchronized after the network connection is restored.
    • A sound technology and methodology that can be used in all distribution scenarios.
    SAP Distributed environment:
    ALE allows for efficient and reliable communication between distributed processes across physically separate SAP systems.
    ALE is based on application to application integration using messaging architecture. A message defines data that is exchanged between two processes. IDocs are containers that hold data exchanged between the two systems.
    Benefits of ALE:
    • Integration with non-SAP systems: ALE architecture allows third party applications to integrate with SAP system.
    • Reliable Distribution: Once message type created and the receiver of the message is determined, ALE delivers the message to the recipient. If there is any network problem it will buffer the message and delivers the message once the network is restored. It also ensures that the message is not delivered twice.
    • Release Upgrade: Any of the distributed system can be upgraded to the new release of SAP without affecting the functionality. The ALE layer ensures backward compatibility of messages exchanged between systems.
    ALE Architecture:
    It consists of an Outbound process, an Inbound process, and an Exception – Handling process.
    Outbound Process:
    ALE Outbound Process in SAP sends data to one or more SAP Systems. It involves four steps.
    1. Identify the need of IDoc: This step starts upon creating a application document, can relate to a change to a master data object.
    2. Generate the Master IDoc: The document or master data to be sent is read from the database and formatted into an IDoc format. This IDoc is called as a Master IDoc.
    3. Generate the Communication IDoc: The ALE Service layer generates a separate IDoc from the Master IDoc for each recipient who is interested in the data. Separate IDocs are generated because each recipient might demand a different version or a subset of the Master IDoc. These recipient-specific IDocs are called Communication IDocs and are stored in the database.
    4. Deliver the Communication IDoc: The IDoc is delivered to the recipients using an asynchronous communication method. This allows the sending system to continue its processing without having to wait for the destination system to receiver or process the IDoc.
    Inbound Process:
    The inbound process receives an IDoc and creates a document in the system.
    1. Store the IDoc in the database: The IDoc is received from the sending system and stored in the database. Then the IDoc goes through a basic integrity check and syntax check.
    2. Invoke the Posting Module: The control information in the IDoc and configuration tables are read to determine the posting program. The IDoc is then transferred to its posting program.
    3. Create the Document: The posting program reads the IDoc data and then creates a document in the system. The results are logged in the IDoc.
    Over view of IDocs:
    IDoc is a container that is used to exchange data between any two processes. The document represented in an IDoc is independent of the complex structure SAP uses to store application data. This type of flexibility enables SAP to rearrange its internal structure without affecting the existing interface.
    IDoc interface represents an IDoc Type or IDoc data. IDoc Type represents IDoc’s definition and IDoc Data is an instance of the IDoc Type.
    IDoc Types:
    IDoc type structure can consist of several segments, and each segment can consist of several data fields. The IDoc structure defines the syntax of the data by specifying a list of permitted segments and arrangement of the segments. Segments define a set of fields and their format.
    An IDoc is an instance of an IDoc Type and consists of three types of records.
    i. One Control record: each IDoc has only one control record. The control record contains all the control information about an IDoc, including the IDoc number, the sender and recipient information, and information such as the message type it represents and IDoc type. The control record structure is same for all IDocs.
    ii. One or Many Data records: An IDoc can have multiple data records, as defined by the IDoc structure. Segments translate into data records, which store application data, such as purchase order header information and purchase order detail lines.
    iii. One or Many Status records: An IDoc can have multiple status records. Status record helps to determine whether an IDoc has any error.
    Message in IDoc Type:
    A Message represents a specific type of document transmitted between two partners.
    Outbound Process in IDocs:
    Outbound process used the following components to generate an IDoc. A customer model, and IDoc structure, selection programs, filter objects, conversion rules, a port definition, an RFC destination, a partner profile, service programs, and configuration tables.
    The Customer Model:
    A customer model is used to model a distribution scenario. In a customer model, you identify the systems involved in a distribution scenario and the message exchanged between the systems.
    Message control:
    Message control is a cross application technology used in pricing, account determination, material determination, and output determination. The output determination technique of Message control triggers the ALE for a business document. Message control separates the logic of generating IDocs from the application logic.
    Change Pointers:
    The change pointers technique is based on the change document technique, which tracks changes made to key documents in SAP, such as the material master, customer master and sales order.
    Changes made to a document are recorded in the change document header table CDHDR, and additional change pointers are written in the BDCP table for the changes relevant to ALE.
    IDoc Structure:
    A message is defined for data that is exchanged between two systems. The message type is based on one or more IDoc structures.
    Selection Program:
    Is typically implemented as function modules, are designed to extract application data and create a master IDoc. A selection program exists for each message type. A selection program’s design depends on the triggering mechanism used in the process.
    Filter Objects;
    Filter Objects remove unwanted data for each recipient of the data basing on the recipients requirement.
    Port Definition:
    A port is used in an outbound process to define the medium in which documents are transferred to the destination system. ALE used a Transactional RFC port, which transfers data in memory buffers.
    RFC Destination:
    The RFC destination is a logical name used to define the characteristics of a communication link to a remote system on which a function needs to be executed.
    Partner Profile:
    A partner profile specifies the components used in an outbound process(logical name of the remote SAP system, IDoc Type, message type, TRFC port), an IDoc’s packet size, the mode in which the process sends an IDoc (batch versus immediate), and the person to be notified in case of error.
    Service Programs and Configuration Tables:
    The outbound process, being asynchronous, is essentially a sequence of several processes that work together. SAP provides service programs and configuration tables to link these programs and provide customizing options for an outbound process.
    Process flow for Distributing Transactional Data:
    Transactional data is distributed using two techniques: with Message control and without message control.
    Process flow for Distributing Master Data:
    Master data between SAP systems is distributed using two techniques: Stand alone Programs and Change Pointers.
    Triggering the Outbound Process via Stand-Alone Programs:
    Stand-Alone programs are started explicitly by a user to transmit data from one SAP system to another. Standard Programs for several master data objects exist in SAP. Ex. The material master data can be transferred using the RBDSEMAT program or transaction BD10.
    The stand-alone programs provide a selection screen to specify the objects to be transferred and the receiving system. After the stand-alone program is executed, it calls the IDoc selection program with the specified parameters.
    Triggering the Outbound Process via Change Pointers:
    The change pointer technique is used to initiate the outbound process automatically when master data is created or changed.
    A standard program, RBDMIDOC, is scheduled to run on a periodic basis to evaluate the change pointers for a message type and start the ALE process for distributing the master data to the appropriate destination. The RBDMIDOC program reads the table TBDME to determine the IDoc selection program for a message type.
    Processing in the Application Layer:
    The customer distribution model is consulted to make sure that a receiver has been defined for the message to be transmitted. If not, processing ends. If at least one receiver exists, the IDoc selection program reads the master data object from the database and creates a master IDoc from it. The master IDoc is stored in memory. The program then calls the ALE service layer by using the function module MASTER_IDOC_DISTRIBUTE, passing the master IDoc and the receiver information.
    Processing in the ALE Interface Layer:
    Processing in the ALE Layer consists of the following steps:
    • Receiver Determination: The determination of the receiver is done through Customer Distribution Model.
    • IDoc Filtering: if an IDoc filter is specified in the distribution model for a receiver, values in the filter are compared against the values in the IDoc data records. If a data record does not meet the filter criteria, it is dropped.
    • Segment Filtering: For each sender and receiver combination, a set of segments that are not required can be filtered out.
    • Field conversion: Field values in data records are converted by using the conversion rules specified for the segment.
    • Version change for segments: Segments are version-controlled. A new version of a segment always contains fields from the preceding version and fields added for the new version. Release in IDoc type field of the partner profile to determine the version of the segment to be generated.
    • Version change for IDocs: IDocs are also version controlled. The version is determined from the Basic Type field of the partner profile.
    • Communication IDocs generated: The final IDoc generated for a receiver after all the conversions and filtering operations is the communication IDoc. One master IDoc can have multiple communication IDocs depending on the number of receivers identified and the filter operations performed. IDoc gets the status record with a status code of 01 (IDoc Created).
    • Syntax check performed: IDoc goes through a syntax check and data integrity validation. If errors found the IDoc get the status of 26 (error during syntax check of IDoc – Outbound). If no errors found the IDoc gets the status 30 (IDoc ready for dispatch – ALE Service).
    • IDoc dispatched to the communication Layer: In the ALE process, IDocs are dispatched using the asynchronous RFC method, which means that the sending system does not await for data to be received or processed on the destination system. After IDocs have been transferred to the communication layer, they get a status code 01 (Data Passed to Port OK).
    Processing in the Communication Layer:
    To dispatch an IDoc to a destination system, the system reads the port definition specified in the partner profile to determine the destination system, which is then used to read the RFC destination. The RFC destination contains communication settings to log o to the remote SAP system. The sending system calls the INBOUND_IDOC_PROCESS function module asynchronously on the destination system and passes the IDoc data via the memory buffers.
    Inbound Process in IDocs:
    An inbound process used IDoc structure, posting programs, filter objects, conversion rules, a partner profile, service programs, and configuration tables to post an application document from an IDoc.
    Posting Program:
    Posting programs, which are implemented as function modules, read data from an IDoc and create an application document from it. A posting program exists for each message. Each posting program is assigned a process code. A process code can point to a function module or a work flow. In the standard program process codes always point to a function module.
    Ex. The posting program for message type MATMAS is IDOC_INPUT_MATMAS which has a process code MATM.
    Workflow:
    A workflow represents a sequence of customized steps to be carried out for a process. The workflow management system is used to model the sequence, identify information required to carry out the steps and identify the person responsible for the dialog steps.
    Partner Profile;
    A partner profile specifies the components used in an inbound process (partner number, message type, and process code), the mode in which IDocs are processed (batch versus immediate), and the person to be notified in case of errors.
    Process flow for the Inbound process via a Function Module:
    In this process, IDocs are received from another system and passed to the posting function module directly.
    1. Processing in the communication Layer:
    The IDOC_INBOUND_ASYCHRONOUS program, triggered as a result of an RFC from the sending system, acts as the entry point for all inbound ALE processes. The IDoc to be processed is passed as an input parameter. Control is transferred to the ALE/EDI layer.
    2. Processing in the ALE/EDI Interface Layer:
    • Basic integrity check: A basic integrity check is performed on the control record.
    • Segment Filtering and conversion: Filtering out unwanted segments and carry out any required conversion of field values.
    • Creation of Application IDoc: The application IDoc is created and stored in the database and a syntax check is performed. If there are errors it gets status code of 60 (Error during Syntax check of IDoc – Inbound). At this point a tangible IDoc, which can be monitored via one of the monitoring transactions, is created and the IDoc gets status code 50 (IDoc Added).
    • IDoc Marked ready for Dispatch: IDoc gets the status code 64 (IDoc ready to be passed to application).
    • IDoc is passed to the posting program: The partner profile table is read. If the value of the Processing field is set to Process Immediately, the IDoc is passed to the posting program immediately using the program RBDAPP01.
    3. Processing in the Posting Module:
    The process code in the partner profile points to a posting module for the specific message in the IDoc. The posting program implemented as a function module either calls a standard SAP transaction by using the Call Transaction command for posting the document or invokes a direct input function module.
    The results of execution are passed back via the function module’s output parameters. If the posting is successful IDoc gets the status code 53 (Application Document Posted) or it gets status code 51 (Error: Application Document Not Posted).
    IDOC:
    Data Creation in Idoc
    IDocs are text encoded documents with a rigid structure that are used to exchange data between R/3 and a foreign system. Instead of calling a program in the destination system directly, the data is first packed into an IDoc and then sent to the receiving system, where it is analyzed and properly processed. Therefore an IDoc data exchange is always an
    asynchronous process. The significant difference between simple RFC-calls and IDoc data exchange is the fact, that every action performed on IDocs are protocolled by R/3 and IDocs can be reprocessed if an error occurred in one of the message steps.
    While IDocs have to be understood as a data exchange protocol, EDI and ALE are typical use cases for IDocs. R/3 uses IDocs for both EDI and ALE to deliver data to the receiving system. ALE is basically the scheduling mechanism that defines when and between which partners and what kind of data will be exchanged on a regular or event triggered basis. Such a set-up is called an ALE-scenario.
    IDoc is a intermediate document to exchange data between two SAP Systems.
    *IDocs are structured ASCII files (or a virtual equivalent).
    *Electronic Interchange Document
    *They are the file format used by SAP R/3 to exchange data with foreign systems.
    *Data Is transmitted in ASCII format, i.e. human readable form
    *IDocs exchange messages
    *IDocs are used like classical interface files
    IDOC types are templates for specific message types depending on what is the business document, you want to exchange.
    WE30 - you can create a IDOC type.
    An IDOC with data, will have to be triggered by the application that is trying to send out the data.
    FOr testing you can use WE19.
    How to create idoc?
    *WE30 - you can create a IDOC type
    For more information in details on the same along with the examples can be viewed on:
    [http://www.netweaverguru.com/EDI/HTML/IDocBook.htm#_Toc8400404]
    [http://help.sap.com/saphelp_erp2005/helpdata/en/0b/2a6620507d11d18ee90000e8366fc2/frameset.htm]
    [http://www.sappoint.com/presentation.html]
    [http://www.allsaplinks.com/idoc_search.html]
    [http://www.sapgenie.com/sapedi/idoc_abap.htm]
    [http://www.erpgenie.com/sapedi/idoc_abap.htm]
    To Create Idoc we need to follow these steps:
    Create Segment ( WE31)
    Create Idoc Type ( WE30 )
    Create Message Type ( WE81 )
    Assign Idoc Type to Message Type ( WE82 )
    Creating a Segment
    Go to transaction code WE31
    Enter the name for your segment type and click on the Create icon
    Type the short text
    Enter the variable names and data elements
    Save it and go back
    Go to Edit -> Set Release
    Follow steps to create more number of segments
    Create IDOC Type
    Go to transaction code WE30
    Enter the Object Name, select Basic type and click Create icon
    Select the create new option and enter a description for your basic IDOC type and press enter
    Select the IDOC Name and click Create icon
    The system prompts us to enter a segment type and its attributes
    Choose the appropriate values and press Enter
    The system transfers the name of the segment type to the IDOC editor.
    Follow these steps to add more number of segments to Parent or as Parent-child relation
    Save it and go back
    Go to Edit -> Set release
    Create Message Type
    Go to transaction code WE81
    Change the details from Display mode to Change mode
    After selection, the system will give this message “The table is cross-client (see Help for further info)”. Press Enter
    Click New Entries to create new Message Type
    Fill details
    Save it and go back
    Assign Message Type to IDoc Type
    Go to transaction code WE82
    Change the details from Display mode to Change mode
    After selection, the system will give this message “The table is cross-client (see Help for further info)”. Press Enter.
    Click New Entries to create new Message Type.
    Fill details
    Save it and go back
    Check these out..
    [Re: How to create IDOC;
    Check below link. It will give the step by step procedure for IDOC creation.
    [http://www.supinfo-projects.com/cn/2005/idocs_en/2/]
    ALE/ IDOC
    [http://help.sap.com/saphelp_erp2004/helpdata/en/dc/6b835943d711d1893e0000e8323c4f/content.htm]
    [http://www.sapgenie.com/sapgenie/docs/ale_scenario_development_procedure.doc]
    [http://edocs.bea.com/elink/adapter/r3/userhtm/ale.htm#1008419]
    [http://www.netweaverguru.com/EDI/HTML/IDocBook.htm]
    [http://www.sapgenie.com/sapedi/index.htm]
    [http://www.sappoint.com/abap/ale.pdf]
    [http://www.sappoint.com/abap/ale2.pdf]
    [http://www.sapgenie.com/sapedi/idoc_abap.htm]
    [http://help.sap.com/saphelp_erp2005/helpdata/en/0b/2a60bb507d11d18ee90000e8366fc2/frameset.htm]
    [http://help.sap.com/saphelp_erp2005/helpdata/en/78/217da751ce11d189570000e829fbbd/frameset.htm]
    [http://www.allsaplinks.com/idoc_sample.html]
    [http://www.sappoint.com/abap.html]
    [http://help.sap.com/saphelp_erp2004/helpdata/en/dc/6b835943d711d1893e0000e8323c4f/content.htm]
    [http://www.sapgenie.com/sapgenie/docs/ale_scenario_development_procedure.doc]
    [http://edocs.bea.com/elink/adapter/r3/userhtm/ale.htm#1008419]
    [http://www.netweaverguru.com/EDI/HTML/IDocBook.htm]
    [http://www.sapgenie.com/sapedi/index.htm]
    [http://www.allsaplinks.com/idoc_sample.html]
    [http://www.sapgenie.com/sapgenie/docs/ale_scenario_development_procedure.docs]
    go trough these links.
    [http://help.sap.com/saphelp_erp2004/helpdata/en/dc/6b835943d711d1893e0000e8323c4f/content.htm]
    [http://www.sapgenie.com/sapgenie/docs/ale_scenario_development_procedure.doc]
    [http://edocs.bea.com/elink/adapter/r3/userhtm/ale.htm#1008419]
    [http://www.netweaverguru.com/EDI/HTML/IDocBook.htm]
    [http://www.sapgenie.com/sapedi/index.htm]
    [http://www.sappoint.com/abap/ale.pdf]
    [http://www.sappoint.com/abap/ale2.pdf]
    [http://www.sapgenie.com/sapedi/idoc_abap.htm]
    [http://help.sap.com/saphelp_erp2005/helpdata/en/0b/2a60bb507d11d18ee90000e8366fc2/frameset.htm]
    [http://help.sap.com/saphelp_erp2005/helpdata/en/78/217da751ce11d189570000e829fbbd/frameset.htm]
    [http://www.allsaplinks.com/idoc_sample.html]
    [http://www.sappoint.com/abap.html]
    [http://help.sap.com/saphelp_erp2004/helpdata/en/dc/6b835943d711d1893e0000e8323c4f/content.htm]
    [http://www.sapgenie.com/sapgenie/docs/ale_scenario_development_procedure.doc]
    [http://edocs.bea.com/elink/adapter/r3/userhtm/ale.htm#1008419]
    [http://www.netweaverguru.com/EDI/HTML/IDocBook.htm]
    [http://www.sapgenie.com/sapedi/index.htm]
    [http://www.allsaplinks.com/idoc_sample.html]
    [http://http://help.sap.com/saphelp_erp2004/helpdata/en/dc/6b835943d711d1893e0000e8323c4f/content.htm]
    An IDoc is simply a data container that is used to exchange information between any two processes that can understand the syntax and semantics of the data...
    1.IDOCs are stored in the database. In the SAP system, IDOCs are stored in database tables.
    2.IDOCs are independent of the sending and receiving systems.
    3.IDOCs are independent of the direction of data exchange.
    The two available process for IDOCs are
    Outbound Process
    Inbound Process
    AND There are basically two types of IDOCs.
    Basic IDOCs
    Basic IDOC type defines the structure and format of the business document that is to be exchanged between two systems.
    Extended IDOCs
    Extending the functionality by adding more segments to existing Basic IDOCs.
    To Create Idoc we need to follow these steps:
    Create Segment ( WE31)
    Create Idoc Type ( WE30)
    Create Message Type ( WE81)
    Assign Idoc Type to Message Type ( WE82)
    imp links
    [http://www.allsaplinks.com/idoc_sample.html]
    [http://www.sapgenie.com/sapedi/idoc_abap.htm]
    [www.sappoint.com]
    --here u can find the ppts and basic seetings for ALE
    [http://sappoint.com/presentation.html]
    [www.sapgenie.com]
    [http://www.sapgenie.com/ale/index.htm]
    WE30 - you can create a IDOC type.
    An IDOC with data, will have to be triggered by the application that is trying to send out the data.
    Try this..Hope this will help.
    SAP ALE & IDOC<<<<
    Steps to configuration(Basis) >>
    1. Create Logical System (LS) for each applicable ALE-enabled client
    2. Link client to Logical System on the respective servers
    3. Create background user, to be used by ALE(with authorizaton for ALE postings)
    4. Create RFC Destinations(SM59)
    5. Ports in Idoc processing(WE21)
    6. Generate partner profiles for sending system
    The functional configuration(Tcode: SALE)
    • Create a Customer Distribution Model (CDM);
    • Add appropriate message types and filters to the CDM;
    • Generate outbound partner profiles;
    • Distribute the CDM to the receiving systems; and
    • Generate inbound partner profiles on each of the clients.
    Steps to customize a new IDoc >>>
    1. Define IDoc Segment (WE31)
    2. Convert Segments into an IDoc type (WE30)
    3. Create a Message Type (WE81)
    4. Create valid Combination of Message & IDoc type(WE82)
    5. Define Processing Code(WE41 for OUT / WE42 for IN)
    6. Define Partner Profile(WE20)
    RFC:
    RFC (Remote Function Call) is similar to the general SAP fun module: except that in the attributes you click the radio button: RFC enabled;
    and you will be passing an Import parameter DESTINATION to it.
    Other code and usage will be similar to any fun module;
    Have a look at any fun module in SE37 to understand better about the different components of Fun modules;
    Refer this link:
    [http://help.sap.com/saphelp_nw04/helpdata/en/22/042518488911d189490000e829fbbd/frameset.htm]
    check out the following link it might help you
    [http://help.sap.com/printdocu/core/Print46c/de/data/pdf/BCFESDE2/BCFESDE2.pdf]
    EDI:
    Electronic Data Interchange
    Cross-company exchange of electronic data (for example business documents) between domestic and international business partners who use a variety of hardware, software, and communication services. The data involved is formatted according to predefined standards. In addition to this, SAP ALE technology is available for data exchange within a company.
    Refer
    [http://www.erpgenie.com/sapedi/index.htm]
    [http://help.sap.com/saphelp_nw04/helpdata/en/72/c18ee5546a11d182cc0000e829fbfe/frameset.htm]
    [https://www.2020software.com/products/Fourth_Shift_Edition_for_SAP_Business_One_Electronic_Data_Interchange.asp]
    [http://downloads-zdnet.com.com/SoftwareandWebDevelopment/SoftwareDevelopmentTools/ElectronicData+Interchange/]
    [http://www.erpgenie.com/sapedi/index.htm]
    [http://www.kostal.com/english/downloads/EDI_AGB_eng.pdfd]
    EDI FLOW :
    Here is some thing which helps you and here the purchase order is taken as example too..
    Electronic Data Interchange, or EDI, is the electronic exchange of business data. Using a standard format, EDI provides a method of transmitting business data from one computer to another, without the need to re-key data. This electronic link can result in more effective business transactions. With EDI, paper documents such as invoices can be replaced with electronic transmissions, thus time is saved, and the potential for error is minimized. Data can be exchanged at any time. Related business expenses, such as postage, printing, phone calls, and handling, can also be significantly reduced. EDI can aid in the support of manufacturing efforts, such as Just-in-Time and Third Party Warehousing, and financial efforts, such as Electronic Payments.
    What parts of the business cycle can be supported by EDI?
    Any business documents that are currently exchanged using paper can be converted to an EDI. Standards. Standards include ANSI X12 and XML/EDI are primarily used in the United States, while EDIFACT is used in Europe and Asia.
    How does EDI get started?
    EDI gets started when one company contacts another expressing interest in trading business documents electronically using Electronic Data Interchange. The two companies must first determine each other's EDI capabilities. If you do not already know your EDI capabilities, we have prepared a questionnaire to help you determine them. If you are already EDI capable, we will coordinate with your technical staff to determine a testing plan. Upon completion of testing the EDI documents, the appropriate business personnel will set a production start date to begin the exchange of EDI business data. If you are not EDI capable, we recommend you first obtain a commitment from your upper management. Your company will need to allocate resources and capital for software, hardware, testing, possible programming, and training.
    What is the flow of EDI?
    The flow of EDI depends on the sophistication of your systems and your EDI software. If you have internal purchasing/order entry systems, you will need interface programs that can extract and insert data out of and into these systems. EDI programs that interface with your internal systems are preferred over software that requires re-keying of data. Embassy Software specializes in seemless interface between EDI and your back office systems. Using a purchase order as an example of a business document your customer would send that PO electronically (850) to you. It could be sent either through a VAN (Value Added Network) or through an FTP server. You would take that 850 and convert it either into and ODBC database, a flat file or XML document to be imported into your Order System with the use of EDI Software such as PassportXchange.. Using EDI communication software, which is part of the PassportXchange package you would pull down data at set intervals from the VAN or FTP. These documents are then processed through EDI translation software and output to our order entry system. Finally, an EDI document called a functional acknowledgment (997) is sent to your customer.
    check this.
    [http://www.netweaverguru.com/EDI/HTML/IDocBook.htm]
    [http://www.sapgenie.com/sapedi/idoc_abap.htm]
    [http://www.sapgenie.com/sapedi/index.htm]
    [http://help.sap.com/saphelp_nw04/helpdata/en/72/c18ee5546a11d182cc0000e829fbfe/frameset.htm]
    [https://www.2020software.com/products/Fourth_Shift_Edition_for_SAP_Business_One_Electronic_Data_Interchange.asp]
    [http://downloads-zdnet.com.com/SoftwareandWebDevelopment/SoftwareDevelopmentTools/ElectronicData+Interchange/]
    [http://www.erpgenie.com/sapedi/index.htm]
    [http://www.kostal.com/english/downloads/EDI_AGB_eng.pdfd]
    [ALE / IDOC / RFC / EDI]
    [SAP ABAP and EDI/ALE/IDOC]
    [Re: IDOC/BAPI/ALE/EDI]
    Regards,
    Dhruv Shah

Maybe you are looking for