Extension of generated Idocs types

hello,
does anybody knows why I can not create extension of generated (means in table EDBAS-GENERATED = 'X') idocs?
I tried to extend idoc BATMAS03 on R/3 Ecc 6 and got message:
message e099(b1) with
         'Action is not possible for generated idoctypes'
In former version of R/3 4.6C it was possible to extend such IDoc BATMAS02 (generated one) without any problems.
Of course I found in program MSED5F02  in routine CREATE_EXT_STRUCTURE new (in comparison to 4.6C) extra check which protects against extension of generated IDocs, but I want to get to know what was behind that decision or how to workaround that problem.
Thanks in advance,
Marcin

Hi,
User Exits are used to populate data in new segments added and to read them
back which provides extension to existing idocs.
IDOC EXTENSIONS
SAP delivers Basic IDOC types such as DEBMAS02, MATMAS02, ORDERS02, and WMMBID01. By extending the Basic IDOC type, you are actually creating a new IDOC type. You create a new segment with the additional fields. This new segment has to be associated with one of the existing Basic IDOC segments. Then you create a new extension type, which is associated with the Basic IDOC type. This results in a new IDOC type. In order for ALE function modules to relate to this new IDOC type, the IDOC type is linked to the corresponding message type. Note that you should not add fields to existing segments but should create a new segment and associate it with an existing segment. This, in a nutshell, is the process of creating IDOC extensions.
In our example, the Basic IDOC type DEBMAS02 is used to communicate Customer Master data to the SAP Customer Master application. Even though the application has a screen to enter and store a contact personâs business address (see Figure 1), DEBMAS02 does not have a segment or fields that communicate the contact personâs business address. If your business requires that this business address be communicated to the other system through the ALE interface for Customer Master, then you have to extend the DEBMAS02 IDOC type, and enhance the corresponding ALE function module.
In DEBMAS02 the contact person fields are present in segment E1KNVKM and the business address of the contact person is stored on the SADR SAP table. You need to create a new segment, Z1SADRX, that is associated with E1KNVKM. This will be done in the process of creating an extension type ZDEBMASX. This extension type will then be associated with a new IDOC type, ZDEBMASZ. IDOC type ZDEBMASZ will be linked to message type DEBMAS for Customer Master. The final step in the IDOC extension process is to check the new objects. This check also verifies the structural integrity of the IDOC type. Letâs look at each of these steps in more detail.
1. Create an Extension Type and a New Segment.
First, 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.
Pls reward helpful points.
Regards,
Ameet

Similar Messages

  • How to extend Generated Idoc types?

    I want to create Idoc type ZMRESCR01 as an Extension of Basic Idoc type MRESCR01.
    I have created the Segments that I want to add to the Basic type using transaction WE31.
    When I try to extend the Basic Idoc type with transaction WE30, the error message "Action is not possible for generated idoctypes" appears.
    In Note 913901, I have read that I can extend this Basic type using transactions BDFG and BDBG, but I can't find any documentation about how to do it.
    Can you point me to any documentation or show me how to extend Generated Idoc types?
    Reward points are waiting for responses.

    Hello,
    I will answer my own question.
    After sending an OSS note to SAP, this is what they answered (my words):
    The error is not that in most recent releases extension of generated Idoctypes is not allowed. The error is that in previous versions it was possible to extend such Idoctypes!
    In fact, Note 913901, corrected this error. So, what you have to do if you want to extend this Idoctype is:
    1. Copy the BAPI of the method I want to extend (For me, it is BAPI_RESERVATION_CREATE) and modify it, adding the new fields.
    2. Use transaction BDBG to create a new ALE interface. Then a new Idoctype, new Inbound and Outbound Function Modules and new Message will be created for my new BAPI.
    This is the Note I created: 0001040039.
    As for the documentation on transaction BDBG, they provided me a link to the Sap help:[http://help.sap.com/saphelp_nw70/helpdata/en/78/21740f51ce11d189570000e829fbbd/frameset.htm|http://help.sap.com/saphelp_nw70/helpdata/en/78/21740f51ce11d189570000e829fbbd/frameset.htm].
    I hope this helps someone,
    Narcís Abio

  • Pls send step by step procedure to create generated idoc type in ECC 6.0

    Hi
    pls send me the step by step procedure In ECC 6.0 Version
    1) To create generated idoc type
    2) To extended idoc type
    3) How we can add structure to custom segments
    thanks in advance

    hi,
    check these likns...
    ALE/ IDOC
    http://help.sap.com/saphelp_erp2004/helpdata/en/dc/6b835943d711d1893e0000e8323c4f/content.htm
    http://www.sapgenie.com/sapgenie/docs/ale_scenario_development_procedure.doc
    http://edocs.bea.com/elink/adapter/r3/userhtm/ale.htm#1008419
    http://www.netweaverguru.com/EDI/HTML/IDocBook.htm
    http://www.sapgenie.com/sapedi/index.htm
    http://www.sappoint.com/abap/ale.pdf
    http://www.sappoint.com/abap/ale2.pdf
    http://www.sapgenie.com/sapedi/idoc_abap.htm
    http://help.sap.com/saphelp_erp2005/helpdata/en/0b/2a60bb507d11d18ee90000e8366fc2/frameset.htm
    http://help.sap.com/saphelp_erp2005/helpdata/en/78/217da751ce11d189570000e829fbbd/frameset.htm
    http://www.allsaplinks.com/idoc_sample.html
    http://www.sappoint.com/abap.html
    http://help.sap.com/saphelp_erp2004/helpdata/en/dc/6b835943d711d1893e0000e8323c4f/content.htm
    http://www.sapgenie.com/sapgenie/docs/ale_scenario_development_procedure.doc
    http://edocs.bea.com/elink/adapter/r3/userhtm/ale.htm#1008419
    http://www.netweaverguru.com/EDI/HTML/IDocBook.htm
    http://www.sapgenie.com/sapedi/index.htm
    http://www.allsaplinks.com/idoc_sample.html
    ALE/ IDOC/ XML
    http://www.sapgenie.com/sapgenie/docs/ale_scenario_development_procedure.doc
    http://www.thespot4sap.com/Articles/SAP_XML_Business_Integration.asp
    http://help.sap.com/saphelp_srm30/helpdata/en/72/0fe1385bed2815e10000000a114084/content.htm
    IDOC Convertion
    /people/kevin.wilson2/blog/2005/12/07/changing-fields-in-an-idoc-segment
    regds,
    paras

  • How to extended Generated IDoc type of MRESCR01 (Material Reservation )

    Hi Experts ,
    My scenario :  I am receiving  Material reservation data from SAP PI team , There is some extra fields .
    My approach  1 . I have to extended the basic idoc MRESCR01 , here is problem 'Action is not possible for generated IDoc types'  .
    I have seen many posts for the same but  I did nt get proper post for the same .
    and also how to create ALE -BAPI interface by using BDBG , Please help this scenario .
    Thanks ,
    Jay.

    Solution : new Message Type (By reducing MATMAS)

  • Extend generated Idocs

    Hi,
    I extended the MARA table with a new field. Now I want to export the article data including the new field via the IDOC-Type ARTMAS05. So I need to extend the IDOC-Type but thats not possible via WE30 because ARTMAS05 is a generated IDOC-Type (see SAP Note 91390). I couldn't find any clear documentation about how to extend generated IDOCs and add new fields.
    So my questions are:
    How can I extend the IDOC ARTMAS05?
    How can I add new segments to the IDOC for my new field in the MARA table?
    Hope somebody can help!
    Mathias

    Hi Mathias,
    Try these linkss:
    Extension of generated Idocs types
    How to extend an existing IDOC!
    Re: Modifiy a generated IDOC (basic) type - HOWTO REGENERATE IDOC?
    In this link search for extended idoc type and search the Function module attached
    idoc issue - canbe fixed with enhancement?
    Thank you,
    Thanks,
    AMS

  • 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

  • Issue in Extension of ARTMAS05 IDoc

    Hi Experts,
    We need to extend the standard IDoc ARTMAS05 to add 70 user specific fields.
    when i'm doing the extension in WE30, i'm getting the below error.
    " Action is not possible for generated IDoctypes"
    in SAP Note 913901 , it says that we can't extend the genarated IDoc types.
    " The extension concept for interfaces in Transactions BDBG and BDFG does not
    work with extensions for the IDoc types created using Transaction WE30.
    When you create extensions in Transaction WE30, the system does not check
    whether the IDoc type for which you are creating the extension has been
    generated.
    You cannot create an extension for a generated IDoc type."
    Please suggest what is the alternative way to extend.
    thanks in advance
    Rahul
    Edited by: Rahul Gautam on Feb 18, 2010 12:01 PM
    Edited by: Rahul Gautam on Feb 19, 2010 3:59 AM

    Hi Anup,
    Thanks for replying. But as per my requirement i have to extend the standard Idoc type ARTMAS05. And as per my understanding BAPI_IDOC_INPUT1 will works and it will trigger another inbound FM inside it. And my requirement will not allowing me to copy the standard IDoc to ZIDoc
    Please reply is there any other option to Extension ARTMAS05.
    Thanks
    Rahul

  • IDOC Type PEXR2002: Txn F110

    Hi Idoc Gurus,
    I have to trigger the IDOC PEXR2002 type for payment run transaction F110.
    I know there is this program RFFOEDI1 which does this job.
    My questions are :
    1) Do I have to create a Outbound Processing type ? Or it is not required as the program already does the job ?
    2) Are all relevant data populated by that program ?
    3) If I have to populate the Z-extensions of the IDOC type PEXR2002, then which is the user-exit I should use ?
    Any hints will be greatly appreciated.
    Regards,
    Sandip.

    Check the links -
    https://forums.sdn.sap.com/click.jspa?searchID=2815420&messageID=3492865
    Outbound PEXR2002
    Regards,
    Amit

  • POS outbound profile (Idoc type u0096 WP_PLU02)

    Hi all
    I have facing problem when I have flow data from sap to pos –
    Problem- there is one article that not listed to a site but when I m flowing article  with the help of wpma Idoc of this article is also generated for the particular site and flow data to that site
    I want if article is not listed to site then idoc will not generated
    Idoc type – WP_PLU02

    Hi Justin,
    key of the record WP_PLU IDoc is the article number and unit of measurement. This is always transferred with the main EAN/UPC (MARM-EAN11 in the article master data). All additional EAN (from table MEAN in the article master data) are transferred in the WP_EAN Message. There is no option to include additional EAN/UPCs into the WP_PLU IDoc.
    This approach works well as long as the POS system uses a similar data model with PLUs (with the key of the main EAN/UPC) and cross reference UPCs in a separate table.
    However if your POS system requires a PLU per EAN/UPC it would be necessary that the middleware between SAP Retail and POS creates these records as a combination of the WP_PLU and WP_EAN messages. In this case it would be required that the POS Outbound creates a WP_EAN message each time when a WP_PLU message is created and vice versa.
    The creation of this additional message can be controlled by the Parameter TWPFI-EAN_ART.
    Regards Carsten

  • How to create an extension for generated type idoc

    Hi all,
    Can u please look into this
    How to create an extension for generated type idoc ?  for example Idoc type BATMAS02

    Enter transaction WE30 (ALE->Extension-> IDOC types->Maintain Idoc type)
    - Type in your name of the extended IDOC type (usually starting with 'Z') and click on the Basic IDoc type, click the create icon.
    - Click on Create new and enter a description and press enter.
    - Click on ZIDOCTYPE01 and then on the Create icon.
    - Enter ZIDOCTYPE as the segment type, 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 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 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.
    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

  • ORDERS05 Idoc Type Extension

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

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

  • Message type for generating IDOC  for SUBCONTRACTING PURCHASE ORDER

    Hi All,
    I have to generate IDOC for PO creation or change .
    I am using IDOC_OUTPUT_ORDERS and IDOC_OUTPUT_ORDCHG.
    The messagetype.idoctype  I am using is  ORDERS. ORDERS05  and ORDCHG. ORDERS05.
    Now the confusion is regarding whether  this message type will work in case of SUBCONTRACTING PURCHASE ORDER as well ?
    As I have gone through some websites and came to know that I will have to use PORDCR1.PORDCR102 specially for subcontracting.
    And programs we need to use is BUS2012_ICH_R3 instead of  RSNASTED and Form Routine SEND_PORDCR1 instead of EDI_PROCESSING.
    Purchase Order Collaboration scenario - Not generating IDOC in ECC
    http://www.erpgenie.com/faq/edi_purchasing.htm    on this site question no  8.
    Subcontract PO IDOCs
    I hope your experience will help me .
    Please reply ASAP.
    Edited by: uttam27 on Dec 4, 2011 1:47 PM

    There is a generic function to create change pointers for all message typs - 'CHANGE_POINTERS_CREATE_DIRECT'.  This is triggered only if you configure your message type to create change pointers from BD50.
    Once you activate it do any change to orders you can see change pointer tables BDCPV filled. Then BD21 will read the changes and generated outbound idocs accordingly.

  • Which iDOC Type for Credit/Debit notes generated from SD Module ?

    Hi,
    We are implementing an EDI Solution for SD Invoices which would involve sending EDIFACT Messages generated out of mapping the SAP iDOC TYPE INVOIC02 to the EDIFACT fields.
    We also have to send Credit and Debit Notes generated from SAP in the SD Module in the same path. We are currently planning on using INVOIC02 for doing this.
    My Question: Is this the proper approach ? We don't want to use the Credit / Debit advises in FI-GL to post to Credits to Customer Account.
    Is there any other iDOC Type or message type that we should be using for SD Credit/Debit Notes ?

    Hi Mahesh,
    Thank you for your help.
    In my client location data is posted non-sap to sap through SAP XI/PI.
    so i need to tell the xi guy to which IDOC is used for this interface and technical names.
    Can you help me.

  • Idoc Types with customer extension in XI

    Hello,
    I have a question / problem.
    Is it possible to import an IDOC Type like HRMD_A06 with an customer extension like ZRMD_A06 into XI ?
    I have no idea how that could works ...
    Thanks for your feedback !
    Regards
    Florian

    Hi,
    You can import IDoc structure with extensions also. It will be same as importing normal idoc structure.
    We have done many like that in our project.
    What is the problem you are facing ?
    Regards,
    Sridhar

  • Idoc types that generate the log files

    Hi All,
    Can anybody provide me the list of IDOC types that generated application log files.
    As I found that material master IDOCs generate log files. Is there IDOC types other
    than material master that generate log files.
    Regards,
    Azra.

    Hi Azra,
    You can tell whether an IDOC does create the application log from the function module it uses.
    Go to SE37, and type in IDOC_INPUT_<message_type> for inbound or IDOC_OUTPUT_<message_type> for outbound, and search for any function module which start with 'BAL_'. If you can find it, then it creates application log files.
    Regards,
    Lim...

Maybe you are looking for

  • How to use the :$PROFILE$ token in a table validation value set

    Hi Community, Let me explain the scenario. We have a Flex Value Set (CLIENTES SERVICIO DIRECTO) with a table validation, included in the PO Headers DFF, which shows a LOV with the Ship-to addressfrom the customer which we want to serve the goods; i.e

  • How can I tell if my HD is too full to work?

    I thought my 17"MBP (purchased from Apple in Sept. 2009) hard drive had died. I've been hearing the scraping, squeaking, knocking, scratching sounds for over a year but never tried to figure out what it was. One night I was typing in a MSWord for Mac

  • Using a Value index on XMLIndex path table.

    I am trying to understand how to capitalize on the VALUE index created on a XMLIndex path table. So far, I have not been able to successfully use it. I am not sure whether I am misunderstanding the way it is intended to be used? Or am making a mistak

  • Enhancement related to tax

    Dear All, I have a requirement of creating an enhancement which will help me to copy the value in REF key field of Cost line item to the corresponding tax line items in FB60 T-code. Like if the Administrative Cost is having REF key value as a1b2c3, i

  • Problem deploying JDeveloper files

    Hi, I'm new to jdeveloper, and i'm having some problem deploying the applets that the wizard makes, i deployed the files into a zip and when i unziped them, the html file that was in the zip keeps comming up with can't find package.test.class (packag