Populating E1EDP05 segment of idoc type INCOIC01

Hi guys,
I have an issue for the AUTO LIV where the inbound idoc has this segment E1EDP05 which now has just one currency type being filled in which is causing an error while processing the idoc saying "<b>The IDOC does not contain all necessary currencies/valuations</b>". When we asked SAP they said us to <b>populate two new currency types in this segment E1EDP05 one for currency type 12 and other for currency type 31.</b>
Guys can any one help me do this from scratch. I dont know exactly how to populate.
Guys its a little urgent. <b><REMOVED BY MODERATOR></b>.
Message was edited by:
        Alvaro Tejada Galindo

Hi Sanjay,
Following links will help you
http://www.informatik.fh-wiesbaden.de/~werntges/lv/edi/specs_EN/SAPdoc/IDoc_d.htm
http://www.tech-archive.net/Archive/BizTalk/microsoft.public.biztalk.general/2005-02/0144.html
idoc
http://www.supinfo-projects.com/fr/2005/idocs_en/4/
Award points if useful...
thanks
Ravee

Similar Messages

  • How  can create SEGMENTS and IDOC TYPE in BADI in ECC 6.0 version

    Hi All,
                Can any one help, how  to create SEGMENTS and IDOC TYPE in BADI in ECC 6.0 version.This is my task.
    Given BADI name was----VENDOR_ADD_DATA_BI .
    Thanks

    Anil,
    look at this thread ..may be this helps you.
    Re: 824 IDOC and BADI/User Exit
    sateesh.

  • Adding new segment to IDoc type DELVRY03

    Hello everybody!
    I just got a request to add two new segments to an Idoc (type DELVRY03) under the segment E1EDL24. (E1EDL43 and E1EDL41).
    They told me to use the userexit EXIT_SAPLV55K_004 to add the new segments using the table IDOC_CONTROL since it is standard. But the problem is that the changes are not been saved.
    I realised that by the time that this exit is called the standard already stored the information on EDID4.
    I appreciate any help!
    Thanks in advance!

    Hi Kumar,
    If we change EDBAS table data and modify my idoc type by adding segment.
    after completing process have to move my object to production.
    Hope it ll through an error...   because it will check with table data also for validation.
    could you please justify your answer kumar?
    Thanks for your helpful information.
    Regards,
    BALAJI.

  • Populating  the segments of idocs

    Hi,
        How do segments of the idoc get populated with data from SAP tables ?  (for SAP standard idoc or newly created idoc and outbound process)
    Can anyone say in details?
    Good answer will be rewarded
    Thanks ,
    Manas Behera

    For any IDOC there is a specific standard function module assigned that is called to fill the IDOC segments.
    For orders it is e.g. IDOC_OUTPUT_ORDERS.
    This function takes care of the filling of the IDOC segments. You also usually have user exits available in those function modules that you can use to manipulate the IDOC data or fill/add custom segments/fields.
    The function modules usually start with IDOC_OUTPUT_* for outgoing IDOCS and IDOC_INPUT_* for incoming IDOCS.
    Hope that helps,
    Michael

  • Segments of an idoc type

    Hi,
    i need to know the table which can be used to identify all the segments an idoc types..
    Rgds,
    Harikrishna Indugu.

    Hi,
    Use transaction WE30 to see what are the segments involved in basic types and use WE60 to see what are the segments and fields are involved in particular basic type. You can use the transaction SE11  to see what are the fields are involved in the particular Segment.
    Thanks,
    Asit Purbey.

  • Create Idoc Type under ECC6

    Hi folks,
    I've created a new Idoc segment for an existing idoc (The original idoc doesn't have the fields I need).  I'm now trying to create a new Idoc type taking into consideration the new Idoc Extension I've created.  When I type my new idoc type and select 'basic type', I believe I should get prompted (somewhere) to enter the Basic Idoc type and Extension type, but when I create a new basic type, I don't get the option to add my new extension.  And If I copy the original basic type, I don't get my new segments.
    Can someone please tell me what I'm missing in the create new Idoc Process?
    Cheers,
    Steve

    Hi Stephen..
    According to ur Scenario (Adding  new Segments to a Basic type ) , you should not create  a Basic idoc type . Rather you should create an Extended idoc type in WE30.
    That will ask for the Basic type and the new segments can be added here.
    This is the Complete info:
    1.     
    IDOC Enhancement
    This is the Complete Steps and Info on this...with an Example...
    Enhancing ALE
    For example, if in an outbound interface you find that the IDOC type does not contain all the data you need to pass to the other system, you can extend the IDOC to accommodate the additional fields and enhance the ALE function modules to populate the fields. Similarly, if in an inbound interface, there is additional data that needs to be posted to the R/3 application, you can extend the IDOC type to have additional fields populated by the external system or translator or the other R/3 system and then enhance the inbound ALE function modules to post the additional data to the R/3 application.
    let us use the SAP Customer Master application as an example. Specifically, letâs focus on the IDOC extension and ALE function module enhancement of IDOC type DEBMAS02 and message type DEBMAS (Customer Master) and the IDOC reduction of message type MATMAS.
    IDOC EXTENSIONS
    Letâs first look at the concept of IDOC extension. SAP delivers Basic IDOC types such as DEBMAS02, MATMAS02, ORDERS02, and WMMBID01. By extending the Basic IDOC type, you are actually creating a new IDOC type. You create a new segment with the additional fields. This new segment has to be associated with one of the existing Basic IDOC segments. Then you create a new extension type, which is associated with the Basic IDOC type. This results in a new IDOC type. In order for ALE function modules to relate to this new IDOC type, the IDOC type is linked to the corresponding message type.
    Note that you should not add fields to existing segments but should create a new segment and associate it with an existing segment. This, in a nutshell, is the process of creating IDOC extensions.
    In our example, the Basic IDOC type DEBMAS02 is used to communicate Customer Master data to the SAP Customer Master application. Even though the application has a screen to enter and store a contact personâs business address (see Figure 1), DEBMAS02 does not have a segment or fields that communicate the contact personâs business address. If your business requires that this business address be communicated to the other system through the ALE interface for Customer Master, then you have to extend the DEBMAS02 IDOC type, and enhance the corresponding ALE function module.
    In DEBMAS02 the contact person fields are present in segment E1KNVKM and the business address of the contact person is stored on the SADR SAP table. You need to create a new segment, Z1SADRX, that is associated with E1KNVKM. This will be done in the process of creating an extension type ZDEBMASX. This extension type will then be associated with a new IDOC type, ZDEBMASZ. IDOC type ZDEBMASZ will be linked to message type DEBMAS for Customer Master. The final step in the IDOC extension process is to check the new objects. This check also verifies the structural integrity of the IDOC type. Letâs look at each of these steps in more detail.
    1. Create an Extension Type and a New Segment.
    Determine the fields on table SADR that you are going to provide for in the new segment Z1SADRX. You need fields for name, street, city, region, and country to give the business address of the contact person. You also need fields for the address number. ADRNR is a field in SAP tables such as SADR that uniquely identifies the address of an entity. This field is cross-referenced from other tables to the SADR table to obtain the full description of the address. Because this is an IDOC type for master data, the first field of the new segment will be MSGFN. The message function field informs the receiving system of the action to be taken for that particular segment. In the code that you write for populating the new segment, the value of the message function is the same as that of the parent segment E1KNVKM. In all, you will have 12 fields in segment Z1SADRX (see Table 1).
    To create an extension type and new segment:
    • Use transaction WE30 or from WEDI go to Development -> IDOC types.
    • Enter ZDEBMASX for Object Name.
    • Choose Extension Type.
    • Click on Create.
    • You will see a pop-up screen. Choose Create New, and enter a description. For version 4.x, enter DEBMAS02 in the Linked Basic Type field. Enter.
    • You will see a screen with ZDEBMASX and its description in the first line. Click on this line, and press Create. For version 4.x, expand the tree of segments, and place the cursor on E1KNVKM.
    • You will see a pop-up screen. Enter E1KNVKM as the reference segment. Enter.
    • For 4.x, press Create after placing the cursor on segment E1KNVKM.
    • You will see a line appear with E1KNVKM hierarchically below ZDEBMASX, with a description "Customer Master contact person (KNVK)."
    • Click on this line and press Create. You will receive a message indicating that the new segment being created will be a child segment of E1KNVKM. Enter. A pop-up box appears for the new segment.
    • Enter Z1SADRX as the segment type, 1 for Minimum, 1 for Maximum. Leave Mandatory segment unchecked. These entries imply that there is only one Z1SADRX segment for every occurrence of the E1KNVKM segment, and also that this segment is not mandatory. Note that if the parent segment is not mandatory, then the child segment should not be mandatory, because this could result in a syntax error during the creation or processing of the IDOC.
    • For 4.x, you must first create the IDOC segment Z1SADRX (Iâll explain why in a moment) from the menu path WEDI -> IDOC -> Development -> IDOC Segment.
    • Click on Segment Editor.
    • On the next screen, click on Create.
    • Enter a development class for the object. Enter.
    • This will take you to the screen for segment definition. Enter a description for the segment. Enter the field name, data element, and the data element documentation name. In most cases, all three fields may have the same values. If you are using a field in the segment that is not present in the ABAP/4 data dictionary, you must first create the domain, data element, field, and appropriate documentation before using it in the new segment.
    • Enter these three columns for all 12 fields. Save.
    • Click on Generate/Activate, F3 to step back.
    • From screen Maintain Segment, go to Segment Type -> Release. A checkbox now appears beside the segment definition Z1SADRX (see Figure 2). Check this box. Save.
    • Save again to store the descriptions of the segment, F3 to step back.
    • Save the extension type.
    It is possible to have several new segments with relevant Basic IDOC type parent segments in a single extension type. However, you can form only one IDOC type based on a single extension type.
    2. Create an IDOC Type.
    The next step is to create an IDOC type by associating the extension type that you created with the Basic IDOC type. This is a simple process:
    • From transaction WE30 or WEDI go to Development -> IDOC Types.
    • Enter ZDEBMASZ for Object Name.
    • Click on IDOC Type.
    • Click on Create.
    • Enter DEBMAS02 for Basic IDOC type.
    • Enter ZDEBMASX for extension type.
    • Enter a description.
    • Enter.
    • You will see a display of the composite IDOC type with all segments, including Z1SADRX (see Figure 3).
    It is possible to associate only one extension type with a Basic IDOC type for a given IDOC type. However, you can have multiple new segments in an extension type.
    3. Link IDOC Type to Message Type.
    The next step is to link the new IDOC type to its corresponding message type. This is important, because this relationship is referenced in the partner profile parameters where you specify the message type and IDOC type to be used for that particular representative system. To link the message type:
    • Use transaction WE82, or from WE30, go to Environment -> IDOC Type / Message Type, or from WEDI go to Development -> IDOC Type -> Environment Î IDOC Type / Message Type.
    • Click on Display <-> Change.
    • Click on New Entries.
    • Enter DEBMAS for message type.
    • Enter DEBMAS02 for Basic IDOC type.
    • Enter ZDEBMASX for extension type.
    • Enter your SAP R/3 release number for Release.
    • Save.
    This data is stored on the EDIMSG table and is accessed by several ALE processes to relate the message type to the IDOC type.
    4. Check the IDOC Type.
    Before checking the IDOC type for consistency, it is important to perform another step that releases the extension type to the IDOC type:
    • From WEDI go to Development -> IDOC Types -> Extras -> Release Type, or from transaction WE30 go to Extras -> Release Type.
    • For the Object Name ZDEBMASX and radio button Extension Type, click Yes.
    • The extension type has now been "released."
    You canât edit the extension type once itâs released. To cancel the release for further editing or deactivation, go to WE30 Î Extras Î Cancel release. The final step in the IDOC extension process is checking the validity of the IDOC type:
    • From transaction WE30 or WEDI go to Development -> IDOC types.
    • Enter ZDEBMASX for Object name.
    • Click on Extension Type.
    • From the Development Object menu select Check.
    • Repeat the operation for IDOC type ZDEBMASZ.
    • A check log will be generated for each run with details of correctness or errors (see Figure 4).
    In some situations it is possible to receive errors during the check process, especially segment length errors. The incorrect IDOC segment can be repaired and corrected by executing program RSEREPSG. This program checks the formal consistency and repairs incorrect segments. In test mode it will generate a log of formal correctness for the specified segment only. For the program to repair segments in normal mode, the underlying IDOC structures (DDIC structures) must be active. This program rectifies the lengths of the DDIC structures and not the fields themselves. RSEREPSG can also be used to change the person responsible for the object and the release flag.
    Menu paths may vary slightly depending on the release/version of SAP R/3, but the procedures and the principles are the same.
    ALE FUNCTION MODULE ENHANCEMENTS
    Having extended the IDOC type to contain additional fields for an inbound or outbound application, you now want to enhance ALE function modules for populating the additional segment on the outbound or applying the additional segment data on the inbound application.
    The core working code for ALE processes for a given application area is always encapsulated in ABAP/4 function modules. These function modules are associated with such control information as message types and process codes. So the ALE process checks this control information and derives the name of the function module to invoke for that particular IDOC processing from certain database tables. These function modules contain objects known as customer functions, which can be considered SAP Enhanced user exits. A function module is called at a particular point during the processing of the main program or function module, and it can be used to influence data processing at that point by adding code to the customer function. The customer function behaves like a normal function module and has import and export parameters, tables (internal tables) statement, and exception processing. Unlike a conventional user exit, customer functions give you the ability to modify only data available to you by the function moduleâs parameters and internal tables. While most ALE/EDI function modules are supported by customer functions, there are ALE/EDI processes that still use conventional user exits. There are a few ways to determine which function module to enhance for a given message type/process code:
    • For master data distribution, from SALE go to Extensions -> Master data distribution -> Setup additional data for message types. Search for message type DEBMAS in this example. You see an entry for DEBMAS associated with function module MASTERIDOC_CREATE_SMD_DEBMAS. This data is stored on table TBDME. The function module names for all master data message types follow this pattern: MASTERIDOC_CREATE_SMD_messagetype. This function module calls another function module of name MASTERIDOC_CREATE_DEBMAS or MASTERIDOC_CREATE_messagetype. Search for the words customer function, and you find several hits that can be used to add code to the function module.
    • From WEDI got to Control -> Inbound process codes -> Inbound with ALE service -> Processing by function module (transaction WE42), or from WEDI go to Control -> Outbound process codes -> Outbound with ALE service -> With function module (transaction WE41). There will be function modules associated with the process codes. For inbound, the function modules usually follow this pattern: IDOC_INPUT_messagetype: for example, IDOC_INPUT_CHRMAS for inbound characteristics master.
    • Use transaction WE57 or from WEDI go to Development -> Message/Application Object. The entries list the function module, Business Object, message type, and IDOC type that are used for inbound ALE/EDI interfaces.
    Customer functions are not specific only to ALE and EDI but also to all programs/modules in SAP R/3. Customer function is a SAP enhancement component; the other two types are menu and screen enhancements.
    All customer function exits are maintained in SAP enhancements and are found by using transaction SMOD. After executing transaction SMOD, pull down (F4) on the enhancement name field, and execute again. This provides you with a list of all SAP enhancements available. SAP enhancements are grouped by development class pertaining to an application area. Choose Application development R/3 SD master data distribution for development class VSV to lead to a screen that lists VSV00001 as an enhancement (see Figure 5). Press Component +/- to display its function exit components. There are four possible components listed, all of which are function exits (and are function modules) that are called from the ALE function modules in the form Call Customer Function Î001â. This is a special occurrence of the ABAP statement Call. Go to item Exit_SAPLVV01_ 001, which you need to enhance for the Customer Master outbound example of an IDOC extension. In the ALE-function module MASTERIDOC_CREATE_DEBMAS, the statement CALL Customer Function 001 is translated in the background to call component EXIT_SAPLVV01_001. Although this function exit can be edited using transaction SE37, you will use a simpler approach.
    When you use SAP enhancements and their components, you manage them with an SAP object known as a project, which is like an envelope containing the selected enhancements and their components. A project can be used to control the execution of components and to transport them to other clients and instances in SAP. Basically, the process involves creating a project, including enhancements and components that are to be enhanced, editing the components, and then activating the project. The following process creates a project for our example Customer Master IDOC extension:
    • Execute transaction CMOD.
    • Enter name of project, say CSTMAST1.
    • Click on Create.
    • Enter a description of the project.
    • Save.
    • Click on SAP Enhancements.
    • Enter VSV00001 for Enhancement.
    • Save.
    Once youâve created the project, edit the function exit components and activate the project. Remember that the code in the function exit enhancement will execute only if the project is activated. In fact, this is a convenient SAP enhancements feature, whereby the work in progress (developing code in the customer function) will not affect users of that application. When the code is completed, the project can be activated so the enhanced functionality takes effect. It can also be deactivated for maintenance.
    As mentioned earlier, customer functions (function exits) are embedded in ALE function modules and can be used to influence the creation and modification of IDOC data on an outbound application or to post additional or modified IDOC data to an inbound R/3 application. Function exits are similar to regular function modules, with import/export parameters, tables (internal tables), and exceptions.
    The two important factors to consider while developing the customer function are:
    1. The point in the ALE function module where the function exit occurs
    2. The data made available by the customer function that can be modified or posted to the R/3 application, based on the direction.
    Because some function modules have several customer functions, it is critical to choose the function exit best suited for that particular enhancement. Do not attempt to perform activities that the function exit is not designed for. The importance of this point is illustrated by the following description of enhancing function modules for outbound and inbound ALE interfaces.
    Outbound interfaces. In an outbound ALE interface you use function exits (customer functions) to populate additional segments created by an IDOC extension or to modify the existing IDOC data segments as per business requirements. Previously, you identified that enhancement VSV00001 has a component EXIT_SAPLVV01_001 (function exit), which can be used for populating the additional data segment Z1SADRX that you created in the IDOC extension ZDEBMASX (IDOC type ZDEBMASZ, based on Basic IDOC type DEBMAS02). You also learned that the ALE function module that calls this function exit is MASTERIDOC_CREATE_DEBMAS, which has a statement Call Customer Function 001.
    Browse the function module MASTERIDOC_CREATE_DEBMAS using transaction SE37. You will find that this customer function is invoked for every segment of IDOC type DEBMAS02. In fact, the function exit is called soon after the creation of an existing segment has been populated with data and appended to the IDOC data table (internal table). Also, the function exit is exporting the message type, IDOC type, and the segment name and is importing the IDOC extension type. It is also passing the IDOC data internal table. This indicates that the ALE function module is allowing you to populate additional segments for every existing segment and modify the existing segmentâs data.
    Letâs write ABAP/4 code to accomplish the task of populating IDOC segment Z1SADRX with a contact personâs business address:
    • From SE37, display function module MASTERIDOC_CREATE_ DEBMAS.
    • Find Customer Function 001.
    • Double-click on 001.
    • The function EXIT_SAPLVV01_001 will be displayed.
    • Double-click on INCLUDE ZXVSVU01.
    • You will be asked to create a new include object. Proceed as desired.
    • Enter code (as in Listing 1).
    • Be sure to perform a main program check (Function Module -> Check -> main program) and extended program check (Function module -> Check -> Extended check).
    Now that you have extended the IDOC and enhanced the ALE function module based on the requirements for the contact personâs business address on the Customer Master, letâs test the interface. You should create a logical system and define a port for this interface. You should also configure the Customer Distribution Model to indicate that message type DEBMAS is being distributed to this logical system. The only difference in configuration between a regular outbound ALE interface and an enhanced one is the partner profile definition. While maintaining the outbound parameters of the partner profile, make sure the IDOC type is ZDEBMASZ. The fields for Basic IDOC type and extension type are automatically populated with DEBMAS02 and ZDEBMASX, respectively.
    To maintain the contact personâs business address of a customer:
    • Use transaction BD12 or from BALE go to Master Data ->Customer -> Send and send that Customer Master record by executing the transaction after filling in the relevant fields such as customer number, message type, and logical system.
    • Use transaction WE02 or WE05 to verify the IDOC created. You should see the new segment Z1SADRX populated with the correct data.
    Reward if Helpful.

  • ORDERS05 Idoc Type Extension

    Hello,
    I am extending the segment E2EDKA3 in ORDERS05. Please let me know any user exit or any other way to populate the values in the extended segments.
    I am adding these fields: VBPA-KUNNR,VBPA-ADRNR,VBPA-XCPDK & VBPA-ADRNP                         .
    Thanks in advance,
    Suresh

    Hi Suresh,
    Go through this info ucan able to do.
    Enhancement of IDoc Type
    Usually enhancement takes place when the content in IDocs provided by SAP are not sufficient for the business process. IDoc extension can take place whenever dictionary table has a new structure appended required by the business process. 
    In brief IDoc extension takes place when extra fields are required for the business process.
    Let us take a scenario and understand the process of IDoc extension.
    In this scenario say visitor is different from the actual customer who has came to the sales office in behalf of the customer to obtain the quotation or inquiry etc. Or an authorized agent qualified by the actual customer to order for items. So a field by name NAMEVI (Visitor) is added to Customer master data. As there is no provision given by SAP to handle this, we need to extend an IDoc. 
    The standard message type and IDoc type provided by SAP are DEBMAS and DEBMAS05. 
    Consider the data in the table below for extending the IDoc. These details can be understood in different sections in the process of extending it. 
    Basic IDoc type      DEBMAS05
    Version      4.7
    IDoc extension      DEBMASEXT
    Custom segment      Z1KNA1
    Fields in Custom Segment      Visitor
    Parent of Custom Segment      E1KNA11
    Outbound process
    Step1. Customize kna1 table by appending a structure provided by SAP (ZAKNA1) 
    Component                Component Type
    VISITOR                     NAMEVI
    Step2: Write a module pool program to update some existing customers to add data  for Visitor. 
    Step3: Create a custom segment
    Transaction Code: WE31
    Segment type: Z1KNA11   Click  (create). Provide short text 
    Field Name                Data element
    VISITOR                NAMEVI
    Save 
    Step4: Create IDoc extension
    Transaction      WE30
    Object Name      DEBMASEXT
    Choose Extension
    Click   and it leads to next screen.
    Linked basic type: DEBMAS05
    Provide description and enter
    Observe all the segments to be copied into your IDoc extension from linked basic
    type.
    Select E1KNA11 and click  (create segment) to obtain a popup window
    Provide the required values and observe child segment Z1KNA11 to be added to
    parent segment E1KNA11. 
    Step5: Release segment and IDoc extension
    Transaction: WE31
    Segment type: Z1KNA11
    Path: Edit à Set release
    Step6: Assign Basic type to extension / messages
    Transaction: WE82
    Click  , then 
    Select DEBMAS message type against DEBMAS06 basic type
    Click   provide the information
    Message Type      Basic Type      Extension      Version
    DEBMAS      DEBMAS06      DEBMASEXT           4.7
    Delete the earlier one from which it was copied.
    Save. 
    Observe the result as follows
    Step 7: Check and Transport IDoc extension
    Transaction: WE30
    Object name: DEBMASEXT
    Path: Development object à Check
    Ensure that there are no errors or warnings
    Now transport
    Path: Development à Transport 
    Step8: Find suitable user exit for writing code to support IDoc extension
    Transaction: SE84.
    Click Enhancements
    In short text provide customer
    Find suitable enhancement to be VSV00001 
                             Alternative way
    Transaction: SMOD
    Click F4 help for Enhancement
    Path: F4help à SAP Applications à Logistics general à Logistics Basic Data à
    Business partners à Vendor Master.
    Find the enhancement as VSV00002, which is an approximate user exit.
    Now search for different extensions like VSV00001. Then see for its components.
    Identify the appropriate user exit to be ‘EXIT_SAPLVV01_001’ (Create Export of
    Additional Customer Master Segments). This user exit can be used in outbound ALE
    process, meant for filling the data into custom segments. 
    You have to identify here another user exit as ‘EXIT_SAPLVV02_001’, which is
    helpful for inbound ALE process. This user exit can be used to read the segments
    and post it to Application repository. 
    Step9: Develop a project to encapsulate enhancements and components.
    Transaction: CMOD.
    Enhancement: custex and click Create to provide attributes.
    Click Enhancement Assignments.
    Provide VSV00001, short text and save.
    From the initial screen of the transaction, select components and click change.
    Find 4 components to be added.
    Activate them.
    Select user exit EXIT_SAPLVV01_001 for outbound process and double click it. It leads to function builder.
    Double click on provided include program ZXVSVU01 and press enter.
    Now, write supporting code for IDoc extension, i.e., populating custom segments in IDoc.
    Check the code and activate.  
    Code in ZXVSVU01
    *& Include           ZXVSVU01                                         *
    *In this scenario, the E1KNA11 has been extended to accommodate
    *User-defined fields in the customer table kna1. The name of the
    *extended
    *segment is z1kna11. There is one custom field: visitor
    *Data declarations
    DATA: kna1m like e1kna1m,
          kna11 like e1kna11,
          z1kna11 like z1kna11,
          w_kna1 like kna1. 
    make sure you are processing correct message type
    check message_type eq 'DEBMAS'.
    make sure data is added after the correct segment
    check segment_name eq 'E1KNA1M'.
    since customer number is not passed in this user exit, you need to go
    through the data records to find the customer number
    loop at idoc_data.
      case idoc_data-segnam.
         when 'E1KNA1M'.
           move idoc_data-sdata to kna1m.
         when 'E1KNA11'.
           move idoc_data-sdata to kna11.
      endcase.                             " case idoc_data-segname.
    endloop.                               " loop at idoc_data. 
    select data from the user-defined fields in kna11.
    select single *
      from kna1                            " Customer master table
      into w_kna1
    where kunnr = kna1m-kunnr.
    if sy-subrc eq 0.
    set the idoc extension name for control record
      idoc_cimtype = 'DEBMASEX'.
    clear custom fields from kna1 to extended segment
      clear z1kna11.
    copy custom fields from kna1 to extended segment 
    move-corresponding w_kna1 to z1kna11. " field name must be same
    condense all fields of extended segment
      condense: z1kna11-visitor.
    populate segment name in the data record, copy data contents into it 
    and append the data record to existing data records in
      move 'Z1KNA11' TO IDOC_data-segnam.    " administrative section
      move z1kna11 to idoc_data-sdata.       " data section 
      append idoc_data.
    endif.                                 " if sy-subrc eq 0.
    Step 10: 
    Define Logical System
    Assign client to Logical System
    Maintain RFC Destination
    Maintain Customer Distribution Model
    Generate Partner Profiles
    Distribute Customer Distribution Model
    INBOUND PROCESS
    Step 11: Append the custom structure to the table KNA1 similar to the process done
            in outbound process.
    Step 12.
    Define Logical System
    Assign client to Logical System
    Generate Partner Profiles
    Step 13. Execute the transaction to ‘Send Customers’ from Outbound system.
    Step 14. Now in the Inbound system, create the project in the similar way as done at
            outbound side.
    In the user exit EXIT_SAPLVV02_001, find include ‘ZXVSVU02’. Write the code to
    support IDoc extension.
    Code in ZXVSVU02
    *&  Include           ZXVSVU02                                         *
    data: kna1m like e1kna1m,
          kna11 like e1kna11,
          z1kna11 like z1kna11.
    data fs_kna1 type kna1.
    message i000(0) with 'INBOUND PROCESS CALLED'.
    LOOP AT IDOC_data.
      case idoc_data-segnam.
        when 'E1KNA1M'.
          kna1m = idoc_data-sdata.
        when 'E1KNA11'.
          kna11 = idoc_data-sdata.
        when 'Z1KNA11'.
          z1kna11 = idoc_data-sdata.
          select single *
            from kna1
            into fs_kna1
           where kunnr = kna1m-kunnr.
          if sy-subrc eq 0.
            update kna1
               set visitor = z1kna11-visitor
             where kunnr = kna1m-kunnr.
          else.
            idoc_status-docnum = idoc_control-docnum.
            idoc_status-status = '51'.
            idoc_status-msgty = 'E'.
            idoc_status-msgid = 'ZE'.
            idoc_status-msgno = '005'.
            idoc_status-msgv1 = kna1m-kunnr.
         append idoc_status.
          endif.                           " if sy-subrc eq 0.
      endcase.                             " case idoc_data-segnam.
    endloop.                               " LOOP AT IDOC_data.
    Step 15. Assign FM to extension/Message type
    Transaction:      WE57
    Path: Change à New Entries
    Select ‘IDOC_INPUT_DEBITOR’ against DEBMAS06 basic type, to fill extra
    information as shown below.
    Function Module          Basic Type     Message Type          Extension
    IDOC_INPUT_DEBITOR     DEBMAS06     DEBMAS          DEBMASEXT
    Step 16. Execute the transaction to ‘Get Customers’.
    And observe that records with extra data are saved in database.
    Rewards some points.
    Rgds,
    P.Nag

  • Idocs, idoc types, tables

    can  anybody  tell me   what  type  of  idoc  types  are  typically  used  in  a regular  order to cash  cycle  in sd .
    and   are there   tables  related  to it?
      what is the tcode  to see  them
    n.bhardwaj
    my  id  is
    [email protected]

    Dear Neha,
    Idoc Types:
    ORDERS01     Purchasing/Sales
    ORDERS02     Purchasing/Sales
    ORDERS03     Purchasing/Sales
    ORDERS04     Purchasing/Sales
    ORDERS05     Purchasing/Sales
    INVCON01     Stock change data for inventory controlling
    INVCON02     Stock Change Data for Inventory Controlling
    INVOIC01     Invoice/Billing document
    INVOIC02     Invoice/Billing document
    INV_ID01     Invoice
    DELFOR01     Delivery schedule/JIT schedule
    DELFOR02     Delivery Schedule/JIT Schedule
    DELIVERYPROCESSING_EXECUTE01     Delivery processing
    DELVRY01     Delivery interface
    DELVRY02     Delivery interface with dangerous goods data
    DELVRY03     Delivery interface
    DELVRY04     Delivery interface
    You can view Idoc types in transaction WE30.
    WE02/WE05 for displaying IDOCs.
    WE19 for testing IDOCs.
    ALE and IDOC:
    ALE stands for Application Link Enabling and is used for distribution of data. IDOC is an Intermediate Document. It carries the application data from one server to another server.It uses the RFC(Remote Function call) .
    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.
    It is the the combination of Segements.
    Segment : All the required fields will get assigned in relavant segement.Like that we will have lot of segments.We will assign all the segments to IDOC type.In the required level(Parent & child level .Like tree nodes).
    Idocs Type is a Structure by lot of segments.
    IDOC is generared at the time of run time .
    It will have the data.
    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.
    http://www.allsaplinks.com/idoc_sample.html
    http://www.allsaplinks.com/
    http://www.sap-img.com/
    http://www.sappoint.com/abap.html
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCMIDALEIO/BCMIDALEIO.pdf
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCMIDALEPRO/BCMIDALEPRO.pdf
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/CABFAALEQS/CABFAALEQS.pdf
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCSRVEDISC/CAEDISCAP_STC.pdf
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCSRVEDI/CAEDI.pdf
    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://expertanswercenter.techtarget.com/eac/knowledgebaseCategory/0,295197,sid63_tax296858_idx0_off50,00.html
    http://sap.ittoolbox.com/documents/popular-q-and-a/extending-a-basic-idoc-type-2358
    http://help.sap.com/saphelp_47x200/helpdata/en/dc/6b7eee43d711d1893e0000e8323c4f/frameset.htm
    Need info on automatic determination of tax code at PO
    Hope this will help.
    Regards,
    Naveen.

  • Hi gurus what is basic IDOC type

    hi gurus what is basic IDOC type

    Basic Type:
    Basic IDoc type defines the structure and format of the business document that is to be exchanged between two systems.
    Segments:
    Segments form the basic building blocks of an IDoc type and are used to store the actual datta. A segment type is the name of a segment and is independent of the SAP elease. A segment definition is the release-specific name of a segment.
    Steps in creating Segments:
    T.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 and Go back.
    Go to Edit -> Set Release.
    Repeat the steps to create more segments.
    IDOC TYPE:
    Business data is exchanged with an external system using the IDoc Interface.
    IDoc types (Special Structures) An IDoc type is defined through its permitted segments. Segments can be dependent on each other (parent and child segments). The IDoc interface can check for each IDoc whether thhe segments contained are compatible with thhe definitiion of its type. This systax check is activated or deactivated in the Partner Profiles.
    Steps in creating IDoc Type:
    T.Code WE30 to create IDoc Type.
    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.
    Message Type:
    Steps in Creating Message Type:
    T.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:
    T.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.
    Reward Points if useful.

  • Tables or fm to fetch the data for idoc type WMMBID01

    hi
    i have to create function module in whish i have to fill segments of  idoc type
    WMMBID01.
    is there any fm which can fetch the data for the required fields of segment based on the document no.
    or which tables i can use to fetch the required data for goods issued ie transaction migo.
    regards
    vijay

    HI
    GOOD
    TRY WITH THESE FM
    DYNP_VALUES_READ Read the values from a dynpro. This function can be used to read the values from a report's selection screen too (Another example).
    HELP_START Display help for a field. Useful for doing AT SELECTION SCREEN ON VALUE REQUEST for those fields that do not provide F4 help at the DDIC level.
    RPY_DYNPRO_READ Read dynpro, including screen flow
    RPY_TRANSACTION_READ Given a transaction, return the program and screen or given a program and screen, return the transactions that use the program and screen.
    THANKS
    MRUTYUN

  • Message type is not populating in the Inbound idoc control record

    Hi,
    I have created an Inbound Idoc function module and have done the necessary Idoc settings. But, while testing in WE19, I observed that control record is not getting populated with message type and it is dumping.
    The settings which I have done in WEDI as follows:
    1. Created Idoc segments with necessary fields and released
    2. Created Idoc type for the segment type
    3. Created message type
    4. Assigned message type to basic type
    5. In the inbound processing settings,
       filled the ALE attributes with the Idoc function module name and input value '0'
    6. Assigned FM to basic type and message type
    7. Created process code and assigned the process code to message type
    Please let me know, the reason for the message type not populating in the control record. Useful answers will be surely rewarded.
    Best Regards,
    Mallika

    Hi,     
    Maintain partner profile (Transaction code WE20) for the message type you defined in WE81 and put your process code in partner profile and check your logical system settings also in transaction SALE.
    Thanks
    Rahul

  • Custom segments to basic IDOC type without extension

    Hi,
    Is it possible that an IDOC has custom segments which are getting populated and the basic type does not have any custom segments.
    How should we find from where the custom segments are getting populated and displayed?
    Regards,
    Subhashini

    Hello,
              Lets say in DELVRY05 Idoc Type, we have a Segment Called E1EDL20 and since this is a Standard SAP Provided Basic Type, it will not have any Custom Segments ( Z-Segments). Now, If I want some additional Information to be populated as part of a Custom Segment, what I would do is to Create an IDoc Extension ZDELVRY05 with reference to the Basic Type DELVRY05 and Create a Custom Segment Z1EDL20 (Per Say) in which I'll populate the Custom Data Fields using an Exit. So, unless we create an IDoc Extension for a Basic Type, the Standard SAP Basic Type will not have any Custom Segments-Fields (Z-Segments).
    Thanks,
    Venkata Phani Prasad K

  • Multiple E1EDP05 segment needs to be populated

    Hi,
    I have a requirement for inbound  ORDERS type of IDOC. My requirement is for mutiple E1EDP05 segment  how to populate in the internal table.Below is my current code...
         LOOP AT  dedidd.               
           CLEAR : lw_e1edk01,
                   lw_e1edka1,
                   lw_e1edp01,
                   lw_e1edp05,
                   lw_e1edp19.
           CASE dedidd-segnam.
             WHEN 'E1EDK01'.
               lw_e1edk01 = dedidd-sdata.
               lf_curcy = lw_e1edk01-curcy.
               MOVE lf_curcy TO lw_e1edp05_data-koein.
             WHEN 'E1EDKA1'.
               lw_e1edka1 = dedidd-sdata.
               IF lw_e1edka1-parvw = 'AG'.
                 lf_partn = lw_e1edka1-partn.
               ENDIF.
             WHEN 'E1EDP01'.
               CLEAR lf_e1edp05.
               lw_e1edp01 = dedidd-sdata.
               MOVE lw_e1edp01-posex TO lw_e1edp05_data-posex.
             loop at dedidd where segnam = 'E1EDP05'.
             WHEN 'E1EDP05'.
               lf_e1edp05 = 'X'.
               lw_e1edp05 = dedidd-sdata.
               MOVE lw_e1edp05-kotxt TO lw_e1edp05_data-kotxt.
               if lw_e1edp05-kotxt is initial.
                 lw_e1edp05_data-kschl = 'ZAV1'.
               else.
                 lw_e1edp05_data-kschl = 'ZAV2'.
               endif.
               MOVE lw_e1edp05-menge TO lw_e1edp05_data-menge.
               MOVE lw_e1edp05-kobtr TO lw_e1edp05_data-kobtr.
             endloop.
             WHEN 'E1EDP19'.
               lw_e1edp19 = dedidd-sdata.
               IF lw_e1edp19-qualf = '002'.
                 MOVE lw_e1edp19-idtnr TO lw_e1edp05_data-matnr.
                 IF lf_e1edp05 = 'X'.
    * Select data from A503 table to condition type ZAV1
                   SELECT SINGLE knumh FROM a807 INTO  lf_knumh
                      WHERE kappl = 'V'
                      AND   kschl = 'ZAV1'
                      AND zzfunloc_htp = lf_partn
                      AND matnr = lw_e1edp19-idtnr
                      AND varcond = lw_e1edp05_data-kotxt
                      AND waerk = lf_curcy
                      AND datbi GE sy-datum
                      AND datab LE sy-datum.
                   IF sy-subrc = 0.
                     MOVE lf_knumh TO lw_e1edp05_data-knumh.
                     APPEND lw_e1edp05_data TO lt_e1edp05_data.
                   ELSE.
    * Select data from A505 table to condition type ZAV2
                     SELECT SINGLE knumh FROM a805 INTO lf_knumh
                           WHERE kappl = 'V'
                           AND   kschl = 'ZAV2'
                           AND zzfunloc_htp = lf_partn
                           AND matnr = lw_e1edp19-idtnr
                           AND waerk = lf_curcy
                           AND datbi GE sy-datum
                           AND datab LE sy-datum.
                     IF sy-subrc = 0.
                       MOVE lf_knumh TO lw_e1edp05_data-knumh.
                       APPEND lw_e1edp05_data TO lt_e1edp05_data.
                     ENDIF.
                   ENDIF.
                 ENDIF.
               ENDIF.
           ENDCASE.
         ENDLOOP.

    Solved by removing the extra loop & inserting the values into an internal table

  • Flat File IDOC - ECC, segment defn x in IDoc type y CIM type do not exist

    Hi,
    I'm working on idoc flat file > sap scenario.  Everything seems to be working up until the point where I get an error message:
    EDISDEF: Port EDIPORT segment defn E2FINBU000 in IDoc type FIDCCP01 CIM type  do not exist
    I've loaded the meta data, and the file structure is fine.  I believe the issue is related to PI not having the idoc I'm interested in listed in WE30.  How do I reference the standard IDOC type FIDCCP01?  Ideas I've had are around SWCV or transport from another system, the first I'm not sure which SWCV, the later seems a bit of a bodge and I dont like the idea.
    Thanks
    James.

    Hmm.. some light for the situation.  Seems that the segments imported are:
    E1FINBU     E2FINBU     31I
    E1FINBU     E2FINBU001     40A
    E1FINBU     E2FINBU002     40B
    E1FINBU     E2FINBU003     45A
    E1FINBU     E2FINBU004     45B
    E1FINBU     E2FINBU005     46A
    E1FINBU     E2FINBU006     46C
    Which indeed does not have E2FINBU000, which the IDOC is most definitely trying to pass.  I can only guess that the middleware producting this IDOC is flawed, and that standard SAP ALE will accept this as E2FINBU (It works into another SAP system without XI).
    Guess I've answered my own question, but feel free to offer light for points
    Thanks,
    James.

  • Port &1 segment defn &2 in IDoc type &3 CIM type &4 do not exist

    Hello,
    I've a question. We would send an standard IDOC from the 4.6C System to our SAP Xi 3.0. I customized the XI with TA IDX1 and IDX2. If we trigger the IDOC to XI I get the follow error message back:
    Port SAPQ73 segment defn E2EDL20002 in IDoc type DELVRY03 CIM type &4 do not exist.
    The IDOC Vers. is 4.6. In another system with IDOC Vers. 6.20 isn't a problem. So I think its a problem of the IDOC Version, or? So I checked the forum about this topic but I didn't find anything. So, I hope you can help me. Kind Regards Stephan

    Hello,
    I have exactly the same issue... We're currently upgrading our SAP system 4.7 to ECC6.0. We're also upgraded the system to an unicode system.
    Before those change, the interface between SAP and Xi worked well. Since the upgrade, those idocs don't pass any more and get the same error message than Stephan.
    I've checked the authorization of the RFC user and he has SAP_ALL and SAP_NEW. Partner profile, RFC connection, port and distribution model didn't changed.
    Do someone have an idea why this can appear ?
    Thanks in advance.

Maybe you are looking for