Regarding mandatory IDOC segments and fields!

Hello all,
I am working with an IDOC interface (material price change). IDOC type is MATERIALVALUATION_PRICECHANG01.
When we go to WE60 for this IDOC type, SAP has marked all segments as optional for some reason. But I am trying to figure out which fields are mandatory as per the configuration. From my previous post I came to know that it depends on material types, how they are configured as an example.
I am determining valuation area from a lookup table, but how can I determine valuation type? I am talking abt segment E1MATERIALVALUATION_PRICECH.
However, the segment E1BP_MATVAL_PRICEDATE is marked as optional in SAP. Can I know whether those segment fields are required or optional based on the configuration setting in our R/3 system.
Thanks,

Hi,
U can check in WE60 transaction code where u have to specify the basictype ORDERS05 AND THEN CLICK ON HTML FORMAT BUTTON..Now u can see the documentation of the idoc...
Regards,
Nagaraj

Similar Messages

  • Source IDoc segment and field is showinh red.

    Hi Guys,
    I have created a mapping between source idoc HRMD_A07 and Target structure MT_Employee. in HRMD_A07 i have mapped segment EP1LOG1 to MT_Employee (direct mapping) to reoccur multiple times. Now when i test the mapping and load test xml instance then source idoc structure itself is showing red for all fieds and when executed target structure does'nt get created. what does this mean.
    Please suggest.
    Regards
    Swapnil.

    Hi,
    So it means that the source payload and the source Idoc structure is not matching.
    Please import the Idoc once more.. and activate and clear the cache once.
    Now test it.
    If still prblm.. pl do post
    Babu
    Edited by: hlbabu123 on Mar 9, 2010 5:37 PM

  • Mandatory segments and fields of Idoc...

    Hi Experts,
    I am very keen to know the mandatory segments and fields of the ORDERS05 IDOC so can you please let me how to check the mandatory feilds and segnents of this particular Idoc.
    Thanks in advance.Your help is highly appreciated.
    Thanks,
    Kiran.

    Hi,
    U can check in WE60 transaction code where u have to specify the basictype ORDERS05 AND THEN CLICK ON HTML FORMAT BUTTON..Now u can see the documentation of the idoc...
    Regards,
    Nagaraj

  • CREMAS03 Segment and field for LANGUAGE ?

    Hi,
    Please advise what is the segment and field name for Language in IDOC CREMAS03 (Creation Vendor Master).
    Thank You and Best Regards
    Fernand

    Hello Fernand,
    look for data element SPRAS, you will find in several segments (e.g. E1LFA1M-SPRAS, E1LFA1H-TDSPRAS).
    Best Regards, Dirk

  • Idoc segments and Partner types

    Hi Experts,
    Will we be able to find the partner details from the IDoc segments.
    Thanks in Advance.
    Regards,
    Sridevi

    Hi,
    I want  to get a list of partners to whom a particular IDoc segment is sent.
    Thanks,
    Sridevi

  • How can i pass the  segments and fields to the ORDERS05 IDOC

    Hi All,
    I want to use ORDERS05 Idoc type for creating sales order. How can I pass the order type, sales org., distr. channel, division, sold-to-party, material and quantity to the Idoc?
    please help me out in this.
    thanks in advance
    jasmine

    Hi,
    Goto WE19 TC and there select your IDOC and there u can pass the data.
    Regards,
    Phani

  • IDOC segment and qualf - detail of ranges

    Hi gurus,
    Please can someone advise how is best to identify the various segments of an idoc and then view the ranges of qualf within those ranges
    For example as I have picked up from another thread for E1EDK14 ranges are
    001 Business area
    002 Sales area
    003 Delivering company code
    004 Plant in charge
    005 Delivering plant
    006 Division
    007 Distribution channel
    008 Sales organization
    009 Purchasing group
    010 Sales group
    011 Company code
    012 Order type
    013 Purchase order type
    014 Purchasing organization
    015 Billing Type
    016 Sales office
    017 Unloading Point
    018 Quotation type
    019 PO type (SD)
    your help is much appreciated, thanks

    Transaction WE60 will give you an HTML view or an ABAP list view of an IDOC or segment.  Otherwise, use WE30 or WE31.

  • How to Read Idoc - Segment fields values and status messages

    Hi,
      I am having one requirement as i want to read the segments along with the field values and also i want to read all the status messages.
    first i read the idoc data from EDIDS and segments data from EDID4 and the staus messges from T100. but still i am not getting all the status messages.
    is there any other table which contains the information of IDOC segments and field values and also the status messages.
    Regards,
    Kumar

    You need to use
    V_MSGNO = EDIDS-STAMNO.
    CALL FUNCTION 'MESSAGE_PREPARE'
      EXPORTING
        MSG_ID   = EDIDS-STAMID
        MSG_NO   = V_MSGNO
        MSG_VAR1 = EDIDS-STAPA1
        MSG_VAR2 = EDIDS-STAPA2
        MSG_VAR3 = EDIDS-STAPA3
        MSG_VAR4 = EDIDS-STAPA4
      IMPORTING
        MSG_TEXT = V_TEXT.
    WRITE: / V_TEXT.

  • Idoc segment for updating Sales order item dates

    Hi All,
    I would ike to update the sales order item dates (loading date, Goods Issuance date etc) from an IDOC.
    please let me know the Idoc segment and fields that need to be filled in?
    Thanks in advance.
    Regards,
    Zeeshan.

    Hi,
    Here are some details of the segments in the idocs -
    SEGNAM Segment Name E1EDL20
    VBELN Sales and Distribution Documen 180001539
    SEGNAM Segment Name E1EDL18
    QUALF IDOC Qualifier: Control (Deliv PIC : Picking with flow records (inbound)
    SEGNAM Segment Name E1EDL18
    QUALF IDOC Qualifier: Control (Deliv PGI : Post delivery goods issue (inbound)
    SEGNAM Segment Name E1EDT13
    QUALF IDOC Qualifier: Date (Delivery 010 : Picking
    NTANF Constraint for activity start 20090808
    ISDD Actual start: Execution (date) 20090808
    SEGNAM Segment Name E1EDL24
    POSNR Item number of the SD document 10
    MATNR Material Number 1112
    WERKS Plant SG01
    KDMAT Material belonging to the cust 1112
    LFIMG Actual quantity delivered (in 55
    VRKME Sales unit EA
    POSEX External item number 10
    ORMNG Original Quantity of Delivery 55
    SEGNAM Segment Name E1EDL41
    QUALI Qualifier for Reference Data o 001 : Purchase order data of customer
    BSTNR Customer purchase order number 4500004668
    BSTDT Customer purchase order date 10
    POSEX Item Number of the Underlying 10
    SEGNAM Segment Name E1EDL37
    Regards,
    Shamma

  • Adding field in standard IDOC Segment E1EDL24

    Hello Friends,
    I have an urgent requirement that I have to extend IDOC segment E1EDL24 with two fields PABNR and LFSNR.
    When I tries to change the segment in WE31, it shows an error message that you can only modify the segments of customer namespace and cannot modify Standard IDOC Segments.
    Can we modify the standard IDOC segments, and if yes, how can we modify the standard IDOC segments. Please clarify.
    Points will be rewarded generously.
    Regards,
    Navin

    Hi Naveen,
    We cannot Modify the Standard segments. But we have to Create a new Segment and Add these fields.
    Then Create an Extended Idoc type
    Implement User Exits in Outbound And Inbound ..
    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.
    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.
    Reward if Helpful

  • ?segment n field for VBKD-INCO1 from ORDERS05

    Hi,
    I was trying to find the corresponding segment and field for VBKD-INCO1 [Incoterms (part 1)] from ORDERS05 idoc.
    Please help me in this regard.
    Message was edited by:
            Ramesh Kumar

    Hello,
    Check segment
    E1EDK17 ->qualf ->001 for incoterms part 1(header lever)
    E1EDP17-> Qualf->001(item level)
    Thanks,

  • Edit Std. IDoc Segments

    Dear All,
    Hope you guys are doing good.
    I have a requirement where i have to change the field length of IDoc DELVRY05 segment E1EDL24 Release 700 for the field LGMNG from 15 to 9.
    Can someone tell me how can i achieve this?
    Regards,
    Raj

    Hi ,
      Follow the steps for custom Idoc type creation .
    1.Business Case
    SAP R/3 systems send out data through IDoc (Intermediate Document), which in internally has segments and fields containing the data. But sometimes, these fields are not sufficient for a specific end-to-end business scenario as far as data transfer is concerned. So in such scenario, either few fields are to be added or subtracted, or completely new structure- IDoc needs to be created. This are called as Custom u2013 IDOC Types. Following blog gives out step-by-step approach for creation of the same.
    2.Development of IDOC types
    2.1 Creation of Segment Types
    Run T-code u2018WE31u2019 to create segment type, which has fields to contain the data and are added to the segment type in the same transaction. The data stored contained into the segment mesh is finally stored in EDISEGMENT table.
    Add your custom fields as per business scenario.   
    To make it available to other transactions, release the segment created.
    Go to Edit -> Set Release
    2.2 Creation of IDoc type
    Run T-code u2018WE30u2019 to create custom IDoc type. Enter the name of custom IDoc you want to create and click on red box for creation.
    Now, it takes you to following screen. Here you can add description for your IDoc type. Also you can specify name of existing IDoc for Copy or Successor mode. 
    Now, you can maintain attributes of the custom IDoc, which consists of attaching segment type created above to the IDoc type. Also specifying the details of frequency of these segments getting filled i.e. Maximum and Minimum number. Fill the necessary details and release this IDoc type as well.
    2.3 Creation of logical message types 
    Run T-code u2018WE81u2019 to create the logical message types. Go to Edit mode and click New Entry to go to following screen. 
    Save the entered data.
    2.4 Linking Message type and IDoc type.
    Run T-Code u2018WE82u2019. Now we have to link these created IDoc types and Message types. Enter the message type name, Basic IDoc type (ZCUST_IDC) and release type to be linked. In the data transfer through ALE, these message types represent the IDOC structure.
    Extension field above will be used as per the Extended IDoc type scenario i.e. in case of addition of few more fields into the existing IDoc type. 
    <<text removed>>
    Thanks
    Shambhu
    Edited by: Matt on Jun 30, 2009 10:43 AM - don't ask for email addressses please.

  • Idoc Configuration and interfaces related to 810

    Hi,
      Can any one tell me the entire configuration of ALE and EDI810 supported tools?
    Thanks
    Shobi

    <b>Hi,
    ALE
    To develop a new custom ALE scenario, comprises 5 steps:
    1.     Design and develop the custom IDoc with it’s segments and a new message type
    2.     Configure the ALE environment with the new IDoc and message type (customer model, partner profiles and linking IDoc to message type)
    3.     Develop the outbound process which does the following:
    •     Populates the custom IDoc with control info and functional data
    •     Sends the IDoc to the ALE layer for distribution
    •     Updates status and handles errors
    4.     Configure the ALE inbound side (partner profiles with inbound process code)
    5.     Develop the inbound process which does the following:
    •     Reads the IDoc into a BDC table; selects other data that is required
    •     Runs transaction using call transaction or BDC session
    •     Updates status and handles errors
    Below is a pictorial representation of the flow of a complete ALE scenario from the sending system to the receiving system.
    Figure 1: ALE Scenario model
    1.1.     ALE Example
    For the purposes of this example we will develop a small ALE scenario. This scenario is described below.
    “The receiver of an internal service must be able to reverse (cancel) the invoice receipt which will then cancel the applicable billing document automatically on the service provider’s system.”
    Figure 2: Example Purchasing & Selling scenario
    We will develop a custom IDoc to carry the billing number from the Service Receiver’s system to the Service Provider’s system. We will populate the IDoc in a user exit on the sending side and we will process the transaction on the receiving side using a custom function module and a BDC transaction call.
    No rule conversion, segment filtering or version conversion will be implemented in the model as described in Figure 1.
    Requirements
    •     Working ALE environment - See ALE Basis Configuration Guide;
    •     ALE scenario design together with the business requirement;
    •     Development access; and
    •     ALE configuration access.
    NOTES:
    1.     All IMG references to transactions are located in the transaction SALE which is the ALE portion of the IMG
    2.     This is one way of developing a scenario where no message control exists. If message control exist (EG. On purchase orders) then NAST can be used to call an outbound function module that would create the required IDocs.
    3.     Extensive knowledge of IDocs and ALE basis configuration is required in order to understand this guide.
    2.     OUTBOUND PROCESSING
    2.1.     Create IDoc type (WE30) Client independent
    The IDoc type refers to the IDoc structure that you will require for your development. In our case the IDoc type is called ZINVRV01. This IDoc type will have 1 segment called Z1INVRV with 2 fields, LIFNR & XBLNR, in this segment. If you require many segments or nested segments then they are also created using the same procedure.
    We will create the IDoc of the following structure:
    ZINVRV01
    Purchasing and Selling - Invoice receipt reversal
    Z1INVRV     P&S - Segment 1
         Segment fields     
              LIFNR     Vendor account number
              XBLNR     Reference document number
    Figure 3: IDoc type ZINVRV01
    To create the IDoc type, follow these next few steps:
    •     Enter transaction WE30 (ALE -> Extensions -> IDoc types -> Maintain IDoc type)
    •     Type in ZINVRV01 and click on Basic IDoc type, click the Create icon
    •     Click on Create new (we are creating an IDoc from scratch but you may want to copy another IDoc if it is similar to your requirements) and enter a description, and press enter
    •     Click on ZINVRV01 and then on the Create icon
    •     Enter Z1INVRV as the segment type (must start with Z1), check mandatory if the segment must exist (in this case check it), enter 1 in minimum number and 1 as maximum number. (Make the maximum number 9999999999 if there are going to be many of these segments in each IDoc. IE. When line items are passed via IDocs), click on Segment editor
    •     Enter a description for your segment type and create
    •     Enter a description for your segment, enter each field required in your IDoc, in our case type LIFNR across for Field name, DE structure and DE documentation, repeat for XBLNR and press enter to validate.
    •     Save and generate, press back
    •     To release the segment choose Goto, Release from the menu
    •     Check the box on the line of your new segment
    •     Save, back and enter
    •     Your IDoc type structure should be displayed with your new segment
    •     Save and back
    •     To release the IDoc type choose Extras, Release type from the menu and Yes
    Your IDoc is now ready for use. If you need to add fields or segments to your IDoc type, you will need to cancel the release of the IDoc type as well as the segment release using a similar procedure followed above (except now you uncheck the release box for the segment and you choose cancel release for the IDoc type).
    2.2.     Create message type (WE81) Client independent
    To create a new message type, follow these next few steps:
    •     Enter transaction WE81 (ALE -> Extensions -> IDoc types -> Maintain message type for intermed. Structure -> Create logical message type)
    •     Choose Create logical message type by double clicking on it
    •     Click on change icon to enter change mode
    •     Click on New entries to add a new type
    •     Enter the required message type, in our case it is ZINVRV and an appropriate description
    •     Save and exit.
    Your message type has now been created. The next step will be to link it to the IDoc.
    2.2.1.     Link message to IDoc type (WE82 & BD69) Client independent
    To link the message type to the IDoc type follow these next few steps:
    •     Enter transaction WE82 (ALE -> Extensions -> IDoc types -> Maintain message type for intermed. Structure -> EDI: Message Types and Assignment to IDoc Types)
    •     Click on change icon to enter change mode
    •     Click on New entries to create the link
    •     Enter the message type ZINVRV and the BasicIDoc type as ZINVRV01
    •     Save and exit
    •     Enter transaction BD69 (ALE -> Extensions -> IDoc types -> Maintain message type for intermed. Structure -> Assign message type to IDoc for ALE)
    •     Click on change icon to enter change mode
    •     Click on New entries to create the link
    •     Enter the message type ZINVRV and the BasicIDoc type as ZINVRV01
    •     Save and exit
    Your IDoc is now linked to your message type. We still need to link object types and add the message to the model before we can use the message.
    2.2.2.     Maintain object type for message type (BD59) Client independent
    The ALE objects are used to create links between IDocs and applications objects, to control the serialisation, to filter messages in the customer model and to use listings.
    For our own message type and IDoc you must maintain object types for the links.
    If you want to check the serialisation for the message type, then you must maintain object types for the serialisation. If no serialisation object has been maintained for a given message type, then the serialisation will not be checked for this message type.
    To add an object type to our message type, follow these next few steps:
    •     Enter transaction BD59 (ALE -> Extensions -> ALE object maintenance -> Maintain object types)
    •     Type in your message type ZINVRV and press enter
    •     Click on New entries
    •     Enter your object type, LIFNR (We need to use the vendor as a filter object), the segment name where LIFNR resides, Z1INVRV, a number 1 for the sequence followed by the actual field name LIFNR
    •     Save and exit.
    You have now created an object that we’ll use as a filter object in the customer model to direct the flow of messages to the various logical systems based on the vendors in the filter of the message type ZINVRV.
    We now need to add our new message type to the distribution model.
    2.3.     Configuring the Distribution Model
    This task is performed on your ALE reference client.
    2.3.1.     Manual Configuration (BD64) Client dependent
    To manually configure the customer distribution model, read the ALE configuration procedure, and follow these steps:
    •     Perform the Maintain customer distribution model directly function. (ALE -> Distribution customer model -> Maintain customer distribution model directly)
    •     Specify the customer model you want to maintain and the logical system that is to be the sender of the messages OR create a new model. (Create model ALE with logical system ALELS1C400)
    •     Choose the receiving systems to which the sending system must forward message type ZINVRV to.
    •     For each receiving logical system allocate the message type necessary for communication to the receiving systems as per ALE configuration procedure.
    •     Create filter objects (in our case LIFNR as the object type with the associated vendor number, 0000018001 with leading zeros, in the object area) for the message types.
    •     Save the entries.
    NOTES:
    You cannot maintain a message type between the same sender and receiver in more than one customer distribution model.
    Only the owner is authorised to modify the model.
    To change the owner of a model, choose the 'Maintain ownership of customer distribution model' function. Make sure that all changes will be distributed to all systems that know the corresponding model. To do so, you can use the correction and transport system.
    To transport the customer distribution model you should use the Distribute customer model function of the IMG as described below.
    2.3.2.     Distribute customer model (BD71) Client dependent
    After the customer model has been created centrally, it must be distributed to the other remote systems. This entails first of all setting up the communication for the distributed systems and then sending the model.
    2.3.2.1.     Distribute Model (BD71) Client dependent
    This task is performed on your ALE reference client. To distribute the customer distribution model, read the ALE configuration procedure and follow these steps:
    •     Make the settings for the communication with the other decentral systems, you have not set them yet.
    •     Define the RFC destination for R/3 connections whose names correspond to the name of the corresponding logical system.
    •     Create the output partner profile.
    •     Distribute the customer model
    •     Specify the name of the customer model.
    •     You must specify the target system to which you want to distribute the customer model.
    •     You must repeat this function for every distributed logical system.
    2.3.2.2.     Maintain sending system partner profile (WE20) Client dependent
    With this function, you define the partner profiles for all outbound and inbound messages on the basis of the customer distribution model.
    After you have defined and distributed the customer model, you will have to maintain the partner profiles locally. To do this read the ALE configuration procedure.
    •     Enter the output mode (background, immediately) and the package size for outbound processing.
    Requirements
    •     The customer model must be maintained.
    •     RFC destinations must be maintained.
    •     The customer model must be distributed.
    •     To ensure that the appropriate persons in charge are informed if a processing error occurs, you must make settings in: Error processing Maintain organisational units.
    2.4.     Populate & distribute IDoc using ABAP
    An IDoc consists of a control record with structure edidc and one or more data records with structure edidd. The control record contains the sender and recipient of the IDoc, as well as information on the type of message.
    To be able to pass an IDoc to the ALE layer, you must set up a field string with structure edidc and an internal table with structure edidd. They are used to call function module master_idoc_distribute, which performs the save to the database and triggers the dispatch if necessary.
    2.4.1.     Example code
    The code displayed below does the following:
    •     populates our IDoc segment Z1INVR with the 2 fields XBLNR and LIFNR, populates the segment name and appends this to an internal table used to store the IDoc data;
    •     populates the control record info with the message type and IDoc type; and
    •     calls the MASTER_IDOC_DISTRIBUTE function module which distributes the IDoc as configured in the customer distribution model.
    *--- Data declaration statements
    DATA:          C_INVREV_SEGNAME(7) TYPE C VALUE 'Z1INVRV',
              C_INVREV_MESTYPE(6) TYPE C VALUE 'ZINVRV',
              C_INVREV_IDOC_TYPE(8) TYPE C VALUE 'ZINVRV01',
              Z1INVRV LIKE Z1INVRV,
              C_INVREV_DOCTYPE LIKE BKPF-BLART VALUE 'YY',
              IDOC_CONTROL LIKE EDIDC,
              T_COMM_CONTROL LIKE EDIDC OCCURS 0 WITH HEADER LINE,
              IDOC_DATA LIKE EDIDD OCCURS 0 WITH HEADER LINE.
    *--- Move the document header into a structure
    LOOP AT DOC_HEAD_TAB INTO DOC_HEAD.
    ENDLOOP.
    *--- Move the document item data into a structure
    LOOP AT DOC_ITEM_TAB INTO DOC_ITEM WHERE NOT ( LIFNR IS INITIAL ).
    ENDLOOP.
    *--- Populate the IDoc segment’s field with the required data
    CLEAR Z1INVRV.
    Z1INVRV-LIFNR = DOC_ITEM-LIFNR.          “Store vendor number for filter
    Z1INVRV-XBLNR = DOC_HEAD-XBLNR.          “Billing number
    IDOC_DATA-SEGNAM = C_INVREV_SEGNAME.     “Segment name
    IDOC_DATA-SDATA = Z1INVRV.               “Segment data
    APPEND IDOC_DATA.                    “Populate IDoc internal table
    *--- Move the control data info required for the distribution
    IDOC_CONTROL-MESTYP = C_INVREV_MESTYPE.
    IDOC_CONTROL-DOCTYP = C_INVREV_IDOC_TYPE.
    *--- Call the distribute function with the required parameters
    CALL FUNCTION 'MASTER_IDOC_DISTRIBUTE' IN UPDATE TASK
              EXPORTING
                   MASTER_IDOC_CONTROL          = IDOC_CONTROL
              TABLES
                   COMMUNICATION_IDOC_CONTROL     = T_COMM_CONTROL
                   MASTER_IDOC_DATA               = IDOC_DATA
              EXCEPTIONS
                   ERROR_IN_IDOC_CONTROL               = 1
                   ERROR_WRITING_IDOC_STATUS          = 2
                   ERROR_IN_IDOC_DATA               = 3
                   SENDING_LOGICAL_SYSTEM_UNKNOWN      = 4
                   OTHERS                         = 5.
    Figure 4: Outbound processing example code
    NOTE:
    For debugging purposes, use transaction WE05 (IDoc overview) to see check your IDoc status, or to see whether an IDoc was created/
    3.     INBOUND PROCESSING
    3.1.     Create Function Module
    This function module is called when a message type, of type ZINVRV, comes into the receiving system. This needs to be configured and is dealt with later in this section. The function module is passed the IDoc as a parameter.
    Example parameters
    Import parameters     Reference field     Opt Y/N
    INPUT_METHOD     BDWFAP_PAR-INPUTMETHD     N
    MASS_PROCESSING     BDWFAP_PAR-MASS_PROC     N
    Export Parameters     Reference field     Opt Y/N
    WORKFLOW_RESULT     BDWFAP_PAR-RESULT     N
    APPLICATION_VARIABLE     BDWFAP_PAR-APPL_VAR     N
    IN_UPDATE_TASK     BDWFAP_PAR-UPDATETASK     N
    CALL_TRANSACTION_DONE     BDWFAP_PAR-CALLTRANS     N
    Table Parameters     Reference field     Optional Y/N
    IDOC_CONTRL     EDIDC     
    IDOC_DATA          EDIDD     
    IDOC_STATUS     BDIDOCSTAT     
    RETURN_VARIABLES     BDWFRETVAR     
    SERIALIZATION_INFO     BDI_SER     
    Exceptions
    WRONG_FUNCTION_CALLED
    Example code
    The code displayed below does the following:
    •     populates a BDC table with the IDoc info;
    •     calls the transaction via a BDC call; and
    •     updates the IDoc status according to the BDC error status.
    EXTRACT FROM: Z_IDOC_INPUT_ZINVRV
    *--- Declaration of local variables
    DATA: C_SEGNAM(10) TYPE C VALUE 'Z1INVRV'.
    *-Loop through the IDOCs
    LOOP AT IDOC_CONTRL.
    *---Loop through the data for the IDOC
         LOOP AT IDOC_DATA WHERE DOCNUM = IDOC_CONTRL-DOCNUM.
              CASE IDOC_DATA-SEGNAM.
                   WHEN C_SEGNAM.
    *                    Here we get the info from the idoc table
                        IT_Z1INVRV = IDOC_DATA-SDATA.
              ENDCASE.
              PERFORM REV_INV.
         ENDLOOP.
         PERFORM UPDATE_IDOC_STATUS.
    ENDLOOP.
    FORM REV_INV               "Reverse invoice form
    *--- Local variables & constants
    DATA: C_TCODE LIKE BKPF-TCODE VALUE 'VF11'.  "BDC transaction code
    *--- Now we can build the bdc table to call the reversal transaction start of screen 109
    CLEAR BDC_TAB.
    BDC_TAB-PROGRAM  = 'SAPMV60A'.
    BDC_TAB-DYNPRO   = '109'.
    BDC_TAB-DYNBEGIN = 'X'.
    APPEND BDC_TAB.
    *--- Document number
    CLEAR BDC_TAB.
    BDC_TAB-FNAM = 'KOMFK-VBELN(01)'.
    BDC_TAB-FVAL = IT_Z1INVRV-XBLNR.     "Billing document number
    APPEND BDC_TAB.
    *--- OK Code for screen 109
    CLEAR BDC_TAB.
    BDC_TAB-FNAM = 'BDC_OKCODE'.
    BDC_TAB-FVAL = 'SICH'.
    APPEND BDC_TAB.
    *--- Now we can call transaction 'VF11' with the populated bdc table. The transaction is called inside the idoc-contrl loop, so a transaction will be called for every idoc (journal). the transaction is called in no-display mode ('N') because this code runs in background as it is called by ale.  The update is specified to be synchronous ('S') because we have to wait for the result to update the idoc status correctly.
    CALL TRANSACTION C_TCODE USING BDC_TAB MODE 'N' UPDATE 'S'.
    *--- Store the return code for use in another form (status update)
    RETURN_CODE = SY-SUBRC.
    *--- Here we check the return code, if there was an error, we put the transaction in a bdc session for the user to review and correct.
    IF SY-SUBRC NE 0.
         CALL FUNCTION 'BDC_OPEN_GROUP'
              EXPORTING
                   CLIENT = SY-MANDT
                   GROUP  = 'ZINVRV'
                   USER   = C_ALE_USER
                   KEEP   = 'X'.
         CALL FUNCTION 'BDC_INSERT'
              EXPORTING
                   TCODE     = C_TCODE
              TABLES
                   DYNPROTAB = BDC_TAB.
         CALL FUNCTION 'BDC_CLOSE_GROUP'
              EXCEPTIONS
                   NOT_OPEN    = 1
                   QUEUE_ERROR = 2
                   OTHERS      = 3.
    ELSE.                              "No problems
         C_EXISTS = 'N'.
      Select from the billing document table to get sales doc number
         SELECT * FROM VBRP WHERE VBELN = IT_Z1INVRV-XBLNR.
        Select from the sales document table to get user status number
              SELECT SINGLE * FROM VBAP WHERE VBELN = VBRP-AUBEL AND
                   POSNR = VBRP-AUPOS.
        Select from the status table to change the user status to pending
              SELECT * FROM JEST WHERE OBJNR = VBAP-OBJNR AND
                   STAT LIKE C_USER_STATUS.
                   IF JEST-STAT = C_US_PENDING.   "User status is pending
                        JEST-INACT = C_UNCHECKED.    "Make pending the active status
                        UPDATE JEST.
                        C_EXISTS = 'Y'.            "I.E. An entry is already in table
                   ELSEIF JEST-INACT = C_UNCHECKED AND JEST-STAT NE C_US_PENDING.
                        JEST-INACT = C_CHECKED.      "Make everything else inactive
                        UPDATE JEST.
                   ENDIF.
              ENDSELECT.
              IF C_EXISTS = 'N'.    "I.E. Pending has never been a status before
                   JEST-OBJNR = VBAP-OBJNR.
                   JEST-STAT  = C_US_PENDING.
                   JEST-INACT = C_UNCHECKED.      "Make pending the active status
                   INSERT JEST.
              ENDIF.
         ENDSELECT.       "Select from VBRP (Billing document table)
    ENDIF.
    ENDFORM.                               " REV_INV
    FORM UPDATE_IDOC_STATUS.                                              
    *--- Now we check the CALL TRANSACTION return code and set IDOC status
         CLEAR IDOC_STATUS.                                                  
         IF RETURN_CODE = 0.                                                 
              WORKFLOW_RESULT = '0'.                                            
              IDOC_STATUS-DOCNUM = IDOC_CONTRL-DOCNUM.                          
              IDOC_STATUS-STATUS = '53'.                                        
              IDOC_STATUS-UNAME = SY-UNAME.                                     
              IDOC_STATUS-REPID = SY-REPID.                                     
              IDOC_STATUS-MSGTY = SY-MSGTY.                                     
              IDOC_STATUS-MSGID = SY-MSGID.                                     
              IDOC_STATUS-MSGNO = SY-MSGNO.                                     
              IDOC_STATUS-MSGV1 = SY-MSGV1.                                     
              IDOC_STATUS-MSGV2 = SY-MSGV2.
              IDOC_STATUS-MSGV3 = SY-MSGV3.                        
              IDOC_STATUS-MSGV4 = SY-MSGV4.                        
              RETURN_VARIABLES-WF_PARAM = 'Processed_IDOCs'.       
              RETURN_VARIABLES-DOC_NUMBER = IDOC_CONTRL-DOCNUM.    
              APPEND RETURN_VARIABLES.                             
         ELSE.                                                  
              WORKFLOW_RESULT = '99999'.                           
              IDOC_STATUS-DOCNUM = IDOC_CONTRL-DOCNUM.             
              IDOC_STATUS-STATUS = '51'.                           
              IDOC_STATUS-UNAME = SY-UNAME.                        
              IDOC_STATUS-REPID = SY-REPID.                        
              IDOC_STATUS-MSGTY = SY-MSGTY.                        
              IDOC_STATUS-MSGID = SY-MSGID.                        
              IDOC_STATUS-MSGNO = SY-MSGNO.                        
              IDOC_STATUS-MSGV1 = SY-MSGV1.
              IDOC_STATUS-MSGV2 = SY-MSGV2.                         
              IDOC_STATUS-MSGV3 = SY-MSGV3.                         
              IDOC_STATUS-MSGV4 = SY-MSGV4.                         
              RETURN_VARIABLES-WF_PARAM = 'ERROR_IDOCS'.            
              RETURN_VARIABLES-DOC_NUMBER = IDOC_CONTRL-DOCNUM.     
              APPEND RETURN_VARIABLES.                              
         ENDIF.                                                  
         APPEND IDOC_STATUS.                                     
    ENDFORM.                               " UPDATE_IDOC_STATUS
    Figure 5: Inbound processing example code
    3.1.1.     Debugging inbound FM
    Use transaction WE19 to test inbound function module in debugging mode. Also use WE05 to view the IDocs and their statuses.
    3.2.     Maintain ALE attributes
    The inbound function module needs to be linked to the message type and the message type needs to be linked to the appropriate inbound process code at the partner profile level before the scenario is enabled. These steps are described below in detail.
    3.2.1.     Link Message Type to Function Module (WE57) Client independent
    To link a message (ZINVRV) type to a function module (Z_IDOC_INPUT_ZINVRV) follow these steps:
    •     Enter transaction WE57 (ALE -> Extensions -> Inbound -> Allocate function module to logical message)
    •     Select an entry (EG. IDOC_INPUT_ORDERS) and copy
    •     Type in module name Z_IDOC_INPUT_ZINVRV
    •     Type in basic IDoc type as ZINVRV01
    •     Type in message type as ZINVRV
    •     Type object type as IDOCINVOIC (Invoice document) - Used for workflow
    •     Direction should be set to 2 for inbound
    •     Enter and save
    3.2.2.     Define FM settings (BD51) Client independent
    •     Enter transaction BD51 (ALE -> Extensions -> Inbound -> Define settings for input modules)
    •     Click on New entries
    •     Type in the name of the new function module Z_IDOC_INPUT_ZINVRV
    •     Enter 0 for mass processing in the output column
    •     Save and Exit
    3.2.3.     Maintain process codes (WE42) Client dependent
    A process code needs to be maintained on each client. It then needs to be linked to the message via the partner profiles on each client. This allows the various clients to use a unique function module for the same message type.
    To maintain the process code follow these steps:
    •     Log on to the appropriate receiving system client
    •     Execute WE42 (ALE -> Extensions -> Inbound -> Maintaining process codes inbound)
    •     Choose Inbound with ALE service
    •     Choose Processing with function module
    •     Click on Processing with function module and choose create icon
    •     Click on New Entries
    •     Type in process code ZINR and give it a description and save
    •     Now you are asked to Please maintain codes added in ALE entry methods, enter and choose Z_IDOC_INPUT_FIRVSL and copy it. You should choose a FM similar to your one.
    •     Enter your process code ZINR
    •     Enter your function module Z_IDOC_INPUT_ZINVRV
    NOTE: The next 6 steps are used in workflow error handling.
    •     Enter IDPKFIDCMT in object type
    •     Enter MASSINPUTFINISHED in End event
    •     Enter IDOCINVOIC in IDoc object type
    •     Enter INPUTERROROCCURREDFI in IDoc start event
    •     Enter INPUTFINISHEDFI in IDoc End event
    •     Enter IDOCINVOIC in Application object type
    You will need to determine the task associated with object IDOCINVOIC, and then assign the appropriate position to it. This position will then receive the application error messages via workflow.
    To set up the workflow area please consult the Workflow config guide.
    3.3.     Create inbound partner profile
    For each message type you need to maintain the inbound partner profiles.
    3.3.1.     Maintain receiving system partner profile (WE20) Client dependent
    To maintain inbound partner profiles read the document ALE configuration procedure:
    •     Add the message type ZINVRV with process code ZINR.
    •     Enter the output mode (background, immediately) for inbound processing and NO message code.
    •     Enter the position S and choose the ALE administrator 50000085. This position will then receive all the technical ALE errors via workflow.
    3.4.     Test
    Once the inbound function module has been debugged the scenario should be ready to test in its entirety. If problems occur, read through the relevant areas of this document to check your configuration or code.</b>
      Foe EDI 810 Mapping Refer  <b>http://www.altova.com/videos.asp?type=0&video=edimapping</b>.
    Online demo you can see,
    Thanks
    Manju

  • How to assign idoc segment at runtime ??

    Hi ,
    I have a ztable which is maintained via sm30.
    The field1 is a key field and other fields are idocsegment name , idoc field , field value .
    Field1 = key field
    idoc segment name (field2)
    idoc field (field3)
    field value(field4)
    How do i update idoc segment and particular field with field4 at runtime .
    segment name , field and value changes with the matching key field.
      loop at it_edidd into wa_edidd
       where segnam = wa_ztable-idoc_segment.
    wa_seg = wa_edidd-sdata.
    how to assign the field at runtime ?????????????????????????
    how to change the value of field ?????????????????????????
       update edid4 set   sdata =  wa_seg
                          where docnum  = wa_edidd-docnum
                          and   segnum  = wa_edidd-segnum
                          and   segnam = wa_edidd-segnam.
       if sy-subrc <> 0 .
         rollback work .
         write: / wa_edidd-docnum .
       else.
         commit work.
       endif.
      endloop.
    Please help me with the above code .
    Regards,
    Rachel

    Hello Rachel
    You could do this the following way:
    DATA: ls_edidd    TYPE edidd,
               ld_idx         TYPE i.
    FIELD-SYMBOLS:
      <ls_segment>         TYPE any,
      <ld_field>                TYPE any.
    LOOP AT it_edidd INTO ls_eddid
                                 WHERE ( segnam = wa_ztable-idoc_segment ).
      ld_idx = syst-tabix.
      ASSIGN ls_edidd-sdata TO <ls_segment> CASTING TYPE (ls_edidd-segnam).  " <<<
      ASSIGN COMPONENT wa_ztable-field3 OF STRUCTURE <ls_segment>
                                      TO <ld_field>.
      <ld_field> = wa_ztable-field4.
      MODIFY it_edidd FROM ls_edidd INDEX ld_idx.
    ENDLOOP.
    However, be aware that your logic might fail in case of repetitive segments.
    Regards
      Uwe

  • Maximum Lenght of IDoc Segment

    Folks,
    I am editing definition of custom IDoc segment and trying to add 5 fields with length of   256 characters each. But SAP gives error message each & every time "Segment length is more than 1000 Character" which dose not allow me to change segment definition.
    It is default that we can not change segment length to more than 1000 character or is there any way to change it?
    Thanks!!

    Nope, IDOC data segment can be maximum 1000 bytes

Maybe you are looking for