Extension of idoc CRMXIF_PARTNER_SAVE_M03

Hi I am new to CRM, can we do an extension to the  Idoc: <b>IDOCCRMXIF_PARTNER_SAVE_M03</b> please let me know about it

Hi,
the EEWB is used to add fields to standard objects. The tool will enhance the system so that the added field can be used in all GUI's and synchronised across all linked systems. Search through this forum on the 'EEWB' topic and you'll already find most answers you need. I believe also some weblogs exists on the topic.
--> the tool is pretty self-evident to use, just start the wizard in transaction eewb and the system will guide you through it.
Once the EEWB is finished, you can use transaction BDFG to generate a new idoc type. select goto>>display available interfaces from the menu, find the interface you want (eg. partners) and click the generate button. The system will ask you for a package, some names for function modules & message types. Generate all in the customer namespace (Z*) and ignore the warning messages of the system. Once generated, the idoc can be used.
--> There's a XIF configuration guide that describes in detail how to configure the system for using the new idoc type.
Michael.

Similar Messages

  • Extension of idoc for IBASE

    Hi all,
    my requirement is to extend the IDOC for replicating IBASE component to a non SAP system.
    So I have created a Z idoc via trx code WE30. Then I created a Z segment via trx code WE31. Once I had these I went to trx code WE30 and I selected extension in order to create an extension Z, which I included in my IDOC: ZIBASE_MQSERIES.
    The extension is called: ZIBASE_MQSERIES10.
    So I went to TRX code WE82 and I associated the following:
    Message type                           Idoc Base                           Extension
    CRMXIF_IBASE_SAVE_M         ZIBASE_MQSERIES           ZIBASE_MQSERIES10
    Unfortunately I cannot see in my IDOC structure my brand new fields.
    Should I suppose to enhance the FM for outbound replication, via user- exits?
    The fact is the brand new segment Z105_CUSTOMER_FOR_POD must be populated via BADI CRMXIF_IBASE_MAP, through the method IF_EX_CRMXIF_IBASE_MAP~CHANGE_MAPPED_DATA_OUT.
    Unfortunately navigating through the structure  CS_DATA_MAPPED of badi CRMXIF_IBASE_MAP, I cannot see my brand new segment Z105_CUSTOMER_FOR_POD, which actually contains 5 brand new fields.
    Where is the problem?
    Please help, I'll assure points as usual.
    Best regards,
    AndreA

    Just as I haven't received any answers, I declare this post closed

  • Problem with extension of idoc in XI

    Hello All,
    I've extended an Idoc in R/3 with new segment.
    That new idoc extension i've mentained in t/code IDX2
    Also, i've imported the new extended idoc in XI in IR.
    Next i've done the related mapoping for the new segment in IR.
    In ID, do i need to change the old idoc name with new extension idoc which i'm using in the Receiver Agreement
    After doing all these above modifications..i've receving the below mentioned error message
    - <SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="">
      <SAP:Category>XIAdapter</SAP:Category>
      <SAP:Code area="IDOC_ADAPTER">ATTRIBUTE_IDOC_METADATA</SAP:Code>
      <SAP:P1>I::000</SAP:P1>
      <SAP:P2 />
      <SAP:P3 />
      <SAP:P4 />
      <SAP:AdditionalText />
      <SAP:ApplicationFaultMessage namespace="" />
      <SAP:Stack>Error: I::000</SAP:Stack>
      <SAP:Retry>M</SAP:Retry>
      </SAP:Error>
    Pls. let me know how i need to proceed further.
    Thanks in advance!!!
    Regards
    Prasad

    Hello Prasad,
    Go through these discussions....
    <IDOC_ADAPTER> ATTRIBUTE_IDOC_METADATA
    Re: ERROR: "IDOC_ADAPTER" / "ATTRIBUTE_IDOC_METADATA"
    File2IDoc Adapter Error
    Hope the above links are very helpful to you..
    Thanks,
    Satya Kumar

  • Extension of IDOC

    Hi Guys,
    I am working on IDOC Extension..
    My quesry is i have 3 different structure to be extended for 3 different reciever system in PI.
    Based on some conditon i will select one of these 3 structure and that wil go to PI.
    Can we add these 3 diffrent structes to a standard IDOC coz as far as i know in extension we can add only fields..
    Can someone  let me know hw to add structures to a standard IDOC.
    If i am able to add 3 structures..and if i am interested in first structure then only first structure should go, the rest should be diabled.
    please help guy
    Sahil

    Hi sahil raza  
    You extended the idoc type and use the same structure .
    Based on your senario you pass the value to fields in segments...(Dont make extended segment as mandatory....)
    whey you need 3 structures....That is not good practice to have one senario one structure based on your Logical system....
    Thanks
    Ramesh

  • Extension of Idoc in XI

    Hello,
    I've extended the Idoc by adding a new segment in R/3.
    Now, i need to integrate that new Extended idoc in XI.
    Do i need to chagne the Idoc type in IDX2?
    Please let me know how to proceed further in XI.
    What are all steps i need to modify in XI.
    Thanks in advance!!!
    Awaiting yourr reply!
    Kind Regards
    Prasad

    Hi,
    You need to add Mesage Type to the Extended IDoc.
    Add message Type to the Extended IDoc in Transaction WE82.
    Please follow steps in Transaction WEDI to extended the IDoc.
    In WEDI Transaction --> Go to DEVELOPMENT
    and follow all the below steps:
    IDOC Segemnts -- WE31
    IDOC Types -
    WE30
    Message Types -
    WE81
    IDOCType/Message Types --- WE82
    For Outbound Processing
    Create Process Code --- WE41
    For Inbound Processing
    Register Function Module --- BD51
    Assign Function Module,Message Type to IDOC Type -- WE57
    Create Inbound Process Code --- WE42.
    Please follow above mentioned Steps.
    Now IDOC will be available in XI to import
    Problems with Extended Idocs
    Some Experience on IDoc Enhancement
    Regards
    Seshagiri

  • EXTENSION of IDOC  DELVRY03, need correct exit

    Hi,
    Can anyone give me user exit for delvry03 to extend the IDOC as I know there is one available which is EXIT_SAPLV56K_002.
    I did put break point in the exit in function module but when I create a dummy scenario in WE19 and trying to do the Standard output processing it's generating an IDOC instead of going to exit. Please let me know if I am missing something or this is not the right exit.
    Thanks & Regards
    Rinku
    Message was edited by:
            Rinku Malik

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

  • Extension does not exist : File - XI - IDOC

    Hello,
    I have an IDOC MATMAS03 with an extension, so called
    MATMASA03.ZMATMASX
    IDX2 - metadata upload done more than once ! OK
    mapping from file to IDOC: test ok (Name of Interface ZMATX.MATMAS03.ZMATMASX)
    config: test of communication from file system to R/3 with IDOC payload: OK
    Process running results in an error:
    Attribute IDOC Metadata,  Extension ZMATMASX does not exist.
    System is running on SP14!
    Does anybody here have experience with extensions in IDOCs or knows about this problem?
    Lot of thanks for any help!
    regards
    Dirk

    Hi Dirk,
    you can also have a look at idoc receiver channel
    PORT: SAPXXX
    is this the same port that you have your idoc metadata
    downloaded in IDX2 ?
    worth to check I guess 
    Regards,
    michal

  • 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>

  • 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

  • ALE partner profile setup for diff. IDOC extension

    Hi,
    We have three extensions of IDOC type HRMD_A06 and message type HRMD_A. In one of the extensions segment IT0002 is extended.
    In the partner profile extension is not specified. Due to this when the IDOC is generated Custom segment is not getting picked up.
    I pu the extension in the partner profile then it woks fine.
    But I do not want disturb the existing profile setup. Is there any option in WE20 where we can define two profiles with one message type, basic type and different extensions.
    Also if we define the custom message type then distribution model and the partner profile needs to be generated for the new custom message type.
    Appriciate quick response.
    Regards,
    Sonali

    Hi,
    just check the FM 'BAPI_BUPA_CENTRAL_GETDETAIL'.
    Or just search for oher FMs with BAPI_BUPA*.
    Hope this helps...
    vasanth

  • Idoc basic type and extension copied to new extension now how to trigger

    HI EXPERTS,
    I have copied a basic type and extension of idoc and now my new idoc has extension name say ext1.
    my old extension name is ext .
    now i want to trigger an idoc with ext1 extension ,i do not want to change idoc settings in we20.
    how can i do this ,please some one reply .
    Thanks,
    Pradeep.

    hi nikhil,
    reason is we want two different transport paths ,one team is amking changes to existing things ,i am working on another pahse of project .
    I have almost reached near to the solution .i have set the message variant in we20 ,now when i trigger its generating 2 idocs
    i am trying to write code in exit but in exit there there is no field idoc_mescod or idoc_cimtype
    Kindly suggest!!!1
    Thanks,
    pradeep.

  • Idoc extension with non-mandatory segments

    Hi,
    I have a generic question on extension of IDOCs. If we are creating a child segment of a standard segment in extension, can we create a child as mandatory segment of a non-mandatory parent segment, here parent is some standard/custom segment and child is a custom segment. I have confusion on this as the system allowed on this as how a child segment can arrive in Idoc if parent segment is missing.
    Regards,
    Harsh.

    Referred to WE60 for documentation. Cannot have blank segments while using the test tool WE19. Works fine in real time environment.

  • Regardig the extension of the Idoc

    Hi Experts,
                    We are using an Inbound Idoc.
                  I extended the idoc COND_A, becoz we are having some custom fields in the IDOC.
             For this we have an Exit in the FM IDOC_INPUT_COND_A.
    But the data coming to inbound would be of various tables which contains the custom fields.
          How do i update the data in the database tables.
    For EX table A contains 4 custom fields that are to be updated,table b contains 2
    custom fields that are to be updated.
           How do i do this??
    Thanks and Regards
    Rajesh.

    Hii..
    SAP provides the Function module exits to process the Extended idoc type.
    Check this info...
    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.
    reward if Helpful

  • Help Everyone: IDOC Extension Problem

    Hi All,
    Ive created an idoc extension for idoc type ORDERS01. I appended an extension ZE1EDK01 below header segment E1EDK01. Im trying to populate this through an exit but I cant seem to find the right values for these specifically the segnum and hlevel:
      wa_edidd-MANDT  = SY-MANDT.
      wa_edidd-SEGNUM = '000002'.
      wa_edidd-SEGNAM = 'ZE1EDK01'.
      wa_edidd-PSGNUM = '000000'.
      wa_edidd-HLEVEL = '02'.
      wa_edidd-DTINT2 = '1000'.
    How do I determine the values above?
    Also, I created an extension for item data segment E1EDP01. Im directly modifying the internal table of the IDOC and I want to populate the extension per line item in the idoc. How do I do this? Do I just append entries to EDIDD? How do I ensure that each entry appended corresponds to the correct line item?
    Please help. I really need to finish this in 2 hours.
    Thank you so much.
    Best Regards,
    Kenny

    Hi,
    I get what is the issue here. <b>It is not because of using CASE statement or IF condition in LOOP</b>.
    You are using user-exit EXIT_SAPLEINM_002. This user-exit triggers for each segment added to IDOC. So this is what is happening.
    - Segment E1EDK01 is added then user-exit triggers and it adds ZE1EDK01 segment.
    - Now the next segment is E1EDK14. After this segment also the exit trigges. When you loop at int_edidd the very first segment is E1EDK01 and it again adds ZE1EDK01 segment.
    So, for each segment in IDOC this exit triggers and add segment ZE1EDK01 under E1EDK01.
    <b>The solution is to use user-exit EXIT_SAPLEINM_011 instead.</b>
    This is very last user-exit which trigges in FM IDOC_OUTPUT_ORDERS and it has all the segment in it. So there is nothing wrong with your code but you are using wrong user-exit.
    Let me know if you have any question.
    Regards,
    RS
    Actually Srinivas is also right. If you use the user-exit EXIT_SAPLEINM_002 without using loop command and only using CASE statement it will work. <b>OR</b> you use user-exit EXIT_SAPLEINM_011. Its upto you.
    Message was edited by:
            RS

  • 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

Maybe you are looking for

  • Addign new customer field in Shopping cart SRM with default value

    We have requirement to add new Customer field in Shopping cart (SRM 4.0) and assign a default value to it. We have added the custom field and also assigned default value  'X' to it using BADI  BBP_CUF_BADI_2 method MODIFY_OUTPUT. Problem we are facin

  • How can I cast a char to an object

    My problem is that I am creating an expression tree and the datat that the binary tree holds is generic hence the object. So I when it comes time to take this char from a char arryay and put it in my tree it need to be an object. ex. Object op=  expn

  • Problems abound... help!

    My iPod (w/Click Wheel, 30GB, from 2004)is starting to act up for the first time. It started last Wednesday. I was listening to some songs and halfway through one, it skipped to the next song. I thought perhaps the song was corrupted since it was my

  • URGENT - JBO-33001 with servlet and Thread

    Hi! I'm working with BC4J, oracle AS10g, and Jdev 10g. I make a class that uses bc4j entity objects. It works all fine when I run this class as standalone or in a servlet, but when I run that in a thread called by a servlet, it return this error: ora

  • Paper layout & web layout

    This might be a novice questin but still.. With 9i reports, we are only going to deploy our reports to the web, and there are going to be no client server reports.. In that context, the only layout we are going to be worried about is the web layout,