To allow to edit existing iDoc segments or to add new segments.

In order to re-process iDoc's there is necessary forst to manipulate the record. A custom transaction(WE19) is required to allow to edit existing iDoc segments or to add new segments without creatinga new idoc.
any clue..
Regrads,
Ramya

hi ramya,
    In the test tool WE19 v can able to see the
copy and existing idoc.
create an idoc based on an idoc type.
create an idoc based on a message type.
but mostly v use the first option. Like modify the existing idoc to suit our requirement
Regards....
Arun.
Reward points if useful.

Similar Messages

  • How to edit inbound idoc with data errors in multiple segments and reproces

    Hi friends,
    i have a requirement for error handling of inbound sales order(ORDERS04) without using WORKFLOW and WE19.
    i have seen some function modules like edic_* ..
    but my doubt is how to edit the error data(how can i identify the particular error fileds in the segments)and how to reprocess the same idoc.
    Please help me...
    Thanks in advance

    Hi Narasimh,
    Please find the following steps to edit IDOC segment after you find the error using WE02.
    The example codes can be found in website 
    http://www.sapgenie.com/sapedi/idoc_abap.htm
    STEP 1 - Open document to edit
    CALL FUNCTION 'EDI_DOCUMENT_OPEN_FOR_EDIT'
           EXPORTING
                document_number               = t_docnum
           IMPORTING
                idoc_control                  = itab_edidc
           TABLES
                idoc_data                     = itab_edidd
           EXCEPTIONS
                document_foreign_lock         = 1
                document_not_exist            = 2
                document_not_open             = 3
                status_is_unable_for_changing = 4
                OTHERS                        = 5.
    STEP 2 - Loop at itab_edidd and change data
    LOOP AT itab_edidd WHERE segnam = 'E1EDKA1'.
      e1edka1 = itab_edidd-sdata.
      IF e1edka1-parvw = 'LF'.
        e1edka1-partn = t_eikto.
        itab_edidd-sdata = e1edka1.
        MODIFY itab_edidd.
        EXIT.
      ENDIF.
    ENDLOOP.
    STEP 3 - Change data segments
    CALL FUNCTION 'EDI_CHANGE_DATA_SEGMENTS'
               TABLES
                    idoc_changed_data_range = itab_edidd
               EXCEPTIONS
                    idoc_not_open           = 1
                    data_record_not_exist   = 2
                     OTHERS                  = 3.
    STEP 3a - Change control record
    CALL FUNCTION 'EDI_CHANGE_CONTROL_RECORD'
           EXPORTING
                idoc_changed_control         = itab_edidc
           EXCEPTIONS
                idoc_not_open                = 1
                direction_change_not_allowed = 2
                OTHERS                       = 3.
    STEP 4 - Close Idoc
    Update IDoc status
    CLEAR t_itab_edids40.
      t_itab_edids40-docnum      = t_docnum.
      t_itab_edids40-status      = '51'.
      t_itab_edids40-repid       = sy-repid.
      t_itab_edids40-tabnam      = 'EDI_DS'.
      t_itab_edids40-mandt       = sy-mandt.
      t_itab_edids40-stamqu      = 'SAP'.
      t_itab_edids40-stamid      = 'B1'.
      t_itab_edids40-stamno      = '999'.
      t_itab_edids40-stapa1      = 'Sold to changed to '.
      t_itab_edids40-stapa2      = t_new_kunnr.
      t_itab_edids40-logdat      = sy-datum.
      t_itab_edids40-logtim      = sy-uzeit.
      APPEND t_itab_edids40.
      CALL FUNCTION 'EDI_DOCUMENT_CLOSE_EDIT'
           EXPORTING
                document_number  = t_docnum
                do_commit        = 'X'
                do_update        = 'X'
                write_all_status = 'X'
           TABLES
                status_records   = t_itab_edids40
           EXCEPTIONS
                idoc_not_open    = 1
                db_error         = 2
                OTHERS           = 3.
    Hope this will help.
    Regards,
    Ferry Lianto

  • How to add new segment to IDOC in BADI CRMXIF_ORDER_R3_MAP

    Hi All,
    I am creating a DMR in ECC when a service order is created in CRM.
    I am using Basic Type ORDERS05. This Basic Type does not have the segment E1CUCFG populated when it comes to the BADI.
    I want to populate this segment and attach to my IDOC.
    How can i do this?
    Is there any FM which will create the segments?
    Kindly help.
    Thanks in advance.
    Edited by: shanthi v on Mar 29, 2011 3:42 AM

    I have dropped the IDOC solution. I created a enhancement in FM - CRM_SERVICE_BILLING_FILTER which helped me to create DMR as per my need.

  • XI does not allow me to add new segment....?

    Hi,
    I created a message from XSD...The XSD allows one node to be repeated say 5 number of times.
    But when I create the Message out of this XSD, it has just one node for this .Now I want to create another similar node...
    Any idea how  to do that?
    Thanks

    Hi,
    have you tried changing the XSD node to something like this:
    <xsd:element ref="Orders" minOccurs="0" maxOccurs="unbounded" />
    if defined like this it will allow many Orders nodes
    Regards,
    michal

  • VideoPlayer.aspx page--how to add an element on page that allows to "Link to a Document" rather than "Add New Document"

    Hi All,
    We have SharePoint 2013 and are setting up a Video Library. The Video Player page is great, but rather than adding documents to this page, and have them go into a folder called "Additional Content" we would like to add an element to the page that
    would allow us to link to documents already on SharePoint so if something gets updated, then we don't have to worry about uploading documents in both places. However, because this is a Document Set, if I add a web part to the page (Content Query in this case)
    and then filter documents to the content query--it applies the content query and its filter to every single video's video player page.
    Anyone know of a way around this?

    Hi,
    According to your description, you might want to enable users add the links to documents in SharePoint Libraries in the “videoplayerpage.aspx”.
    The available OOTB features won’t be capable of your requirement, a possible workaround is that we can use JavaScript with JavaScript Client Object Model to achieve it programmatically.
    With JavaScript, we will be able to generate the controls needed in the “videoplayerpage.aspx” to provide users the abilities to get a link to a file in a SharePoint Library and
    display all the selected links in the current page;
    With JavaScript Client Object Model, we can save/read/update the related links of different video files in an extra list based on the ID of a video file. Also, it will enable us
    to query all the documents in all libraries in the current site.
    More information about JavaScript Client Object Model:
    How to: Create, Update, and Delete List Items Using JavaScript
    http://msdn.microsoft.com/en-us/library/office/hh185011(v=office.14).aspx
    Common Programming Tasks in the JavaScript Object Model
    http://msdn.microsoft.com/en-us/library/office/hh185015(v=office.14).aspx
    About how to
    modify the HTML source of a page using JavaScript:
    http://www.w3schools.com/js/js_htmldom_html.asp
    http://njarb.com/2011/06/update-html-content-using-javascript/
    It won't be an easy job to make all these things working together, therefore, a fact you might want to take into consideration is that more time and effort would be required to
    make it works.
    Feel free to reply if there any question about my suggestion.
    Thanks
    Patrick Liang
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support,
    contact [email protected]
    Patrick Liang
    TechNet Community Support

  • How to extend an existing IDOC!

    tell me the steps to extend the existing IDOC !
                                                                   Thanks

    1>we31(create new segments with fields u want to populate)
    2>we30(create an extension idoc type).in we30 u will get to radio buttons.1>basic type 2>extension.click on the extension and then copy the basic type.Now will get all the segmnts .Now add the new segments under the parent segement which needs to be extended.
    3>attach the extended idoc type to basic type and message type to tcode WE82.
    4>Now u have to search for an exit where u have to write ur code in order to populate the fields which u have extended.Basically u will write in the Function module.Make sure u r writing in the correct exit.Evry messagetype will have a function module.
    5>create a project in cmod and activate the function exit.
    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.
    First, letâs 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. It may be necessary to enhance an ALE function module even in situations where an IDOC extension has not been performed if the IDOC data being passed to and from the application requires modifications. The following approach applies to both situations.
    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.
    With SAP releases below 4.5B, you cannot capture changes to business address through change pointers because a change document object is not available for capturing business address changes, and also earlier releases have not been configured to write change documents for a contact personâs business address. If you would like this functionality, you can either create change document objects, generate function modules to create change documents, and perform ALE configuration to tie it in, or make a cosmetic change to the contact person screen data while changing the contact personâs business address so that it gets captured as a change to the Customer Master. Subsequently, the ALE enhancement that you performed captures the contact personâs business address.
    Inbound interfaces. The process for enhancing inbound ALE interfaces is similar for outbound, with a few exceptions; specifically in the coding of customer functions (function exits) for the ALE/EDI function modules.
    The first step is to create an IDOC extension for the specific Basic IDOC type by adding new segments at the appropriate hierarchy level: that is, associated to the relevant existing segment. Populate the data fields on the new segments with application data by the translator or external system/program before importing them into the R/3 System. Then, find the ALE function module that is invoked by the inbound processing. By browsing through the code or reading the documentation on the function exit enhancements using the SMOD transaction, identify the function exit in which you should place your code. The technique used in the code to post the additional or modified IDOC data to the application can vary based on the application rules and requirements, the data available at that point in processing, and the application function modules available to update the application tables. It is important to search first for application modules that process the data and see if they can be called within the function exit. If the additional data in the extended segments in specific to a custom table or resides in nonkey fields of a single or small set of tables, you may be able to update it directly by SQL statements in the function exit. This approach should be carefully evaluated and is certainly not highly recommended.
    Another option is to use Call Transaction from within the function exit to process the additional data. For example, in the case of message type WMMBXY for inbound goods movements from a warehouse management system, the standard interface creates batches for materials, but does not update its characteristics. In such a case, you can use Call Transaction MSC1 to create the batch and assign characteristic values to it from within the function exit provided.
    Error handling is a very important consideration when making enhancements to inbound ALE/EDI objects. In ALE and EDI inbound processing, workflow is used for handling errors at different levels such as technical and application. If workflow has been configured for the interface, the error messages and workflow items flow to the inbox of the named recipient(s).
    It is also critical to enhance the workflow that handles notifications of the inbound ALE/EDI process. In most scenarios this is not a very difficult task because SAP lets you influence the workflow parameters and messages in function exits (customer functions). You typically do this using flags and message codes to trigger certain workflow actions. If you conform to the status codes and flags stipulated for workflow processing, the enhancement could be error-free and seamless. In the case of an inbound IDOC with an extension, you should populate the EDIDC fields IDOCTYP (new IDOC type) and CIMTYP (extension type) accordingly.
    IDOC REDUCTIONS
    When distributing or communicating master data to other systems, the volumes of data transmitted over communication lines may be large, resulting in performance problems and/or excessive usage of resources such as disk space and bandwidth. Careful scrutiny of the master data Basic IDOC type may reveal that many of the segments are redundant or are simply not being used. If this is true, then the basic IDOC type is a candidate for a technique known as IDOC reduction. The R/3 System provides the ability to eliminate unused segments and irrelevant segment fields from the Basic IDOC type. This procedure is relatively simple and easy to implement. IDOC reduction is available for only a few message types such as DEBMAS, CREMAS, GLMAST, MATMAS, and certain POS messages.
    When performing an IDOC reduction, a new message type is created based on an existing message type. The IDOC segments associated with that message type are proposed for editing. Mandatory segments of the IDOC type canât be excluded. By default optional segments are excluded, but you can choose to include an optional segment and only certain fields in the optional segment. If you have extended the Basic IDOC type and created a new IDOC type associated with a corresponding message type and you are creating a new message type (view) based on it for purposes of IDOC reduction, then the enhanced IDOC type is presented for editing along with the additional segments.
    Letâs use the Vendor Master IDOC type CREMAS01 as an example to demonstrate IDOC reduction. Message type CREMAS is used for communicating Vendor Master data to other R/3 or external systems. If you browse the IDOC type CREMAS01 youâll see that it has 10 segments, with E1LFA1M being a mandatory segment (see Figure 6). To reduce this IDOC type:
    •     Use transaction BD53 or from SALE go to Distribution scenarios -> Master data distribution -> Reduce IDOC type for master data.
    •     Enter ZCREMS for View (message type).
    •     Click on Create.
    •     You will see a pop-up box. Enter CREMAS in the Derived From field. Enter.
    •     Enter a description. Enter.
    •     You will see a list display with segment E1LFA1M in green and a * symbol. The symbols used in IDOC reduction are: * for mandatory, 1 for selected, - for deselected, x for core selected, and the Î.â for core not selected. The corresponding elements are highlighted in green, white, red, violet, and gray, respectively.
    •     Expand all trees. You will see nine other segments in red.
    •     Place your cursor on the E1LFB1M segment for company code data and click on Select. It turns white with a 1 symbol.
    •     Double-clicking on it will display a list of fields. You can select fields that you require (see Figure 7).
    •     Note that if a child segment is selected, its parent is also selected automatically in order to maintain the hierarchical integrity.
    •     After youâve selected the segments required and its fields, save.
    •     From the main screen, click on Activate.
    Activating the new message type ZCREMS will turn on the message type change pointer generation on a particular client. While creating a reduced IDOC type message is a client-independent activity, activation is client-dependent. An entry is created in table TBDA2 for a specific message type in a specific client and is activated. To delete this message type, you need to deactivate it from all clients on that instance. These message types are transportable.
    Now that weâve created a new message type for a reduced IDOC type, letâs build the rest of the ALE configuration to work the interface with the following steps:
    •     Define a logical system to represent the other R/3 or external system.
    •     Configure the Customer Distribution Model to send message ZCREMS to this logical system.
    •     Define a port, if needed, for this system.
    •     Define a partner profile based on the logical system and maintain its outbound parameters. Make sure to use ZCREMS as the message type and CREMAS01 as the IDOC type.
    •     Use transaction BD14 or execute program RBDSECRE or from BALE go to Master Data -> Vendors -> Send. Then, to specify a vendor or range of vendors and enter message type, go to ZCREMS and its target logical system.
    •     Execute.
    You can also capture changes to Vendor Master data and create IDOCs by executing transaction BD21 or program RBDMIDOC. Use transaction WE02 or WE05 to view the IDOCs created as a result of the preceding test. Notice the segments populated and the basic segments that are absent due to the reduction. You will find that the fields deselected from the segments have a value of /. This is equivalent to a null value. Eliminating segments may result in saving resources, while eliminating fields may not, unless the data is compressed. Also, if you look at the master data ALE function modules for these few message types, youâll see that a function module IDOC_REDUCTION_FIELD_REDUCE is called for every segment being populated. This in itself may be an overhead. It is important to weigh the pros and cons before implementing IDOC reduction. Of course, in certain cases, it may be a necessity for adjustment of data.
    Enhancing ALE/EDI and IDOC extensions and conducting IDOC reductions is fairly simple. However, before proceeding with these tasks, you must carefully research the many options available in ALE and develop the best design for your business scenario.
    IMPLEMENTING BAPI WITH ALE: A SAMPLE SCENARIO
    Business application programming interfaces (BAPIs) provide an interface to Business Objects in the R/3 System. Business Objects are based on object-oriented technologies and represent an application objects, such as an address or a sales order. This next section prototypes an ALE interface that incorporates BAPI methods. When weâve finished, you should have a good idea of how easy it is to incorporate BAPIs with ALE and of how beneficial leveraging the 1000+ BAPIs available in the R/3 System can be when you want to interface with R/3 application objects.
    Letâs start with a brief overview of SAP Business Objects and BAPIs.
    SAP Business Objects. An SAP Business Object envelopes R/3 data and business processes while making the details of data structure and access methods transparent to a user interfacing with it. It consists of four layers: kernel, integrity layer, interface layer, and access layer. The kernel represents the R/3 data and its attributes. The integrity layer represents the business logic of the object and contains the business rules that govern the values of the kernel. The interface layer describes the interface mechanisms to external applications. BAPIs belong to the interface layer. The access layer represents communication methods, such as COM/DCOM, RFC, and CORBA.
    SAP Business Objects and their details are stored in the Business Object Repository in the R/3 System.
    BAPIs. BAPIs are "methods" of SAP Business Objects and represent their interface layer. BAPIs are essentially function modules in the R/3 System that are capable of invoking remote function calls (RFCs) for the purpose of communicating data through the function moduleâs import/export parameters and internal tables. BAPIs do not invoke screen dialogs. Like blackbox technology, BAPIs do not require the programmer or user to know the coding and implementation details of the interface to the Business Object. The user simply invokes the BAPI with its appropriate parameters and values in order to accomplish a task such as getting a list of materials from an external system or sending a list of contact person details to another system.
    BAPIs can be executed synchronously or asynchronously while using the ALE communication layer for exchanging data. Typically, with asynchronous BAPI communications, an ALE IDOC is used to distribute the data. As we will learn in the following prototype, the ALE distribution model has to be configured in order to use the appropriate BAPI methods for the RFC destination that provides a gateway to the external system (R/3 or other). For this type of communication, an ALE IDOC interface must exist. If a particular BAPI (SAP-delivered or user-written) does not have an ALE IDOC interface, the interface can be generated using certain R/3 tools and procedures.
    BAPIs are fast becoming the communication standard for exchanging data between business systems (including R/3). SAP Business Objects conform to Open Application Group (OAG) standards, and BAPIs support the COM/DCOM and CORBA guidelines. ALE and BAPIs is the strategic direction for all SAP interface technologies and will replace SAPâs traditional techniques in the future.
    A BAPI/ALE PROTOTYPE ÷ CONTACT PERSON DETAILS
    In the previous section, we learned how to enhance ALE functionality using the example of Customer Contact Person details. We extended the IDOC and enhanced a customer function with a few lines of ABAP code to achieve the additional functionality of distributing contact person details. While this was an exercise to learn IDOC extensions and customer-function enhancements, we can prototype a BAPI/ALE interface in this section that accomplishes the same purpose ÷ the distribution of contact person details. In release 4.5 of the R/3 System, message type ADR3MAS and IDOC type ADR3MAS01 have been provided to distribute contact person details with the aid of a BAPI method. The steps weâll walk through in a moment will illustrate the ease with which we can integrate BAPIs with ALE to get an interface up and running for many standard business scenarios or specialized cases that were not supported by ALE prior to the advent of BAPIs.
    The ADR3MAS is considered to be a master data message type because it complements business master data, such as customer and vendor master. It is now supported by change document functionality, implying that change pointer mechanisms can be used to capture and then distribute changes occurring to contact person data using ALE IDOCs. The function module that accesses the R/3 data is a BAPI. In the R/3 System, contact person address is a business object. If we search the Business Object Repository (via transaction SWO1) with the keyword "address," for example, we will find business object BUS4003 under Cross-Application Components -> General Application Functions -> Address Management -> BUS4003: Address of a person in a company. This is the business object that pertains to our scenario, and a drill down on it reveals the details of the object, including its methods (see Figure 8). The method that would be of interest to us is "AddressContPart.SaveReplica." For your information, the corresponding BAPI function module is BAPI_ADDRCONTPART_ SAVEREPLICA in the function group SZAM.
    Having gathered this information, Letâs build the outbound interface:
    •     Create a logical system (via transaction SALE) to represent the receiver system.
    •     Configure the distribution model. From transaction SALE, use option Maintain Distribution Model to create a model view for this scenario. Specify the sender system (the base logical system for the client you are working in, such as the logical system that has been assigned to that client) and the receiver system (the logical system). After positioning the cursor on the receiver system, click on Method and enter AddressContPart in the Object Name field on the panel that pops up. Also enter SaveReplica in the Method field on the pop-up panel. Enter and save the Distribution Model (see Figure 9).
    •     From transaction WE20, create a partner profile based on the logical system for the interface. Use message type ADR3MAS and IDOC type ADR3MAS01, with an appropriate port.
    •     Activate the change pointer for message type ADR3MAS. From SALE go to Set up Data Distribution -> Master Data Distribution -> Activate Change Pointers. Ensure that change pointer generation is active at the general level as well.
    Now that weâve completed the configuration, letâs test the interface. The purpose of this test is only to create outbound IDOCs. Appropriate settings, such as port definitions and RFC destinations, can be made as required for purposes of communicating the IDOCs to the external system (or other R/3 system).
    From the Customer Master or Vendor Master screens, create or make changes to contact person address. This should result in the creation of change pointers. (Check table BDCPS for change pointer entries with message type ADR3MAS.) After this, from transaction BALE go to Periodic Processing -> Process Change Pointers, enter ADR3MAS as the message type, and execute the transaction. This should result in a message indicating the number of master IDOCs created. Use transaction WE05 to display the IDOCs.
    THE ALE AUDIT
    In this section letâs take a look at the prototyping of the ALE Audit. ALE Audit is a powerful mechanism for verifying the success of ALE transactions/messages sent to another system. As you will see, implementing ALE Audit is not only easy but also very beneficial, because it facilitates the monitoring and tracking of transactions across systems while providing an entry point into error handling.
    Program RBDSTATE is used for audit confirmation of ALE transactions between two R/3 systems; in other words, it indicates the success or failure of the ALE transaction on the target system. The program reports the status of the transaction on the target system back to the sending system. This process also serves as an interface itself from the target system to the sender system, facilitated by message type ALEAUD. In the following section, weâll look at the various steps needed to set up ALEAUD and execute program RBDSTATE.
    SETTING UP ALEAUD and EXECUTING PROGRAM RDBSTATE
    Letâs consider two different R/3 systems with base logical systems BK1CLNT010 (sender system) and BK2CLNT020 (target system). Assume that you are distributing characteristics master (message type CHRMAS) from BK1CLNT010 to BK2CLNT020. When you send CHRMAS02 IDOCs from BK1CLNT010, their status is 03 (data passed to port OK) if they were successfully externalized from the sender system. If the IDOCs were received and processed successfully on the target system, the status of those IDOCs on the target system is 53 (application data posted). Remember that you have to create a partner profile for BK1CLNT010 on the target system in order to receive the CHRMAS messages. The inbound parameters of BK1CLNT010 partner on the target system have CHRMAS as the message type and CHRM as the process code.
    You now need to configure BK2CLNT020 to send ALEAUD messages to BK1CLNT010, the sender system. And you also need to configure BK1CLNT010 to receive those messages in order to update the status of CHRMAS IDOCs sent to the target system:
    •     On the target system BK2CLNT020, configure the distribution of message flow of type ALEAUD to logical system BK1CLNT010.
    •     Create filter object using object type MESTYP with a value of the message type for which you need audit confirmation. This message type must flow from the sender, BK1CLNT010 to BK2CLNT020. In this example, the value of the filter object type MESTYP is CHRMAS, message type for characteristics master. Save the distribution model. Use transaction BD64 to do this.
    •     On target system BK2CLNT020, create an RFC destination with name BK1CLNT010. Choose the relevant connection type and enter the logon parameters and password for the R/3 system on which BK1CLNT010 resides. Use transaction SM59 to do this.
    •     On target system BK2CLNT020, generate partner profile and port definition using transaction SALE, go to Communications -> Generate partner profile. Specify the customer model as described. Check the partner profile to ensure outbound parameter entries for message types ALEAUD and SYNCH.
    •     On sender system BK1CLNT010, create a logical system for BK2CLNT020. Create a partner profile for logical system BK2CLNT020 with inbound parameters for message type ALEAUD, with process code AUD1.
    •     Distribution of customer model on BK2CLNT020 to BK1CLNT010 is not necessary.
    TESTING THE ALE CONFIRMATION PROCESS
    Now you are ready to test the ALE audit confirmation process:
    •     From the sender system, BK1CLNT010, send a couple of CHRMAS02 (characteristics master) IDOCs down to the target system, BK2CLNT020. Make sure that the status of the IDOCs is 03 (data passed to port).
    •     Check the target system for receipt of these IDOCs. Make sure that they are in a status of 53 (application data posted).
    •     Execute program RBDSTATE with appropriate parameters. Specify BK1CLNT010 for Confirm to System, CHRMAS for Message type, and date, if necessary.
    •     Upon successful execution, informational messages will be issued indicating the IDOC number and status of the ALEAUD IDOC. (Note that a single ALEAUD audit IDOC can contain audit messages for multiple application IDOCs. This capability reduces the traffic of IDOCs between the two systems and keeps the overhead of audit confirmations at a minimum.)
    •     Check the sender system for the receipt of the ALEAUD message. The status of the CHRMAS IDOCs that you sent to the target system must be changed to 41 (application document created in target system).
    This completes the test of ALE audit confirmations (see Figure 10 and Figure 11 for IDOC display of target and sender system).
    Audit confirmations can play a significant role in the reporting and monitoring of production systems. You can schedule program RBDSTATE periodically on target systems to report back to sender systems. Keep in mind that you need to maintain a sufficient time lag between the sending of application IDOCs to the target system and the execution of this audit program because the application documents need to be posted on the target system. This program can also be accessed from BALE using Periodic work -> Audit confirmation.

  • How can I edit existing region

    Hi All,
    I have added one item to exisitng vo and attached to AM.
    Now i need to add above item to region , but region not in edit mode it was in disable mode.
    Can anyone please help on this, how can I edit region or how can i add new item to existing Region.
    Regards,
    Rakesh

    HI Vishwanath,
    I have exisiting VO, in that Vo added new column.
    Now, i need to add the new column to exisitng region.
    when ever I am selecting region it is in noneditable mode.
    can you please provide, how can I get new coolumn to the region.
    We have assignment number box is there, for that box seach is there, and assignment number having region, this region having VO(I have modfiied with new column), but I am not able to see the new column in that region.
    If possible, can you please provide your gmail id, I will send scrren shots, then youcan easily understand my issue, I am very new to OAF.
    Please help..
    Regards,
    Rakesh

  • How to add another Segment field in OBC4

    Dear Experts,
    OBC4 -> select Comp. Code -> field Status Group -> select Field St. Grp -> Duuble click on Field St. Grp
    I have a requirement to make Business Place/secn field Mandatory where ever it is used in transaction F-43 , F-02 , F-48 .
    So for this am going through OBC4 . But there (Under Field status Grp.) am not getting any field named as Business Place . There exists a field Business Area . But Business Area and Business Place both are different .
    So Is it possible to add another segments named as Business Place/secn  there with 3 options Supress , Req. Entry , Opt. Entry . So that i can change it to Mandatory .
    Thanks in Advance
    Jack

    Hi,
    Check this sample process
    To get custom fields on IDOC you need to add custom segment on IDOC and for that you have to create a extension IDOC with reference to Basic IDOC.
    You can do that as explain below.
    Here for example you have basic idoc ORDERS05 and you want to add additional segments at header level - ZE1EDK01 and line item level ZE1EDP01
    1. TCode - WE31 : Create custom segments ZE1EDK01 and ZE1EDP01 with the fields you want and release these segments.
    2. TCode - WE30 : Create extension IDOC
    In WE20 enter extension IDOC name - ZORDERS05, select "Extension" option and hit "create" button. When it gives pop-up, select "create new" and enterd linked basis type as "ORDERS05". Enter proper description and save.
    3. On the next screen of WE30, select the segment under which you want to add your additional segment. Save everything.
    4. TCode - WE82. Here you link extension idoc to basic idoc and message type.
    Go into change mode. Hit "New entries button" Enter Message type = "ORDERS", basic type = "ORDERS05" and extension type = "ZORDERS05".
    Regards,
    Satish

  • IDOC - add new field in in existing segment definition

    Hi,
    For segement type say Z1MARA1 if we need to add a new field in segement definition say Z2MARA1 SAP is not allowing to add new field if we tried to cancelled the realsed 30E it not allowing since the SAP realease which we are working is 640 so only we can create new segement defination with version Z2MARA1001 with new field added but issues is that the partner Profile for outbound parameters the Segment release in IDOc Type is 31I so if we change this segment release in IDOC type to new version ie., 640 then it will pick all the new segement associated with it due to which the the format in which we pass the segements to third party will change so is there any way to use the existing segment definition which is release 30E & add addition field to it. Only one way I found is that when i try to cancel the released message is trigger so in the debug if I make it success it allows to add new field in existing segment definition but which is wrong way of doing is there any way we can used same segment definition & add new field without adding new version & new released.
    Thanks in advance.
    Rajeev

    Varma,
    I know that we can add new segement with new version my question is existing segement definition can we add a new filed because in partner profile we specified release 31i so even we create new segement type then version will be 640 so it will not pick the latest version.
    Thanks
    Rajeev

  • How to add an feild to a segment to an existing idoc sturucture?

    how to add an feild to a segment to an existing idoc sturucture?
    please help me out with the step step by process...
    thnaks and regards,
    anu

    Hi
    use the WE31 Tcode to edit the segment
    see the following steps
    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)
    Important Transaction Codes:
    SALE - IMG ALE Configuration root
    WE20 - Manually maintain partner profiles
    BD64 - Maintain customer distribution model
    BD71 - Distribute customer distribution model
    SM59 - Create RFC Destinations
    BDM5 - Consistency check (Transaction scenarios)
    BD82 - Generate Partner Profiles
    BD61 - Activate Change Pointers - Globally
    BD50 - Activate Change Pointer for Msg Type
    BD52 - Activate change pointer per change.doc object
    BD59 - Allocation object type -> IDOC type
    BD56 - Maintain IDOC Segment Filters
    BD53 - Reduction of Message Types
    BD21 - Select Change Pointer
    BD87 - Status Monitor for ALE Messages
    BDM5 - Consistency check (Transaction scenarios)
    BD62 - Define rules
    BD79 - Maintain rules
    BD55 - Defining settings for IDoc conversion
    WEDI - ALE IDoc Administration
    WE21 - Ports in Idoc processing
    WE60 - IDoc documentation
    SARA - IDoc archiving (Object type IDOC)
    WE47 - IDoc status maintenance
    WE07 - IDoc statistics
    BALE - ALE Distribution Administration
    WE05 - IDoc overview
    BD87 - Inbound IDoc reprocessing
    BD88 - Outbound IDoc reprocessing
    BDM2 - IDoc Trace
    BDM7 - IDoc Audit Analysis
    BD21 - Create IDocs from change pointers
    SM58 - Schedule RFC Failures
    Basic config for Distributed data:
    BD64: Maintain a Distributed Model
    BD82: Generate Partner Profile
    BD64: Distribute the distribution Model
    Programs
    RBDMIDOC – Creating IDoc Type from Change Pointers
    RSEOUT00 – Process all selected IDocs (EDI)
    RBDAPP01 - Inbound Processing of IDocs Ready for Transfer
    RSARFCEX - Execute Calls Not Yet Executed
    RBDMOIND - Status Conversion with Successful tRFC Execution
    RBDMANIN - Start error handling for non-posted IDocs
    RBDSTATE - Send Audit Confirmations
    FOr testing you can use WE19.
    Regards
    Anji

  • How to modify existing idoc

    Hi all,
    My requirement is all ready existing idoc is their add to the new segments.Where is see the existing idoc and  how modified it.
    requirement:
    Invoice is created in R/3 the outbound idoc is created. The idoc details contain the PO Order Number, PO Line Number, Shipment Number, etc., along with serial number detail has to be added. For serial number detail additional segment has to be created and added to existing idoc.
             Create the new segment for serial number and add to the existing idoc. u201CIDOC BasicType:INVOIC02 and IDOC Message Type: INVOIC u201C .
    please help me.
    sreddy.
    Edited by: SReddy on Sep 8, 2008 7:06 AM

    Hi,
    Refer to the following link,
    [How to extend an existing IDOC!;
    Regards
    Natasha Garg

  • Create Individual Idocs Based on Parent and Child Segment type

    Hi Experts,
    I have a scenario IDOC to FILE ,  Split Single IDOC into Multiple IDOC's based on parent and child Segment Type
    For example If 3 child segments are same and 1 segment is different under parent segment then 3 same child segments are clubbed and create single idoc under parent segments and 1 different child should create in individual idoc under parent segment.
    Note : Same logic should work for N number of Parent Segments and Child Segments.
    Outbound:
    ZIdocName
    Control Record
    Data Record
    Parent Segment A
       Child Segment 1
       Child Segment 1
       Child Segment 1
       Child Segment 2
    Parent segment  B
       Child Segment 3
    Status Record
    I should get output like below
    Inbound:
    ZIdocName
    Control Record
    Data Record
    Parent segment A
      Child Segment 1
      Child Segment 1
      Child Segment 1
    Status Record
    ZIdocName
    Control Record
    Data Record
    Parent segment A
      Child Segment 2
    Status Record
    ZIdocName
    Control Record
    Data Record
    Parent Segment B
      Child Segment 3
    Status Record
    Please suggest me step by step process to achieve this task.
    Thanks.
    Ram

    Hello,
    Segment won't hold any value, so filter criteria should be there on some field wich exist in Parent node and chile node?
    Paste ur XML?
    Try this(Assuming u have some fields in parent/child segment on which u want to define filter criteria):
    Parent Field--UseOneAsMany----RC----
                                      ------------------Concat ----splitbyvalue(value change)--collapse context --- ZIdoc
    Child field-- RC----------
    Child field--RC--splitbyvalue(valuechange)--CC -Splitbyvalue(each value) -- ParentSegment
    Child field--RC--splitbyvalue(valuechange)--- ChildSegment
    RC -> Remove Context
    CC - Collapse Context
    Note - i haven't tested ur mapping, so make sure to adjust context in mapping
    Thanks
    Amit Srivastava
    Message was edited by: Amit Srivastava

  • Regarding new segment in Idoc

    Hi,
        I have created a new segment ZDH_HAZMAT  for hazardous materials for the idoc type ZDH_ORDERS and released it for purchase order. Actually modifying the segment data for already existing Idoc segments (E1EDP01) is possible and i have done it using user exit MM06E001. When a new segment (ZDH_HAZMAT) is added, it's showing a syntax  error . Waiting for earliest reply.
                                                            Thank you.

    Hello,
    You must keep a an IF condition like this in selection program's user exit.
         if Segmetn-Name eq <New segmetn>
             break <user name>
        end.
    It must stop other wise the enhancing the standard Idoc type is wrong. And so you need to check whether it is activate / released the new segment properly.
    All the very best for you.
      - Mohan Vamsi

  • How To Edit Failed IDocs Through Report ?

    Hi
    I have the requirement of editing (Modifying) IDocs through a report program..
    ( My program displays the content of a specified segment of failed IDocs in the ALV format..
    Then the changes made to those fields in ALV have to be updated in those failed IDocs.. So that i can reprocess the IDocs.. )
    Is there any BAPI or BADI or Any other solution to edit IDocs through a report....??
    I dont want to use BDC as the report program is meant for editing huge number of failed IDocs..
    Please help me..
    Thanks a lot,
    Raj

    There is a similar POST open in DATA TRANSFER FORUM...

  • How to find the existing Idoc...

    Hi all
    How to find the existing Idoc...
    in tranction we02..?

    Please find the function module that is being used to generate the inbound/outbound IDoc.
    Then you go to inside the FM and search for 'CUSTOMER-FUNCTION' in the main program.
    This is the place that provided by SAP to modify the IDoc segments.
    CALL CUSTOMER-FUNCTION '012'
      EXPORTING
        DEKKO              = EKKO
        DPEKKO             = PEKKO
      TABLES
        DEKPO              = XEKPO
        DPEKPO             = XPEKPO
        DEKET              = XEKET
        DH_APPL            = APPL.
    Hope this will help.
    Regards,
    Ferry Lianto
    <b>Please reward points if helpful.</b>

Maybe you are looking for

  • PO and iV value diff

    Dear friends, I need to know where we are defining the tol between gr value and IV value. Assume PO value is 1000 and IV is 1050 how the system will accept this? Is it possible to make this for all vendor or individually ? pl reply guru

  • Hdmi missing after mountain lion

    I just noticed that under System Preferences, Display my HDMI is missing. 

  • ESB Error after installation.

    Hi, I just completed installation of SOA Suite 10.1.3.1 on a RHEL 4 Linux Box. I was checking the status of my OC4J services, when I noticed two things through the EM: One: There were two, one called home, another soadev, which is what I named it dur

  • T500 Wireless radio is always off.

    I have set the wireless switch on, checked the Device Manager, and done the Fn-5 thing.  Nothing, it seems, will turn the radio on. I am using Windows 7 and I know that the hardware works because it worked for the first three days I had the computer.

  • Aperture 2.1.4 Hangs On Building Thumbnails

    I have Aperture 2.1.4 and everytime I open a specific project (the one with the most images...800+) it hangs building thumbnails. I've tried the "check library consistency" but during Running VACUUM On Database it never gets past the 80% area on the