IDoc Extension & Type

Hi!
     What is IDoc extension & Idoc Type.
    and also please give their diff.
    Thanks

Hi Rahul
IDOC Type : Defines the Structure(Hierarchy of Segments) based on which the IDOC(Data records) will be generated.
  IDOC Type Can be
  1. Basic Type :  These are IDOC types delivered by SAP like MATMAS03
                          Customers can also create Basic idoc types
  2. IDOC Extension: These are Created only by customers to Extend the Existing IDOC Types by adding Additional Segments.
<b>reward if Helpful.</b>

Similar Messages

  • Find Idoc extension type for Basic Idoc type

    Hi all,
    Is there any way to find existing extesions for Idoc given by SAP? For example, for basic idoc DEBMAS05 for version 4.7 , Idoc extension is DEBMASEXT.
    In similar way I want to know what is Idoc extension for Idoc basic type PREQCR02 [Create Purchase Requisition].
    Thanks in advance.
    Madhura

    The reason is preqcr02 is a generated idoc type  and matmas05 and debmas05 are not generated idoc types .
    You can search in table EDBAS for this .  If you go for dynamic debuggin , message comes from form
    create_ext_structure  in include MSED5F02 
    data: l_edbas type edbas.
      select single * from edbas into l_edbas
         where idoctyp eq edi_iapi01-idoctyp.
    if l_edbas-generated eq 'X'.
       message e099(b1) with
          'Action is not possible for generated idoctypes'.
    endif.
    Edited by: anil sasidharan on Feb 25, 2009 12:51 PM
    Edited by: anil sasidharan on Feb 25, 2009 12:59 PM

  • Regarding IDOC Extension

    Hi Experts,
    I need to Extend IDOC <b>COND_A03</b> with 5 Custom feilds. This Idoc will be populating 10 tables like A932,A933,A34,A35,A36,A37....,.I need to extend in
    <b>IDOC_INPUT_COND_A</b> through exit CALL CUSTOMER FUNCTION '002'.
    Here the 3 feilds will be present in A932 table and there will be only 4 feilds in A933 table and 3 feilds will be present in A934 table and so on. I..e all the 5 custom  feilds will not be present in all the tables.
    How i need to build the logic so that when the data comes to that function module i need to populate only 3 feilds into A932 table and 4 feilds into A933 table and so on..
    How do i need to build the logic.., to post the data when the number  of fields differ from one table to the other.

    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.
    regards,
    srinivas
    *reward for useful answers*</b>

  • How can I delete the IDOC basic type and extension?

    Hi,Expert:
       There are some idoc basic types and extension which are not used any more in our system.Now we want to delete them.but when I delete them using tcode:WE30, system said that the basic type or extension has been released and they can not be deleted.
       How should we do to delete these idoc types?
    Thanks

    From the top menu > edit> cancel release then try to delete
    a®s

  • Attribute extension generation to IDOC message type CRMXIF_IBASE_SAVE_M

    Various attributes have been defined and assigned to a set type using tcode COMM_ATTRSET.  The set type includes an entry in field CDB Table CDBD_ATTRVAL.  The Create API Append has been checked when including in a transport which generated the API append structure for the set type.  The set type has been assigned to a Category via tcode COMM_HIERARCHY.
    We are planning to use IDOC message type CRMXIF_IBASE_SAVE_M for the legacy data migration.  How do we include the new attributes?

    You have to use TCode BDFG  to generate a new Message Type . This will create a new Message type and a new Idoc type and will include the new Atributes.
    we have used to create a new Message type for our new fields in ACTIVITY_H ( extended through EEWB )
    Make sure , you refer to some OSS Note , which will tell you the steps to do so , As for first time user of BDFG  its very tricky.

  • Idoc Extension name not getting populated

    Hi all
    I have extended the idoc INVOIC02 and inside the exit- EXIT_SAPLVEDF_002, i m writing code for custom segments. Now the problem is, i am not able to see my idoc extension name in the importing parameter(CONTROL_RECORD_OUT-CIMTYP ) of the exit FM .
    I have maintained the partner profile (with same extension), distribution model and WE82 config. Please let me know, any config. is required, so the extension name will get populated.
    Vinoth

    Hi
    Check in the WE57 where Link is maintianed for Message type Idoc type and Idoc extension is attached to FUnction Module
    and check the Process code.
    Prabhudas

  • IDOC: Problem with data filter for IDOC extension field

    Hallo!
    I've created an idoc extension for the basic type DEBMAS06 that works fine. Now I want to use a data filter for one field ( company code ) of my segment. Every segment with a company code different from 100 should be filtered and not send to the other client. But what happend is that for all customers that have at least one company code different from 100, all segments including the one with cc 100 were deleted and a error "Segment ... does not exist for message type DEBMAS" appeared on the screen.
    Does anyone have any ideas about this problem?

    Not sure about changes to be made at the filtering options.
    An alternative would be sending the data to XI as it is and perform the mapping to remove the unnecessary segments.
    Disadvantage: Unnecessary processing of segment would be done at XI.
    Advantage: The integration logic would be completely handled by XI.
    Regards,
    Prateek

  • Idoc extension not displayed - outbound / INVOIC02

    Hi All,
    I have created a Extension Idoc ZINV2 , Basic type INVOIC02.
    I have added the segment YE1EDK01 ( with 2 custom fields ) under the segment E1EDK01. the message type is INOIC.
    The Partner Type is KU and the partner number used is 7000001.
    In the Outbound parameters : i have assigned
    Partner function as PY
    Message type is INVOIC.
    Message function is US.
    and I am assigning the Basic type and Extesnion type here properly.
    The segment and the idoc extension are released.
    In VF02 , in OUTPUT i am giving the Output type as YU10 for outout MEDIUM EDI.
    The idoc is getting created without any problem. But the Extesnion type is not displayed in the idoc in WE02. the added segment YE1EDK01 is not displayed.
    What could be the Problem , i am not able to sort out.
    Kindly help me in solving this .
    Should we need to do anything in WE57.
    Kindly help in solving this problem.
    Waiting for your replies.
    Suki.R

    Hi,
    When you need to add an Idoc extension, it must be appended in INT_EDIDD itab, after the actual segment. hen only it will be picked in the Idoc.
    Steps to add extension(Example)::
    1. WE31 - Create A segment(ZETEST) with additional fields, that needs to be added.
    2. WE20 - Create the Extension(ZORDERS) for the given Basic type.
            2.1    Now add the custom segment(ZETEST) as the child segment to the segment which you want to extend(e.g. E1EDK01)
            2.2    Define the minimum and maximum occurrence
    3. Release the custom segment (ZETEST) and the Extension (ZORDERS).
    4. WE82 - Assign Basic type to extension / messages
    5. WE30 - Check and Transport IDoc extension
                     5.1  Give the Extension Name(ZORDERS)
                     5.2 In the menu Path :  Development Object -- >Check (Ensure that there are no errors or warnings)
                     5.3 Now Transport: Path: Development -> Transport
    6. WE20 - Now go to the Partner Profile and add the Extension(ZORDERS) in the Message control data and Save it.
    7. Go to the Function module for processing the Idoc, and add the code for custom fields.
    Eg Code:
    clear: lt_dxvbep, lt_dxvbep[],
           ls_dxvbap,
           ls_ysd_tvpr,
           ls_aufk,
           ls_ze1edket,
           ls_edi_partner,
           ls_int_edidd.
    if int_edidd-segnam = 'E1EDK01'.
      do 1 times.
        check control_record_out-cimtyp = 'ZORDERS'.
        data: ls_pmt_vbak like vbak,
              ls_pmt_vbuk like vbuk,
              ls_e1edk01  like e1edk01,
              ls_ze1edk01 like ze1edk01,
              ls_nastflags like ysd_tvoutflags.
    */ Clear workarea
        clear: ls_pmt_int_edidd.
    */ Get data
        select single * into ls_pmt_vbak from vbak
        where vbeln = dxvbak-vbeln.
        select single * into ls_pmt_vbuk from vbuk
        where vbeln = dxvbak-vbeln.
    */ Get customizing
        select * up to 1 rows
        from ysd_tvoutflags into ls_nastflags
        where flagn = 'STA_PMT_DELETE_IDOC'
          and kappl = 'V1'.
        endselect.
    */ Set extended name
        ls_pmt_int_edidd-segnam = 'ZE1EDK01'.
    */ Set data for ZE1EDK01
        ls_ze1edk01-cmgst = ls_pmt_vbuk-cmgst.
    */ Move to EDIdata and append
        move ls_ze1edk01 to ls_pmt_int_edidd-sdata.
        append ls_pmt_int_edidd to int_edidd.
    */ Modify E1EDK01 with extra field
        loop at int_edidd where segnam = 'E1EDK01'.
          move int_edidd-sdata to ls_e1edk01.
          ls_e1edk01-lifsk = ls_pmt_vbak-lifsk.
          move ls_e1edk01 to int_edidd-sdata.
          modify int_edidd.
        endloop.
      enddo.
    Hope this helps........

  • IDOC extension not considerated

    Hello.
    I am having a problem with an extension. I have added in an IDOC structure of ORDERS05 an extension with a segment ZE1EDK01 that is a child of E1EDK01. I went throught all the steps we normally read on every website... the WE31 thing, the "set release" etc...  In the final, when you look at the structure in WE30, the extension is found as a child of E1EDK01.
    That new segment contains a KOSTL that I manually fill in the user exit EXIT_SAPLEINM_011.
    Though, in this user-exit, we receive the "final structure" of the IDOC where, since it is not filled yet, the added segment ZE1EDK01 is not in the final structure so I don't understand how to insert the KOSTL in my new segment that is absent of the final IDOC structure
    I thought adding the segment through an append to the table containing the IDOC structure but I fell it would kinda mess up the segment structure and/or the whole IDOC structure (The new segment not being under the E1EDK01, for example).
    So I have a few ideas but no real solution...
    Is that possible i'm not in the right User-Exit to add the KOSTL value in the IDOC?
    Am I missing something in the configuration of that extension?
    Do I have to add the new segment structure myself with an append (Or an insert) inside the final IDOC?
    I'm a bit in a dead end here. Only a few hypothesis but no real answers on where to head with that.
    Thank you for your help.
    <removed by moderator>                                                                               
    Regards!
    Edited by: Thomas Zloch on Nov 22, 2011 5:33 PM

    You are right. Since ZE1EDK01 is your own segment, you need to insert it right below E1EDK01 to which it is a child.
    IDOC_OUTPUT_ORDERS won't append and fill the ZE1EDK01 segment for you, you need to do it yourself like below. And no it won't mess up anything provided, you defined ZE1EDK01 to be a child segment of E1EDK01, following right below it in your IDoc extension definition
    In user exit, EXIT_SAPLEINM_011, the code below will insert ZE1EDK01 segment right below E1EDK01, its parent.
      DATA: lv_tabix TYPE sy-tabix.
      DATA: ls_ze1edk01 TYPE ze1edk01.
      CLEAR dint_edidd.
      READ TABLE dint_edidd WITH KEY segnam = 'E1EDK01'.
      IF sy-subrc = 0.
        lv_tabix = sy-tabix + 1.
        CLEAR dint_edidd.
        dint_edidd-segnam = 'ZE1EDK01'.
        ls_ze1edk01-field = 'value'.   "Assign your Z segment field values here
        MOVE ls_ze1edk01 TO dint_edidd-sdata.
        INSERT dint_edidd INDEX lv_tabix.
      ENDIF.

  • Release? while assigning Z Message Type to a Standard  SAP IDOC Basic type

    Hi Experts,
    Am trying to assign a custom Message Type to a Standard SAP IDOC Basic type in WE82 transaction, but am not sure How to find the Release(last column of WE82 Tx)? Pls. let me know.
    Thank you

    Hello,
    In case of IDOC, Go to Transaction WE30, type your IDOC name & select basic type & extension.
    After that select Go to -> Header data (Shift+F7), you will Idoc header info. In the same pop-up you will find IDOC release for which version.
    Regards,
    Sameer

  • How link customize IDOC message type with FM ?

    Hi,
    I have created new IDOC message type ZCOST and FM ZMASTERIDOC_CREATE_COST. (Outbound).
    Please advise how link the message type and FM ? so everytime i am executing BD21 with message type ZCOST the program always calling FM ZMASTERIDOC_CREATE_COST to generate the IDOC.
    Thank You and Best Regards
    Fernand

    HI,
    You need to link Mssage type, IDOC type and the FM (also extension idoc type if exits) in TCODE: WE57 --> go to change mode
    --> then new entries --> even you need to gove the direction inbound/outbound.
    Also you need to create a outbound custom process code in WE41. and link the FM to the process code.
    This process code shold be assigned to the partner profile in we20 in outbound parameters -> so you FM will be picked up qutomatically.
    regards,
    Nazeer
    Edited by: N a z e e r on Jul 14, 2010 3:14 PM

  • Standar IDOC Extension

    Hello Group:
            I Need to Extend the Standard Idoc BUPA_INBOUND_MAIN_SAVE_M03.
            I created the New Segment with their fields in the WE31.
            Now, I want to Create the Extension in the WE30.
            But the Error is appearing:
            "Cannot create extension for generated IDoc types"
            Please, Anybody could tell me how correct it?
                                        Sincerely, Thank you, Herná

    Usually enhancement takes place when the content in IDocs provided by SAP are not sufficient for the business process. IDoc extension can take place whenever dictionary table has a new structure appended required by the business process.
    In brief IDoc extension takes place when extra fields are required for the business process.
    If you are creating a new IDOC.....
    1) Create segment (WE31)
    Of course it will have naming convention for different company. Here are some tips:
    2) Create IDOC Types (WE30)
    3) Create message type (WE81)
    4) Link message type with basic type (WE82)
    5) Create FM
    In the FM all the attributes should be the same for Inbound or Outbound. Basically you can get an example from the std FM
    6) Create Process Code (Inbound - WE41/ Outbound - WE42)
    7) Link FM with Basic Type

  • Inbound IDOC extension

    Hi,
    iam working on an inbound IDOC TPSSHT01, i need to add an extrta field and segment , so i create an data element and  Z segment and add the field in the segment
    i have to copy the TPSSHT01 to a ZTPSSHT01 and do the IDoc extension ,
    i have to copy the function module IDOC_INPUT_SHIPPL to Z_IDOC_INPUT_SHIPPL
    Can any body let me know what are the steps that i have to follow to process the inbound idoc with the above requirment
    Cheers,
    Sai

    Hi ,
          Follow this procedure .
    In bound Idoc…
    Step 1: Create segment
    a.     T.code WE31
    b.     Enter a new segment type and press create button
    c.     Give a short text
    d.     Enter the field names say FIELD NAME : MATNR ;; DATA ELEMENT: CHAR(18)
    e.     Save the segment   (zkrishseg)
    Step 2: Create IDOC type
    a.     T.code WE30
    b.     Enter a new IDOC type name
    c.     Choose the basic type and press the create button.
    d.     Choose the create new option button and enter a description and press enter
    e.     Place the cursor on the type name and then press create button.
    f.     Enter the segment name created in step 1 and check the mandatory segment check box
    g.     Enter minimum number and maximum number as 1 and press enter.
    h.     Then save the IDOC type.   (zkrishtyp)
    Step 3: Create message type
    a.     T.code WE81
    b.     Press change button.
    c.     Press new entries button.
    d.     Enter a message type and short text and press save button. (zkrishmsg)
    Step 4: Assign message type to IDOC type.
    a.     T.code WE82
    b.     Press change button
    c.     Press new entries button.
    d.     Enter the created message type, IDOC type and version release (46B or 46C)
    Step 5:  Create a function module for inbound. (Z_IDOC_KRISH_INBOUND)
    Step 5A: Create characteristics of inbound FM.
    a.     T.code BD51
    b.     Click ‘New entries’
    c.     Enter the IDOC function module name and 1(individual type) in ‘input t.’.
    d.     Save it.
    Step 6: Assignment of FM to log, message and type.
    a.     T.code WE57
    b.     Go for change mode and click ‘new entries’.
    c.     In processing by…enter FM name and enter ‘F’ as type.
    d.     Enter basic type (idoc type-zkrishtyp) and message type (zkrishmsg) in the respective text boxes.
    e.     Choose the direction as 2 – Inbound.
    f.     Save the data.
    Step 7. : Creation of inbound process code.
    a.     T.code WE42
    b.     Go to change mode and click ‘create entries’.
    c.     Enter a new process code and description (zidockrish)
    d.     Enter the FM name in the identification text box
    e.     Choose processing with ALE service
    f.     Choose processing by FM and click Save button
    g.     In the next screen, select the FM name and click save button
    Step 7a : Creation of inbound process code.
    h.     T.code SM59
    i.     Select ‘R/3 connection’  and click ‘create’.
    j.     Enter all system related things(for Eg. Connection type as ‘3’, Target host as ‘SAP04’,
    Description , and Logon  details and save.
    Step 8:  Define a port
    a.     T.code WE21
    b.     Click on Transactional RFC and press the ‘Create’ button
    c.     Enter a port name and description. (ztestkrish)
    d.     Choose the release type.
    e.     Choose the RFC destination.
    f.     To create RFC destination…go to SPRO and search RFC destination…and create.
    g.     Save the data.
    Step 9. Define logical system
    a.     T.code SALE
    b.     Click down the sending and receiving systems
    c.     Click down the logical systems
    d.     Choose Define logical system.
    e.     Go for new entries.
    f.     Enter a new name and description and save it. (zkrishlog)
    Step 10. Create partner profile
    a.     T.code  WE20
    b.     Choose partner type LS and click create.
    c.     Enter the logical system name in partner number
    d.     Then Save …. Here Type is ‘US’.
    e.     click + icon(create inbound parameter) in the bottom. Note: Two table control subscreens will appear.  One for inbound and the other for outbound.  Click + icon in inbound area.
    f.     Enter the message type, process code and save the data.
    Step 11. Checking the Idoc
    a.     T.code WE19,
    b.     Choose radio Basic type , enter the type name(zkrishtyp) and press execute button.
    c.     Click on EDIDC Number.
    d.     Enter partner Number, Partner type, Port Number for sender and recipient ( data remains same here for sender and recipient)
    e.     Enter Message type and press ENTER.
    f.     Click on empty space corresponding to SEGMENT name and enter Paarameters like MATNR, WERKS and CHARG etc….
    g.     Click standard inbound properties here…  and press enter… see the result….
    h.     T.code WE02
    i.     Enter IDOC number press ENTER see the status.
    Function Module in Inbound
         Import Parameters
         INPUT_METHOD           LIKE BDWFAP_PAR-INPU              Inbound method for the IDoc inb 
    MASS_PROCESSING     LIKE BDWFAP_PAR-MASS            Flag: Mass processing 
    Export Parameters        
    WORKFLOW_RESULT     LIKE      BDWF_PARAM-RESULT          Final value of method          
    APPLICATION_VARIABLELIKE      BDWF_PARAM-APPL_VAR  Variable to be used by 
    IN_UPDATE_TASK      LIKE      BDWFAP_PAR-UPDATETASK       Flag: Application has 
    CALL_TRANSACTION_DONLIKE      BDWFAP_PAR-CALLTRANS        Flag: Application 
    tables
         IDOC_CONTRL         LIKE      EDIDC                       Control record (IDoc)       
    IDOC_DATA              LIKE      EDIDD                       Data record (IDoc)          
    IDOC_STATUS          LIKE      BDIDOCSTAT           ALE IDoc status (subset of al
    RETURN_VARIABLES    LIKE      BDWFRETVAR    Assignment of IDoc or documen
    SERIALIZATION_INFO  LIKE      BDI_SER                Serialization objects for one
         Source code
    FUNCTION ZASHOKMODULE.
    ""Local interface:
    *"  IMPORTING
    *"     VALUE(INPUT_METHOD) LIKE  BDWFAP_PAR-INPUTMETHD
    *"     VALUE(MASS_PROCESSING) LIKE  BDWFAP_PAR-MASS_PROC
    *"  EXPORTING
    *"     VALUE(WORKFLOW_RESULT) LIKE  BDWF_PARAM-RESULT
    *"     VALUE(APPLICATION_VARIABLE) LIKE  BDWF_PARAM-APPL_VAR
    *"     VALUE(IN_UPDATE_TASK) LIKE  BDWFAP_PAR-UPDATETASK
    *"     VALUE(CALL_TRANSACTION_DONE) LIKE  BDWFAP_PAR-CALLTRANS
    *"  TABLES
    *"      IDOC_CONTRL STRUCTURE  EDIDC
    *"      IDOC_DATA STRUCTURE  EDIDD
    *"      IDOC_STATUS STRUCTURE  BDIDOCSTAT
    *"      RETURN_VARIABLES STRUCTURE  BDWFRETVAR
    *"      SERIALIZATION_INFO STRUCTURE  BDI_SER
    data: begin of w_data occurs 0.
           include structure edidd.
    data: end of w_data.
    data: wa_data like ZASH1.
    data : i_data like standard table of wa_data initial size 0.
    *tables : zhemal1.
    data : begin of wa_zhemal1.
            include structure zhemal1.
    data : end of wa_zhemal1.
    data : i_ZHEMal1 like standard table of wa_ZHEMal1 initial size  0.
    read table idoc_data with key SEGNAM = 'ZASH1'.
    loop at  IDOC_DATA into  W_DATA where segnam = 'ZASH1'.
      WA_DATA = W_DATA-SDATA.
      wa_data  = w_data-sdata.
      append wa_data to i_data.
    endloop.
    MOVE IDOC_DATA-DOCNUM TO IDOC_STATUS-DOCNUM.
        IDOC_STATUS-MSGID = 'ZABC'.
        IDOC_STATUS-STATUS = 53.
        IDOC_STATUS-MSGTY = 'S'.
        IDOC_STATUS-MSGNO = '001'.
        APPEND IDOC_STATUS.
    LOOP AT i_data into wa_data.
    wa_ZHEMal1-VBELN = wa_data-VBELN.
    wa_ZHEMal1-POSNR = wa_data-POSNR.
    wa_ZHEMal1-MATNR = wa_data-MATNR.
    wa_ZHEMal1-MATWA = wa_data-MATWA.
    wa_ZHEMal1-MATKL = wa_data-MATKL.
    append wa_ZHEMal1 to i_ZHEMal1.
    insert ZHEMal1 from table  i_ZHEMal1 accepting duplicate keys .
    ENDLOOP.
    ENDFUNCTION.
    For Out bond  Steps are
    1.     Create segment
    2.     Create Type
    3.     Create Message Type
    4.     Assign message Type to Idoc Type.
    5.     Create Port
    6.     Define Logical systems.
    7.     Define Partner profile.
    8.     Create a Report program.
    Report program Out bond
    REPORT ZASH1 .
                  Outbound standalone idoc creation                      *
    Program Name : Y_VENMAST_OUTBOUND_STANDALONE                         *
    Description  : Outbound standalone idoc creation for training        *
                   to Unilever offshore team members                     *
    Created by   : Satyam Computer Services Ltd.                         *
    Created on   : 04.01.2002                                            *
                           Modification Log                              *
    Developer           Date            Transport #   Details            *
    Subramony         04.01.2002                                         *
    Tables Declaration                                                   *
    TABLES : zhemal1.
    Internal table declaration                                           *
    data : i_zhem1 Like standard table of zhem1 with header line.
    data : control_record_out like edidc.
    *data: p type p decimals 2,
         c(10) type c.
    start-of-selection.
        p = '3.14'.
        c = p.
        overlay c with '0000000000000'.
      write c.
    DATA : BEGIN OF I_EDIDD OCCURS 0.
            INCLUDE STRUCTURE EDIDD.
    DATA : END OF I_EDIDD.
    DATA : BEGIN OF I_EDIDC OCCURS 0.
            INCLUDE STRUCTURE EDIDC.
    DATA : END OF I_EDIDC.
    DATA : BEGIN OF I_zhemal1 OCCURS 0,
                VBELN LIKE zhemal1-VBELN,
                POSNR LIKE zhemal1-POSNR,
                MATNR LIKE zhemal1-MATNR,
                MATWA LIKE zhemal1-MATWA,
                MATKL LIKE zhemal1-MATKL,
           END OF I_zhemal1.
    SELECT-OPTIONS : S_vbeln FOR zhemal1-vbeln .
    START-OF-SELECTION.
      PERFORM F_GET_zhemal1.
    END-OF-SELECTION.
    Building Control record
    CONTROL_RECORD_OUT-MESTYP = 'ZASH1'.
    CONTROL_RECORD_OUT-IDOCTP = 'ZASH1'.
    CONTROL_RECORD_OUT-RCVPRT = 'LS'.
    CONTROL_RECORD_OUT-RCVPRN = 'ZASH1'.
    CONTROL_RECORD_OUT-sndPRT = 'LS'.
    CONTROL_RECORD_OUT-sndPRN = 'ZASH1'.
    PERFORM F_PROCESS_OUTPUT.
    *PERFORM F_FILL_EDIDD.
    PERFORM F_CREATE_IDOC.
    Form  F_GET_Y1COTU110                                                *
    FORM F_GET_zhemal1.
      SELECT VBELN  POSNR MATNR MATWA MATKL
             FROM ZHEMAL1
             INTO TABLE I_ZHEMAL1
             WHERE VBELN IN S_VBELN.
    ENDFORM.                    " F_GET_zhemal1
    Form f_process_output                                                *
    FORM F_PROCESS_OUTPUT.
      LOOP AT I_zhemal1.
      I_zhem1-VBELN = I_zhemal1-VBELN.
      I_zhem1-POSNR = I_zhemal1-POSNR.
      I_zhem1-MATNR = I_zhemal1-MATNR.
      I_zhem1-MATWA = I_zhemal1-MATWA.
      I_zhem1-MATKL = I_zhemal1-MATKL.
      i_edidd-segnam = 'ZASH1'.
        i_edidd-sdata  = I_zhem1.
        append i_edidd.
        clear i_edidd.
      ENDLOOP.
    ENDFORM.                    " f_process_output
    Form  f_create_edidc                                                 *
    FORM F_CREATE_IDOC.
      CALL FUNCTION 'MASTER_IDOC_DISTRIBUTE'
           EXPORTING
                MASTER_IDOC_CONTROL            = CONTROL_RECORD_OUT
           TABLES
                COMMUNICATION_IDOC_CONTROL     = I_EDIDC
                MASTER_IDOC_DATA               = I_EDIDD
           EXCEPTIONS
                ERROR_IN_IDOC_CONTROL          = 1
                ERROR_WRITING_IDOC_STATUS      = 2
                ERROR_IN_IDOC_DATA             = 3
                SENDING_LOGICAL_SYSTEM_UNKNOWN = 4
                OTHERS                         = 5.
      IF SY-SUBRC <> 0.
        MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
        WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ELSE.
        LOOP AT I_EDIDC.
          WRITE :/ 'IDoc Generated  :' , I_EDIDC-DOCNUM.
        ENDLOOP.
        COMMIT WORK.
      ENDIF.
    ENDFORM.                               " f_create_idoc
    Please reward if useful.

  • User Exit-Idoc extension customising

    Hello all,
    Can anyone tell me how I can establish a Link between a Basic idoc type and Idoc Extension?
    I wrote a INCLUDE programme in the USER EXIT SAPLVV01.
    I really appreciate your help.
    Note: Points for sure.
    Thank you

    Joslyn-
    The link between Basic IDOC type and IDOC extension is done in the partner profile first (WE20). After you have created an extension for your IDOC, you need to provide the same under Extension IDOC type in the outbound parameters of partner profile.
    I am not sure about your requirement but from the user exit you are using, I guess you have more than one extension for customer master IDOC and you want to choose one based on certain parameters. The import and tables parameters of this exit should provide you enough information to do the same.
    Let us know with specific questions if you need more info.
    KK

  • IDOC extension with SAP Upgrade

    Hi,
    I'm using IDOC extension in my scenario. I just concern that if one day my company decides to update SAP into a newer version. Would that has any impact on my IDOC? Becasue in T-Code: WE82 that I use to assign IDOC extension, there is a field for SAP Release version. If Release version is changed, Do I have to come to this T-Code and add my extension to the new release?
    Thanks,
    Pavin

    Hi,
    From Release 4.0 the IDoc type is identified via the basic type  and extension  fields and no longer via the DOCTYP field. Therefore, the different identification fields must be assigned to each other so that new extensions can be used for communication with older releases.
    IDOCTYP and CIMTYP must be converted to DOCTYP in the following cases:
            You are communicating with an R/3 System with Release 3.0/3.1.
            You or your business partner are using an EDI subsystem with an older release status.
            You are communicating with an R/3 System with Release 2.1/2.2 or an R/2 System which has defined and therefore u201Crecognizesu201D your extended IDoc type (as a former intermediate structure). This case is extremely rare.
    You can convert the fields in the IDoc type editor (transaction WE30) with which you have defined your 4.X extension (Environment ® Conversion ® IDoc type).
    Hope this link helps u...
    http://help.sap.com/saphelp_nw04/helpdata/en/dc/6b7f2f43d711d1893e0000e8323c4f/frameset.htm
    Edited by: anil sasidharan on Mar 3, 2009 11:04 AM

Maybe you are looking for

  • Creation of Cost Element in trading Company

    Hi, Ours is Trading company. We do not manufacture any products and hence we don't have production or process orders. Should we create price difference (due to difference in goods receipt and invoice receipt) and Cost of goods sold G/Ls as cost eleme

  • In CRM relationship appends the Changed partner function in R/3 -Middleware

    Hi Experts, Partner functions in R/3 are mapped as relationship categories in CRM and the transfer is happening through middleware. However if I change the BP for an existing partner function in R/3, it is not changing the BP in corresponding relatio

  • Insertion of new record

    hi i hav ea table containing coulmns con_loaditem_id, quantity,load_id i make a form on this table containing load item name with non database item i want to store in the quanatity field of the table the quantity of load item like bullb for 23, fan f

  • Will iTunes run on Windows Pro 8?

    I am new to Apple products. Just purchased an ipad. I would like to have itunes installed on my laptop. My laptop is running windows pro 8. I am not sure if I can install apple itunes on a windows laptop? Also would I be able to use icloud with windo

  • EXEC SQL CONNECT .. ALTER AUTHORIZATION

    Hi, I need your help regarding following issue.... I am using below statement to alter user password from my application ALTER USER uid IDENTIFIED BY pwd Now I have requirement to use following statemen to replace ALTER USER EXEC SQL CONNECT: uid IDE