How to include segments to  standard idoc PEXR2002 ..

How to include the below segments to the standard  idoc PEXR2002 ..
E2EDK02
E2EDK12
I want to map the check number to E2EDK12-BELNR depending on the document number.
I have a recording in shdb..but my real question is it where to have this logic..
Any suggestion would be highly appreciated.
Thanks,

U will have to create IDoc Extension for this.
Goto WE30 select the Radio button Extension.
Link it with the basic Idoc Type.
Then attach the new segments in the IDoc.

Similar Messages

  • How to add a custom segment in standard IDoc?

    Hi,
    I want to add a custom segment in stanard IDoc type (eg. MATMAS). I don't want to go for extended idoc (copying stanard idoc into zidoc and adding custom segment).
    Please tell me.

    Hello
    Transaction BD10 uses fm MASTERIDOC_CREATE_REQ_MATMAS which in turn uses MASTERIDOC_CREATE_MATMAS to create and distribute material master IDocs.
    Fm MASTERIDOC_CREATE_MATMAS belongs to function group MV01 in package MGV. Here you will find the user-exit function group XMGV.
    Perhaps EXIT_SAPLMV01_002 might be useful for you.
    Regards
      Uwe

  • How to Find Out whether Standard IDOC is Availabl for  Transaction ?

    Hi,
        We are having SAP implementation 4.7E IS-OIL. We would like to know how to find out whether is there any Standard IDOC is Available for the SAP Transaction.
    Particularly for IS-Oil related transaction. e.g Load Confiramtion. T-code - O4G1.
        From a Given Transaction code is there any link which can tell whether IDOC is Present or not.
         Kindly help me.
    Regards,
    Umesh

    check for transaction....we41 and we42..
    check for proper process code...then check in we57,we81 and we82..
    also u can search in google..
    UMESH note that u need some fucntional exp for working in IDOC...try to crack yr head ..give time..n u ll get to know the things soon..as there is no defined standards to work in idocs..
    for more info u can ask me for [email protected]
    best regards
    Message was edited by:
            Madan Gopal Sharma

  • How to add zfields in standard IDOC

    Hi Expert,
    How i will add the zfield in standard IDOC
    Regards
    Swaraj
    Edited by: swaraj123 on May 25, 2010 5:36 PM

    Create an extension idoc. there are several threads, blogs/wikis out on sdn. Please search.
    Regards,
    Kiran

  • Restricting the segments in standard Idoc.

    Hi,
    I am using a standard SAP message type ("ORDERS") and sending data to a Middleware system. All the required data is contained within 4 segments in the Standard Idoc ("orders05") .
    Is there any way to ensure that the Standard Idoc only contains the four required segments when it is triggered by the standard system ?
    Thanks,
    Ankit.

    Hi Ankit
    Have tried the filtering through BD59 tcode.
    Neha

  • How to ignore segment occurances in IDoc

    Hi
    I have a IDOC to file scenario.
    How do i ignore the first segment of a multiple accuring segment. For Example if the segment E1EDXX occurs 5 times in the IDOC i have to ignore only the first (segment)occurance and the remaining 4 (segment )occurances shold be mapped to the target
    How can i map this
    Any udf or nodefunctio combination would really be appreciated
    Thanks
    -keerthi

    Hi
    You can try to build an UDF
    //you initialize the array since one.
    if (list.length >=5){
       for (int i =1; i < list.length ; i++)
        { result.addValue(list<i>); }

  • How develop INCLUDE ZXMRMU01 in standard function 'EXIT_SAPLBARM_001'.

    Hi all,
    now in standard have function: EXIT_SAPLBARM_001
    i want develop INCLUDE ZXMRMU01 .
    when i double click INCLUDE ZXMRMU01 have warring 'Program names ZX... are reserved for includes of exit function groups'
    how i create or develop  INCLUDE ZXMRMU01 ??
    how create program and this program know  INCLUDE ZXMRMU01 ??
    pls help me, or step by step doing ...
    thanks so much/Tham.

    hai,
    i thing you have a worning message in your status bar. when you get this warning message simply press enter button it will open.......
    regards,
    jai.m
    points reward for usefull answer....

  • How to see Segment Version in IDoc

    Hi,
    is there any way to see the Segment Version in an IDoc ?
    We had the problem that an old version(Segment) was entered in the WE20(receiverdetermination) and we havent known this.
    any ideas ?
    Gordon

    hi Michael,
    that is not the thing i wanted.
    If you have the newest version in WE31 but you have entered an old release in WE20 outbound parameters. The idoc is filled with the old segment version.
    I only want to see the segment version in the outgoing idoc ?
    IS there a way to see that ?
    I have changed the release in we20 and after that the newest segment version was taken the idoc was ok!
    Gordon.
    Message was edited by: Gordon Breuer

  • How to include or exclude standard function button easily

    Hi everyone,
    When I am doing some coding concerning ALV GRID,I found that there are many standard button on
    the toolbar, and I want maybe 2 or 3 of them to be used,others just not displayed on the toolbar.
    And if I want the others disappeared I should do a lot of append work area to internal table things to
    exclude them ,sometimes it is not easy to figure out that the buttons correspond to which functions.that is not convenient. 
      are there any ways to achieve that?
    thanks for your help.
    Edited by: Aaron Shen on Dec 3, 2008 7:48 AM

    FCODE TYPE  UI_FUNCTIONS,
           WFCODE TYPE UI_FUNC.
    **********EXCLUDING FUNCTION CODE IN GRID TOOLBAR****************
    WFCODE = cl_gui_alv_grid=>mc_fc_loc_copy_row.
       APPEND WFCODE TO FCODE.
      WFCODE = cl_gui_alv_grid=>mc_fc_loc_delete_row.
      APPEND WFCODE TO FCODE.
      WFCODE = cl_gui_alv_grid=>mc_fc_loc_append_row.
      APPEND WFCODE TO FCODE.
      WFCODE = cl_gui_alv_grid=>mc_fc_loc_insert_row.
      APPEND WFCODE TO FCODE.
      WFCODE = cl_gui_alv_grid=>mc_fc_loc_move_row.
      APPEND WFCODE TO FCODE.
    CALL METHOD G_GRID->SET_TABLE_FOR_FIRST_DISPLAY
         EXPORTING
          I_BUFFER_ACTIVE               =
          I_BYPASSING_BUFFER            =
          I_CONSISTENCY_CHECK           =
          I_STRUCTURE_NAME              = 'MARA'
           IS_VARIANT                    = SLAYOUT
           I_SAVE                        = 'U'
           I_DEFAULT                     = ' '
          IS_LAYOUT                     =
          IS_PRINT                      =
          IT_SPECIAL_GROUPS             =
           IT_TOOLBAR_EXCLUDING          = FCODE----
    > pass fcode here
          IT_HYPERLINK                  =
          IT_ALV_GRAPHICS               =
          IT_EXCEPT_QINFO               =
          IR_SALV_ADAPTER               =
         CHANGING
           IT_OUTTAB                     = imara[]
           IT_FIELDCATALOG               = FIELDCAT
           IT_SORT                       = ISORT
          IT_FILTER                     =
        EXCEPTIONS
          INVALID_PARAMETER_COMBINATION = 1
          PROGRAM_ERROR                 = 2
          TOO_MANY_LINES                = 3
          OTHERS                        = 4
       IF SY-SUBRC <> 0.
       MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                  WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
       ENDIF.

  • Adding field in standard IDOC Segment E1EDL24

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

    Hi Naveen,
    We cannot Modify the Standard segments. But we have to Create a new Segment and Add these fields.
    Then Create an Extended Idoc type
    Implement User Exits in Outbound And Inbound ..
    This is the Complete Steps and Info on this...with an Example...
    Enhancing ALE
    For example, if in an outbound interface you find that the IDOC type does not contain all the data you need to pass to the other system, you can extend the IDOC to accommodate the additional fields and enhance the ALE function modules to populate the fields. Similarly, if in an inbound interface, there is additional data that needs to be posted to the R/3 application, you can extend the IDOC type to have additional fields populated by the external system or translator or the other R/3 system and then enhance the inbound ALE function modules to post the additional data to the R/3 application.
    let us use the SAP Customer Master application as an example. Specifically, letâs focus on the IDOC extension and ALE function module enhancement of IDOC type DEBMAS02 and message type DEBMAS (Customer Master) and the IDOC reduction of message type MATMAS.
    IDOC EXTENSIONS
    Letâs first look at the concept of IDOC extension. SAP delivers Basic IDOC types such as DEBMAS02, MATMAS02, ORDERS02, and WMMBID01. By extending the Basic IDOC type, you are actually creating a new IDOC type. You create a new segment with the additional fields. This new segment has to be associated with one of the existing Basic IDOC segments. Then you create a new extension type, which is associated with the Basic IDOC type. This results in a new IDOC type. In order for ALE function modules to relate to this new IDOC type, the IDOC type is linked to the corresponding message type.
    Note that you should not add fields to existing segments but should create a new segment and associate it with an existing segment. This, in a nutshell, is the process of creating IDOC extensions.
    In our example, the Basic IDOC type DEBMAS02 is used to communicate Customer Master data to the SAP Customer Master application. Even though the application has a screen to enter and store a contact personâs business address (see Figure 1), DEBMAS02 does not have a segment or fields that communicate the contact personâs business address. If your business requires that this business address be communicated to the other system through the ALE interface for Customer Master, then you have to extend the DEBMAS02 IDOC type, and enhance the corresponding ALE function module.
    In DEBMAS02 the contact person fields are present in segment E1KNVKM and the business address of the contact person is stored on the SADR SAP table. You need to create a new segment, Z1SADRX, that is associated with E1KNVKM. This will be done in the process of creating an extension type ZDEBMASX. This extension type will then be associated with a new IDOC type, ZDEBMASZ. IDOC type ZDEBMASZ will be linked to message type DEBMAS for Customer Master. The final step in the IDOC extension process is to check the new objects. This check also verifies the structural integrity of the IDOC type. Letâs look at each of these steps in more detail.
    1. Create an Extension Type and a New Segment.
    Determine the fields on table SADR that you are going to provide for in the new segment Z1SADRX. You need fields for name, street, city, region, and country to give the business address of the contact person. You also need fields for the address number. ADRNR is a field in SAP tables such as SADR that uniquely identifies the address of an entity. This field is cross-referenced from other tables to the SADR table to obtain the full description of the address. Because this is an IDOC type for master data, the first field of the new segment will be MSGFN. The message function field informs the receiving system of the action to be taken for that particular segment. In the code that you write for populating the new segment, the value of the message function is the same as that of the parent segment E1KNVKM. In all, you will have 12 fields in segment Z1SADRX (see Table 1).
    To create an extension type and new segment:
    • Use transaction WE30 or from WEDI go to Development -> IDOC types.
    • Enter ZDEBMASX for Object Name.
    • Choose Extension Type.
    • Click on Create.
    • You will see a pop-up screen. Choose Create New, and enter a description. For version 4.x, enter DEBMAS02 in the Linked Basic Type field. Enter.
    • You will see a screen with ZDEBMASX and its description in the first line. Click on this line, and press Create. For version 4.x, expand the tree of segments, and place the cursor on E1KNVKM.
    • You will see a pop-up screen. Enter E1KNVKM as the reference segment. Enter.
    • For 4.x, press Create after placing the cursor on segment E1KNVKM.
    • You will see a line appear with E1KNVKM hierarchically below ZDEBMASX, with a description "Customer Master contact person (KNVK)."
    • Click on this line and press Create. You will receive a message indicating that the new segment being created will be a child segment of E1KNVKM. Enter. A pop-up box appears for the new segment.
    • Enter Z1SADRX as the segment type, 1 for Minimum, 1 for Maximum. Leave Mandatory segment unchecked. These entries imply that there is only one Z1SADRX segment for every occurrence of the E1KNVKM segment, and also that this segment is not mandatory. Note that if the parent segment is not mandatory, then the child segment should not be mandatory, because this could result in a syntax error during the creation or processing of the IDOC.
    • For 4.x, you must first create the IDOC segment Z1SADRX (Iâll explain why in a moment) from the menu path WEDI -> IDOC -> Development -> IDOC Segment.
    • Click on Segment Editor.
    • On the next screen, click on Create.
    • Enter a development class for the object. Enter.
    • This will take you to the screen for segment definition. Enter a description for the segment. Enter the field name, data element, and the data element documentation name. In most cases, all three fields may have the same values. If you are using a field in the segment that is not present in the ABAP/4 data dictionary, you must first create the domain, data element, field, and appropriate documentation before using it in the new segment.
    • Enter these three columns for all 12 fields. Save.
    • Click on Generate/Activate, F3 to step back.
    • From screen Maintain Segment, go to Segment Type -> Release. A checkbox now appears beside the segment definition Z1SADRX (see Figure 2). Check this box. Save.
    • Save again to store the descriptions of the segment, F3 to step back.
    • Save the extension type.
    It is possible to have several new segments with relevant Basic IDOC type parent segments in a single extension type. However, you can form only one IDOC type based on a single extension type.
    2. Create an IDOC Type.
    The next step is to create an IDOC type by associating the extension type that you created with the Basic IDOC type. This is a simple process:
    • From transaction WE30 or WEDI go to Development -> IDOC Types.
    • Enter ZDEBMASZ for Object Name.
    • Click on IDOC Type.
    • Click on Create.
    • Enter DEBMAS02 for Basic IDOC type.
    • Enter ZDEBMASX for extension type.
    • Enter a description.
    • Enter.
    • You will see a display of the composite IDOC type with all segments, including Z1SADRX (see Figure 3).
    It is possible to associate only one extension type with a Basic IDOC type for a given IDOC type. However, you can have multiple new segments in an extension type.
    3. Link IDOC Type to Message Type.
    The next step is to link the new IDOC type to its corresponding message type. This is important, because this relationship is referenced in the partner profile parameters where you specify the message type and IDOC type to be used for that particular representative system. To link the message type:
    • Use transaction WE82, or from WE30, go to Environment -> IDOC Type / Message Type, or from WEDI go to Development -> IDOC Type -> Environment Î IDOC Type / Message Type.
    • Click on Display <-> Change.
    • Click on New Entries.
    • Enter DEBMAS for message type.
    • Enter DEBMAS02 for Basic IDOC type.
    • Enter ZDEBMASX for extension type.
    • Enter your SAP R/3 release number for Release.
    • Save.
    This data is stored on the EDIMSG table and is accessed by several ALE processes to relate the message type to the IDOC type.
    4. Check the IDOC Type.
    Before checking the IDOC type for consistency, it is important to perform another step that releases the extension type to the IDOC type:
    • From WEDI go to Development -> IDOC Types -> Extras -> Release Type, or from transaction WE30 go to Extras -> Release Type.
    • For the Object Name ZDEBMASX and radio button Extension Type, click Yes.
    • The extension type has now been "released."
    You canât edit the extension type once itâs released. To cancel the release for further editing or deactivation, go to WE30 Î Extras Î Cancel release. The final step in the IDOC extension process is checking the validity of the IDOC type:
    • From transaction WE30 or WEDI go to Development -> IDOC types.
    • Enter ZDEBMASX for Object name.
    • Click on Extension Type.
    • From the Development Object menu select Check.
    • Repeat the operation for IDOC type ZDEBMASZ.
    • A check log will be generated for each run with details of correctness or errors (see Figure 4).
    In some situations it is possible to receive errors during the check process, especially segment length errors. The incorrect IDOC segment can be repaired and corrected by executing program RSEREPSG. This program checks the formal consistency and repairs incorrect segments. In test mode it will generate a log of formal correctness for the specified segment only. For the program to repair segments in normal mode, the underlying IDOC structures (DDIC structures) must be active. This program rectifies the lengths of the DDIC structures and not the fields themselves. RSEREPSG can also be used to change the person responsible for the object and the release flag.
    Menu paths may vary slightly depending on the release/version of SAP R/3, but the procedures and the principles are the same.
    ALE FUNCTION MODULE ENHANCEMENTS
    Having extended the IDOC type to contain additional fields for an inbound or outbound application, you now want to enhance ALE function modules for populating the additional segment on the outbound or applying the additional segment data on the inbound application.
    The core working code for ALE processes for a given application area is always encapsulated in ABAP/4 function modules. These function modules are associated with such control information as message types and process codes. So the ALE process checks this control information and derives the name of the function module to invoke for that particular IDOC processing from certain database tables. These function modules contain objects known as customer functions, which can be considered SAP Enhanced user exits. A function module is called at a particular point during the processing of the main program or function module, and it can be used to influence data processing at that point by adding code to the customer function. The customer function behaves like a normal function module and has import and export parameters, tables (internal tables) statement, and exception processing. Unlike a conventional user exit, customer functions give you the ability to modify only data available to you by the function moduleâs parameters and internal tables. While most ALE/EDI function modules are supported by customer functions, there are ALE/EDI processes that still use conventional user exits. There are a few ways to determine which function module to enhance for a given message type/process code:
    • For master data distribution, from SALE go to Extensions -> Master data distribution -> Setup additional data for message types. Search for message type DEBMAS in this example. You see an entry for DEBMAS associated with function module MASTERIDOC_CREATE_SMD_DEBMAS. This data is stored on table TBDME. The function module names for all master data message types follow this pattern: MASTERIDOC_CREATE_SMD_messagetype. This function module calls another function module of name MASTERIDOC_CREATE_DEBMAS or MASTERIDOC_CREATE_messagetype. Search for the words customer function, and you find several hits that can be used to add code to the function module.
    • From WEDI got to Control -> Inbound process codes -> Inbound with ALE service -> Processing by function module (transaction WE42), or from WEDI go to Control -> Outbound process codes -> Outbound with ALE service -> With function module (transaction WE41). There will be function modules associated with the process codes. For inbound, the function modules usually follow this pattern: IDOC_INPUT_messagetype: for example, IDOC_INPUT_CHRMAS for inbound characteristics master.
    • Use transaction WE57 or from WEDI go to Development -> Message/Application Object. The entries list the function module, Business Object, message type, and IDOC type that are used for inbound ALE/EDI interfaces.
    Customer functions are not specific only to ALE and EDI but also to all programs/modules in SAP R/3. Customer function is a SAP enhancement component; the other two types are menu and screen enhancements.
    All customer function exits are maintained in SAP enhancements and are found by using transaction SMOD. After executing transaction SMOD, pull down (F4) on the enhancement name field, and execute again. This provides you with a list of all SAP enhancements available. SAP enhancements are grouped by development class pertaining to an application area. Choose Application development R/3 SD master data distribution for development class VSV to lead to a screen that lists VSV00001 as an enhancement (see Figure 5). Press Component +/- to display its function exit components. There are four possible components listed, all of which are function exits (and are function modules) that are called from the ALE function modules in the form Call Customer Function Î001â. This is a special occurrence of the ABAP statement Call. Go to item Exit_SAPLVV01_ 001, which you need to enhance for the Customer Master outbound example of an IDOC extension. In the ALE-function module MASTERIDOC_CREATE_DEBMAS, the statement CALL Customer Function 001 is translated in the background to call component EXIT_SAPLVV01_001. Although this function exit can be edited using transaction SE37, you will use a simpler approach.
    When you use SAP enhancements and their components, you manage them with an SAP object known as a project, which is like an envelope containing the selected enhancements and their components. A project can be used to control the execution of components and to transport them to other clients and instances in SAP. Basically, the process involves creating a project, including enhancements and components that are to be enhanced, editing the components, and then activating the project. The following process creates a project for our example Customer Master IDOC extension:
    • Execute transaction CMOD.
    • Enter name of project, say CSTMAST1.
    • Click on Create.
    • Enter a description of the project.
    • Save.
    • Click on SAP Enhancements.
    • Enter VSV00001 for Enhancement.
    • Save.
    Once youâve created the project, edit the function exit components and activate the project. Remember that the code in the function exit enhancement will execute only if the project is activated. In fact, this is a convenient SAP enhancements feature, whereby the work in progress (developing code in the customer function) will not affect users of that application. When the code is completed, the project can be activated so the enhanced functionality takes effect. It can also be deactivated for maintenance.
    As mentioned earlier, customer functions (function exits) are embedded in ALE function modules and can be used to influence the creation and modification of IDOC data on an outbound application or to post additional or modified IDOC data to an inbound R/3 application. Function exits are similar to regular function modules, with import/export parameters, tables (internal tables), and exceptions.
    The two important factors to consider while developing the customer function are:
    1. The point in the ALE function module where the function exit occurs
    2. The data made available by the customer function that can be modified or posted to the R/3 application, based on the direction.
    Because some function modules have several customer functions, it is critical to choose the function exit best suited for that particular enhancement. Do not attempt to perform activities that the function exit is not designed for. The importance of this point is illustrated by the following description of enhancing function modules for outbound and inbound ALE interfaces.
    Outbound interfaces. In an outbound ALE interface you use function exits (customer functions) to populate additional segments created by an IDOC extension or to modify the existing IDOC data segments as per business requirements. Previously, you identified that enhancement VSV00001 has a component EXIT_SAPLVV01_001 (function exit), which can be used for populating the additional data segment Z1SADRX that you created in the IDOC extension ZDEBMASX (IDOC type ZDEBMASZ, based on Basic IDOC type DEBMAS02). You also learned that the ALE function module that calls this function exit is MASTERIDOC_CREATE_DEBMAS, which has a statement Call Customer Function 001.
    Browse the function module MASTERIDOC_CREATE_DEBMAS using transaction SE37. You will find that this customer function is invoked for every segment of IDOC type DEBMAS02. In fact, the function exit is called soon after the creation of an existing segment has been populated with data and appended to the IDOC data table (internal table). Also, the function exit is exporting the message type, IDOC type, and the segment name and is importing the IDOC extension type. It is also passing the IDOC data internal table. This indicates that the ALE function module is allowing you to populate additional segments for every existing segment and modify the existing segmentâs data.
    Letâs write ABAP/4 code to accomplish the task of populating IDOC segment Z1SADRX with a contact personâs business address:
    • From SE37, display function module MASTERIDOC_CREATE_ DEBMAS.
    • Find Customer Function 001.
    • Double-click on 001.
    • The function EXIT_SAPLVV01_001 will be displayed.
    • Double-click on INCLUDE ZXVSVU01.
    • You will be asked to create a new include object. Proceed as desired.
    • Enter code (as in Listing 1).
    • Be sure to perform a main program check (Function Module -> Check -> main program) and extended program check (Function module -> Check -> Extended check).
    Now that you have extended the IDOC and enhanced the ALE function module based on the requirements for the contact personâs business address on the Customer Master, letâs test the interface. You should create a logical system and define a port for this interface. You should also configure the Customer Distribution Model to indicate that message type DEBMAS is being distributed to this logical system. The only difference in configuration between a regular outbound ALE interface and an enhanced one is the partner profile definition. While maintaining the outbound parameters of the partner profile, make sure the IDOC type is ZDEBMASZ. The fields for Basic IDOC type and extension type are automatically populated with DEBMAS02 and ZDEBMASX, respectively.
    To maintain the contact personâs business address of a customer:
    • Use transaction BD12 or from BALE go to Master Data ->Customer -> Send and send that Customer Master record by executing the transaction after filling in the relevant fields such as customer number, message type, and logical system.
    • Use transaction WE02 or WE05 to verify the IDOC created. You should see the new segment Z1SADRX populated with the correct data.
    With SAP releases below 4.5B, you cannot capture changes to business address through change pointers because a change document object is not available for capturing business address changes, and also earlier releases have not been configured to write change documents for a contact personâs business address. If you would like this functionality, you can either create change document objects, generate function modules to create change documents, and perform ALE configuration to tie it in, or make a cosmetic change to the contact person screen data while changing the contact personâs business address so that it gets captured as a change to the Customer Master. Subsequently, the ALE enhancement that you performed captures the contact personâs business address.
    Inbound interfaces. The process for enhancing inbound ALE interfaces is similar for outbound, with a few exceptions; specifically in the coding of customer functions (function exits) for the ALE/EDI function modules.
    The first step is to create an IDOC extension for the specific Basic IDOC type by adding new segments at the appropriate hierarchy level: that is, associated to the relevant existing segment. Populate the data fields on the new segments with application data by the translator or external system/program before importing them into the R/3 System. Then, find the ALE function module that is invoked by the inbound processing. By browsing through the code or reading the documentation on the function exit enhancements using the SMOD transaction, identify the function exit in which you should place your code. The technique used in the code to post the additional or modified IDOC data to the application can vary based on the application rules and requirements, the data available at that point in processing, and the application function modules available to update the application tables. It is important to search first for application modules that process the data and see if they can be called within the function exit. If the additional data in the extended segments in specific to a custom table or resides in nonkey fields of a single or small set of tables, you may be able to update it directly by SQL statements in the function exit. This approach should be carefully evaluated and is certainly not highly recommended.
    Another option is to use Call Transaction from within the function exit to process the additional data. For example, in the case of message type WMMBXY for inbound goods movements from a warehouse management system, the standard interface creates batches for materials, but does not update its characteristics. In such a case, you can use Call Transaction MSC1 to create the batch and assign characteristic values to it from within the function exit provided.
    Error handling is a very important consideration when making enhancements to inbound ALE/EDI objects. In ALE and EDI inbound processing, workflow is used for handling errors at different levels such as technical and application. If workflow has been configured for the interface, the error messages and workflow items flow to the inbox of the named recipient(s).
    It is also critical to enhance the workflow that handles notifications of the inbound ALE/EDI process. In most scenarios this is not a very difficult task because SAP lets you influence the workflow parameters and messages in function exits (customer functions). You typically do this using flags and message codes to trigger certain workflow actions. If you conform to the status codes and flags stipulated for workflow processing, the enhancement could be error-free and seamless. In the case of an inbound IDOC with an extension, you should populate the EDIDC fields IDOCTYP (new IDOC type) and CIMTYP (extension type) accordingly.
    Reward if Helpful

  • Exit for payment method(IDOC- PEXR2002)

    Dear Experts,
    I have add one Z Segment to the standard idoc PEXR2002 and msgtyp PAYEXT and now would like to pass the value to that Z segment field.
    But i am not able to find out any Exit for payment method.
    Program used to create the idoc is RFFOEDI1.
    Kindly provide the solution.
    Regards
    Pankaj

    if  you will ook in the porgramit is sent via function module where there are lot of Call customer function which you can use for example EXIT_SAPLIEDP_902 i can see many.Just debuug it and check which suit your need.
    Nabheet

  • Standard IDOC Generation

    Dear All,
    I want to generate the standard IDOCS TCURC_01 ( Currency Codes) and TCURR_01 (Exchange rates). These IDOCs must contain all the change data from TCURC and TCURR Tables.
    How can I generate these standard IDOCs?
    How can I send these standard IDOCs via ALE for outbound processing?
    ( For eg. to send material we use BD10, what can we use to send these IDOCs)
    Thanks and Regards
    Ashwin

    HI
    you have to write the following code:
    REPORT  ZALE_USR.
    CONSTANTS:   C_DOCTYP TYPE EDIDC-IDOCTP VALUE 'ZUSRDET01', idoctype
                 C_SEGNAM TYPE EDIDD-SEGNAM VALUE 'Z1USRDET01', segment type
                 C_MESTYP TYPE EDIDC-MESTYP VALUE 'ZUSRDET'. message type
      DATA:      IT_ZUSR02 TYPE USR02 OCCURS 10,
                 IT_EDIDC TYPE EDIDC OCCURS 0,
                 IT_EDIDD TYPE EDIDD OCCURS 0,
                 WA_ZUSR02 TYPE USR02,
                 WA_EDIDC TYPE EDIDC,
                 WA_EDIDD TYPE EDIDD,
                 WA_Z1USRDET01 TYPE Z1USRDET01,
                 V_OCCMAX TYPE IDOCSYN-OCCMAX,
                 V_NBSEG TYPE I.
                CLEAR WA_ZUSR02.
                CLEAR WA_EDIDC.
                Save the message type and the basic IDoc type in the control segment.
                MOVE C_MESTYP TO WA_EDIDC-MESTYP.
                MOVE C_DOCTYP TO WA_EDIDC-IDOCTP.
                Retrieve the maximum number of segments in the basic IDoc type.
                SELECT MIN( OCCMAX )  FROM IDOCSYN  INTO V_OCCMAX  WHERE IDOCTYP EQ C_DOCTYP AND SEGTYP EQ C_SEGNAM.
                Save the whole USR02 table content in the IT_ZUSR02 internal table.
                SELECT * FROM USR02 INTO CORRESPONDING FIELDS OF TABLE IT_ZUSR02.
                Create a data segment for each line of IT_ZUSR02.
                LOOP AT IT_ZUSR02 INTO WA_ZUSR02 .
                  MOVE-CORRESPONDING WA_ZUSR02  TO WA_Z1USRDET01.
                  CLEAR WA_EDIDD.
                  MOVE C_SEGNAM TO WA_EDIDD-SEGNAM.
                  MOVE WA_Z1USRDET01 TO WA_EDIDD-SDATA.
                  APPEND WA_EDIDD TO IT_EDIDD.
                  CLEAR WA_ZUSR02.
                 CLEAR WA_Z1USRDET01.
                ENDLOOP.
               Count the number of data segments.
                  DESCRIBE TABLE IT_EDIDD LINES V_NBSEG.
               If the number of data segments exceeds the maximum allowed number,then display an error message.
                  IF V_NBSEG GT V_OCCMAX.
                  WRITE:/ 'ERROR'.
                  ENDIF.
                  CALL FUNCTION 'MASTER_IDOC_DISTRIBUTE'
                    EXPORTING
                      master_idoc_control                  = WA_EDIDC
                    OBJ_TYPE                             = ''
                    CHNUM                                = ''
                    tables
                      communication_idoc_control           = IT_EDIDC
                      master_idoc_data                     = IT_EDIDD
                   EXCEPTIONS
                     ERROR_IN_IDOC_CONTROL                = 1
                     ERROR_WRITING_IDOC_STATUS            = 2
                     ERROR_IN_IDOC_DATA                   = 3
                     SENDING_LOGICAL_SYSTEM_UNKNOWN       = 4
                     OTHERS                               = 5
                  IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
                  ENDIF.
    <b>execute the program, run bd87 after that.</b>
    <b>reward points for useful ans</b>
    Regards
    Aarti

  • How to insert the standard idoc segment in the idoc

    Hi Experts!
    We  are using  SRM 7.0.Wo got a requirement as below:
    In our organiation there will be both regular employees and the non-employees.For non-employees address will not be maintained in Tcode PA20 in backend ECC HR  system.Where as for employees address will be maintained.
    As the HR replication will be done by scheduled jobs, in case of non employees replication is not happening due to the missing address in PA20.In order to avoid this we are building some logic and as part of it we need to add the standard IDOC segment  'E1P0006' in the main idoc as this particular segment is for address and it is missing due to the missing address in PA20 for non-employees where as this idoc segment will be there for employees.
    As am very much new to idoc concept can some one help me how to handle this if any one of you came across this kind of scenario.
    Please find the attached document for the idoc seq we have.
    Thanks in advance.
    Regards,
    Kalyani

    1. Open the form
    2. Choose Tools--> Diagnostics
    3. In the block field choose $DESCRIPTIVE_FLEXFIELD$
    4. Field will show the list of all the DFF's enabled for that form.
    5. Choosing one will display the name of the DFF in the value field.
    Thanks
    Nagamohan

  • How to include a new segment in FIDCCP02 idoc (OUTBOUND)

    Hi,
    I would like to know in which EXIT or BADI I should append my new segment to the idoc data.  I have created the new segment to add new Z fields that I added before on the BSEG, and I have created the enhancement of the idoc and put the new segment in the correct place.
    Best Regards

    Adrian,
    Isn't the BADI IDOC_DATA_INSERT the correct answer?
    Regards,
    Ashvin

  • How to find the Standard Program associated with a Standard IDOC

    Hi,
          I am going work on enhancing the standard IDOC. Any body can suggest how to find a standard pogram associated with a Standard IDOC. And can any body send some exaple code for extending a standard IDOC and to implement the logic in the standard program .....

    Hi,
    For outbound IDoc the program can be found:
    1) For master IDoc via transaction BD60. Here for the message type you can find the function module used to generate the IDoc. Within this function module you can find the user exit where you can code your logic.
    2) For IDocs with message control (output control) we maintain settings for proces code in WE41. This process code will lead to outbound IDoc generation program.
    For Inbound IDoc the program can be found:
    Via WE42 where inbound process and its related inbound function module is maintained.
    In each cases above we can go the function module and find the customer exit where idoc enhancement logic can be coded.
    For extending IDoc look at the following links:
    <a href="http://help.sap.com/saphelp_nw04/helpdata/en/dc/6b7d6243d711d1893e0000e8323c4f/content.htm">Extending IDoc - SAP help</a>
    It can be summarized as follows:
    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.
    Hope this helps.
    Regards,
    Gajendra.

Maybe you are looking for

  • RSA1 - Source system connection : No connection to system  possible

    Hello friends, I am creating a Source system connection from our BW system. I have already established the working RFC connection to source system which works fine, both side client is open & system is modifiable. Bit i am getting error : No connecti

  • Develop mode shows a blue background with a white box and white diagonals.

    When I open the Develop mode the photo I selected is not displayed. Instead is a blue background with a white box and white diagonals. Can anyone help? Everything else appears to work. If  I choose the Before and After view the photo shows in the  Be

  • Convert PaperPort Max to PDF

    Following this question: http://discussions.apple.com/thread.jspa?threadID=1771876&tstart=0, I found a solution to go through all files and convert the PaperPort .max files to equivalent .pdf files. It requires GraphicConverter from http://www.lemkes

  • Mix duplex with simplex printing in one form

    Dear experts, I have a tricky problem to solve. But I'm sure the experts among you will be able to help me! I would like to print the first page duplex (double-sided) and the rest of the document simplex (one-sided). My document consists of 3 master

  • HT1212 this doesnt wor someone help me! my sister disabled her ipod and im trying to fix it for her.

    my sister disabled her ipod and all it says on the screen when you turn it on is ipod is disabled try again in 22,088,882 minutes and there is no slider. when i plug it in to my macbook it says itunes cant connect with the ipod and to try again with