BAPI to ALE interface

Hi All,
I'm trying to generate an ALE interface for the BAPI -
BAPI_CASE_CREATE for my LSMW project, for object  SCASE , but each time I try to generate the ALE interface for the BAPI I get the error as follows -
Segment 'SAGMENT NAME' is used multiple times in IDoc types
Message no. EA799
'Segment type  is used multiple times in the IDoc type. A segment type may only be used once in each IDoc type'.
Please Reply ASAP

Hi,
You can use any middle ware(webmethods/EAI etc) which can invoke an RFC enable FM/BAPI...
You need to do an ALE here..
Since most of the BAPI have the return tables which stores the error or sucess messages you can use the after invoking the FM that will response the middleware(Synchronous method)..
Hence the return tables store the errors which can be used, But if you want to store those errors in SAP then better create a custom table and update the same whenever the error occurs..(for this u can create a wrapper of the std Fm that you use and implement the logic for updation of errors/custom table)
Hope this helps you
regards
shiva

Similar Messages

  • Tcode BDBG - Generate ALE Interface for BAPI

    Hi All,
    I'm trying to generate an ALE interface for the BAPI - BAPI_BUSPROCESSND_CREATEMULTI for my LSMW project, for which I have created a bespoke object in SWO1 (ZBUS), but each time I try to generate the ALE interface for the BAPI I get the error as follows -
    Segment Z1BPBUS20001_HEADER_INS is used multiple times in IDoc types
    Message no. EA799
    Diagnosis
    Segment type Z1BPBUS20001_HEADER_INS is used multiple times in the IDoc type. A segment type may only be used once in each IDoc type.
    I agree, segment BAPIBUS20001_HEADER_INS is used more than once in BAPI_BUSPROCESSND_CREATEMULTI for the HEADER and CREATED_PROCESS tables, so is there any alternate solution to it?
    I have also tried running BDBG for BAPI_ACTIVITYCRM_CREATEMULTI, and I get athe same error message as above for the segment - BAPIBUS20001_APPOINTMENT_INS - but I cannot see this segment being used anywhere else except for tables DATE.
    Kind regards,
    Arijit Das

    Hi Suresh,
    thanks for your reply.
    Method of BAPI has not been deleted,
    but message type, idoc type and FM for Outbound processing.
    These objects are within SAP namespace, so recreation will not work.
    Regards
    rea

  • Making BDBG Easy (Generate ALE Interface for BAPI)

    <b>Making BDBG Easy</b>
    Transaction BDBG is used to generate an ALE interface for SAP standard or custom developed BAPIs. Once a BAPI is given an ALE interface, it can be used in LSMW for migrating data or just as another IDoc. Quite a few SAP standard BAPIs cannot be used in LSMW as they do not come with an ALE interface. OSS note Documentation on Transaction BDBG (note number 125776) details the necessary steps to use transaction BDBG but it does not comprehensively cover the technical issues that one may encounter in order to create an ALE interface.
    BAPI_ACTIVITYCRM_CREATEMULTI, which is used to create Activities in CRM, will be used to illustrate a step-by-step approach to using transaction BDBG.
    Go to Object Navigator (transaction SE80) and create a bespoke function group, we will call ours Z_CRM_ACTIVITY. Activate it.
    Then go to Function Builder (transaction SE37), and copy the BAPI to a bespoke function module. Thus, BAPI_ACTIVITYCRM_CREATEMULTI is copied to Z_BAPI_ACTIVITYCRM_CREATEMULTI and assigned to the function group that we created in the previous step – Z_CRM_ACTIVITY. Edit the bespoke function module, go to the Attributes tab, and release the function module (<i>Menu Path – Function Module >> Release >> Release</i>). Now activate the function module.
    IDoc segment types have a maximum length of 27 characters. Each associated type for the Parameters (tabs – Import, Export, Changing, and Tables) in a BAPI becomes a segment in the IDoc. Thus, an associated type in a BAPI cannot exceed 27 characters. During the ALE generation process anything beyond the 27th character gets truncated. This leads to more than 1 segment being called the same, and as a result an error occurs when the ALE interface is generated in the final step as an IDoc cannot have the same segment twice.
    Eg: Table parameters DATE and DATEX correspond to types BAPIBUS20001_APPOINTMENT_INS (28 characters long) and BAPIBUS20001_APPOINTMENT_INSX (29 characters) respectively.
    Also, a developer does not have the option to reduce the segment name during the ALE generation process. So in order to have an error free ALE generation happening in the end, bespoke associated types need to be created and assigned to our bespoke BAPI.
    Go to ABAP Dictionary (transaction SE11), and create ZXXXXXXXXXXXXXXXX data types for the structures in the BAPI that are greater than 27 characters. Activate all these bespoke structures.
    Bespoke structures – ZBAPIBUS20001_APP_INS and ZBAPIBUS20001_APP_INSX can be used in lieu of the standard SAP ones for parameters DATE and DATEX. The same correction method needs to take place for other excessively long types, like the types being referenced by LOCATION and LOCATIONX.
    Go to Business Object Builder (transaction SWO1). A search for Activity as the short description produces a few hits. After examining all the objects returned in the hit, we see that BAPI_ACTIVITYCRM_CREATEMULTI belongs to 2 Business Objects - BUS2000110 (CRM Activity) and BUS2000126 (CRM Business Activity).
    Copy either of these objects to a bespoke object ZXXXXXXXXX, we will copy BUS2000110 and rename it to ZBUS200010, program RBUS2000110 should also be copied to a Z version (ZRBUS2000110), and the object name can be changed to Company Name (eg: XXX) followed by ActivityCRM (XXXActivityCRM).
    Now we edit our bespoke object, and create a method for it by placing the mouse cursor on methods in the object type tree and clicking the create button on the menu bar.
    A pop-up appears on the screen with the following text –
    <i>Create with function module
    as template? </i>         
    After clicking on Yes, another pop-up asks for a function module to be entered, enter the bespoke function module Z_BAPI_ACTIVITYCRM_CREATEMULTI here and click the tick button.
    Accept all the default values in the next pop-up – Create Method: Method Properties, and do the same for the next pop-up – Create Method: Create Parameters. In the next pop-up click Yes to the question –
    <i>Method ZBAPIACTIVITYCRMCREATEMULTI not
    yet implemented                       
    Do you want to generate a template    
    automatically for the missing section?</i>
    Double-click on the newly created method and go to the ABAP tab, the Function Module option will be selected as the default, make the API function as the default and click OK. Generate the business object.
    Now, click on the method of the object and release the method (<i>Menu Path – Edit >> Change Release Status >> Object Type Component >> To Released</i>). Double-click on the method to confirm that the Status is released.
    Save all the changes made, and Back out of the Edit mode and go the main Business Object Builder screen. Re-generate the business object. First implement, then release the main object ZBUS200010 (<i>Menu Path – Object Type >> Change Release Status To >> Implemented, then follow the same menu path and click on Released</i>).
    Go to the BAPI Explorer (transaction BAPI), click on the filter icon on the menu bar, and select radiobutton – All. Click on the alphabetical tab. Look for XXXActivityCRM in the list. Release status should be Released for this object.     
    Now we should be able to generate the ALE interface for the BAPI. Execute transaction BDBG, enter the bespoke object (ZBUS200010), do a drop down on the method field and select the bespoke method from the list. Click on the create button on the menu bar. In the first pop-up accept Message Type ZBAPIACTIVITYCRM and click OK. In the next pop-up the following values should be there by default –
    IDoc type – ZBAPIACTIVITYCRM01,
    ALE Outbound Processing
    Function Module – ZZ_ALE_ACTIVITYCRM_CREATEMULTI,
    Function Group – Z_CRM_ACTIVITY, and
    ALE Inbound Processing
    Function Module – ZIDOC_INPUT_ZBAPIACTIVITYCRM,
    Function Group – Z_CRM_ACTIVITY.
    The option – Call in update task – should be ticked.
    Now our BAPI has an ALE Interface to it and can be used in conjunction with either the BAPI or IDoc option in LSMW. The default values for an IDoc Inbound Processing should be maintained in order to use the bespoke BAPI / IDoc.

    Great

  • ALE interface with BAPI

    Hi,
    Am trying to create generate ALE interface for a BAPI(BDBG). After the creation an error comes
    “There is no entry in the object directory (TADIR) for R3TR TABL Z1BUSINESSPARTNERERM_CREATE”. (representative error mess)
    Can anyone help in resolving the same?
    Thanks and regards

    Hi Saurabh,
    This type of error occurs when you have to do some changes in standard table. Can you check whether you have to maintain this perticular entry
    "Z1BUSINESSPARTNERERM_CREATE" in a perticular table ?
    <b>Allot proint if my post helps!!</b>
    Best regards,
    Vikash.

  • BAPI, IDOC, ALE, RFC

    Hi friends,
    I am new in BAPI IDOC ALE
    I want to learn these Topics but i dont have any clue or material about this.
    Kindly help me to learn this topics, please give me material and basic clue for this,
    Many Thanks
    Jahnavee Trivedi

    Hi,
    ALE AND IDOC:
    Data Creation in Idoc
    IDocs are text encoded documents with a rigid structure that are used to exchange data between R/3 and a foreign system. Instead of calling a program in the destination system directly, the data is first packed into an IDoc and then sent to the receiving system, where it is analyzed and properly processed. Therefore an IDoc data exchange is always an
    asynchronous process. The significant difference between simple RFC-calls and IDoc data exchange is the fact, that every action performed on IDocs are protocolled by R/3 and IDocs can be reprocessed if an error occurred in one of the message steps.
    While IDocs have to be understood as a data exchange protocol, EDI and ALE are typical use cases for IDocs. R/3 uses IDocs for both EDI and ALE to deliver data to the receiving system. ALE is basically the scheduling mechanism that defines when and between which partners and what kind of data will be exchanged on a regular or event triggered basis. Such a set-up is called an ALE-scenario.
    IDoc is a intermediate document to exchange data between two SAP Systems.
    *IDocs are structured ASCII files (or a virtual equivalent).
    *Electronic Interchange Document
    *They are the file format used by SAP R/3 to exchange data with foreign systems.
    *Data Is transmitted in ASCII format, i.e. human readable form
    *IDocs exchange messages
    *IDocs are used like classical interface files
    IDOC types are templates for specific message types depending on what is the business document, you want to exchange.
    WE30 - you can create a IDOC type.
    An IDOC with data, will have to be triggered by the application that is trying to send out the data.
    FOr testing you can use WE19.
    How to create idoc?
    *WE30 - you can create a IDOC type
    For more information in details on the same along with the examples can be viewed on:
    http://www.netweaverguru.com/EDI/HTML/IDocBook.htm#_Toc8400404
    http://help.sap.com/saphelp_erp2005/helpdata/en/0b/2a6620507d11d18ee90000e8366fc2/frameset.htm
    http://www.sappoint.com/presentation.html
    http://www.allsaplinks.com/idoc_search.html
    http://www.sapgenie.com/sapedi/idoc_abap.htm
    http://www.erpgenie.com/sapedi/idoc_abap.htm
    To Create Idoc we need to follow these steps:
    Create Segment ( WE31)
    Create Idoc Type ( WE30 )
    Create Message Type ( WE81 )
    Assign Idoc Type to Message Type ( WE82 )
    Creating a Segment
    Go to transaction code WE31
    Enter the name for your segment type and click on the Create icon
    Type the short text
    Enter the variable names and data elements
    Save it and go back
    Go to Edit -> Set Release
    Follow steps to create more number of segments
    Create IDOC Type
    Go to transaction code WE30
    Enter the Object Name, select Basic type and click Create icon
    Select the create new option and enter a description for your basic IDOC type and press enter
    Select the IDOC Name and click Create icon
    The system prompts us to enter a segment type and its attributes
    Choose the appropriate values and press Enter
    The system transfers the name of the segment type to the IDOC editor.
    Follow these steps to add more number of segments to Parent or as Parent-child relation
    Save it and go back
    Go to Edit -> Set release
    Create Message Type
    Go to transaction code WE81
    Change the details from Display mode to Change mode
    After selection, the system will give this message “The table is cross-client (see Help for further info)”. Press Enter
    Click New Entries to create new Message Type
    Fill details
    Save it and go back
    Assign Message Type to IDoc Type
    Go to transaction code WE82
    Change the details from Display mode to Change mode
    After selection, the system will give this message “The table is cross-client (see Help for further info)”. Press Enter.
    Click New Entries to create new Message Type.
    Fill details
    Save it and go back
    Check these out..
    Re: How to create IDOC
    Check below link. It will give the step by step procedure for IDOC creation.
    http://www.supinfo-projects.com/cn/2005/idocs_en/2/
    ALE/ IDOC
    http://help.sap.com/saphelp_erp2004/helpdata/en/dc/6b835943d711d1893e0000e8323c4f/content.htm
    http://www.sapgenie.com/sapgenie/docs/ale_scenario_development_procedure.doc
    http://edocs.bea.com/elink/adapter/r3/userhtm/ale.htm#1008419
    http://www.netweaverguru.com/EDI/HTML/IDocBook.htm
    http://www.sapgenie.com/sapedi/index.htm
    http://www.sappoint.com/abap/ale.pdf
    http://www.sappoint.com/abap/ale2.pdf
    http://www.sapgenie.com/sapedi/idoc_abap.htm
    http://help.sap.com/saphelp_erp2005/helpdata/en/0b/2a60bb507d11d18ee90000e8366fc2/frameset.htm
    http://help.sap.com/saphelp_erp2005/helpdata/en/78/217da751ce11d189570000e829fbbd/frameset.htm
    http://www.allsaplinks.com/idoc_sample.html
    http://www.sappoint.com/abap.html
    http://help.sap.com/saphelp_erp2004/helpdata/en/dc/6b835943d711d1893e0000e8323c4f/content.htm
    http://www.sapgenie.com/sapgenie/docs/ale_scenario_development_procedure.doc
    http://edocs.bea.com/elink/adapter/r3/userhtm/ale.htm#1008419
    http://www.netweaverguru.com/EDI/HTML/IDocBook.htm
    http://www.sapgenie.com/sapedi/index.htm
    http://www.allsaplinks.com/idoc_sample.html
    http://www.sapgenie.com/sapgenie/docs/ale_scenario_development_procedure.docs
    go trough these links.
    http://help.sap.com/saphelp_erp2004/helpdata/en/dc/6b835943d711d1893e0000e8323c4f/content.htm
    http://www.sapgenie.com/sapgenie/docs/ale_scenario_development_procedure.doc
    http://edocs.bea.com/elink/adapter/r3/userhtm/ale.htm#1008419
    http://www.netweaverguru.com/EDI/HTML/IDocBook.htm
    http://www.sapgenie.com/sapedi/index.htm
    http://www.sappoint.com/abap/ale.pdf
    http://www.sappoint.com/abap/ale2.pdf
    http://www.sapgenie.com/sapedi/idoc_abap.htm
    http://help.sap.com/saphelp_erp2005/helpdata/en/0b/2a60bb507d11d18ee90000e8366fc2/frameset.htm
    http://help.sap.com/saphelp_erp2005/helpdata/en/78/217da751ce11d189570000e829fbbd/frameset.htm
    http://www.allsaplinks.com/idoc_sample.html
    http://www.sappoint.com/abap.html
    http://help.sap.com/saphelp_erp2004/helpdata/en/dc/6b835943d711d1893e0000e8323c4f/content.htm
    http://www.sapgenie.com/sapgenie/docs/ale_scenario_development_procedure.doc
    http://edocs.bea.com/elink/adapter/r3/userhtm/ale.htm#1008419
    http://www.netweaverguru.com/EDI/HTML/IDocBook.htm
    http://www.sapgenie.com/sapedi/index.htm
    http://www.allsaplinks.com/idoc_sample.html
    http://http://help.sap.com/saphelp_erp2004/helpdata/en/dc/6b835943d711d1893e0000e8323c4f/content.htm
    An IDoc is simply a data container that is used to exchange information between any two processes that can understand the syntax and semantics of the data...
    1.IDOCs are stored in the database. In the SAP system, IDOCs are stored in database tables.
    2.IDOCs are independent of the sending and receiving systems.
    3.IDOCs are independent of the direction of data exchange.
    The two available process for IDOCs are
    Outbound Process
    Inbound Process
    AND There are basically two types of IDOCs.
    Basic IDOCs
    Basic IDOC type defines the structure and format of the business document that is to be exchanged between two systems.
    Extended IDOCs
    Extending the functionality by adding more segments to existing Basic IDOCs.
    To Create Idoc we need to follow these steps:
    Create Segment ( WE31)
    Create Idoc Type ( WE30)
    Create Message Type ( WE81)
    Assign Idoc Type to Message Type ( WE82)
    imp links
    http://www.allsaplinks.com/idoc_sample.html
    http://www.sapgenie.com/sapedi/idoc_abap.htm
    www.sappoint.com
    --here u can find the ppts and basic seetings for ALE
    http://sappoint.com/presentation.html
    www.sapgenie.com
    http://www.sapgenie.com/ale/index.htm
    WE30 - you can create a IDOC type.
    An IDOC with data, will have to be triggered by the application that is trying to send out the data.
    Try this..Hope this will help.
    SAP ALE & IDOC<<<<
    Steps to configuration(Basis) >>
    1. Create Logical System (LS) for each applicable ALE-enabled client
    2. Link client to Logical System on the respective servers
    3. Create background user, to be used by ALE(with authorizaton for ALE postings)
    4. Create RFC Destinations(SM59)
    5. Ports in Idoc processing(WE21)
    6. Generate partner profiles for sending system
    The functional configuration(Tcode: SALE)
    • Create a Customer Distribution Model (CDM);
    • Add appropriate message types and filters to the CDM;
    • Generate outbound partner profiles;
    • Distribute the CDM to the receiving systems; and
    • Generate inbound partner profiles on each of the clients.
    Steps to customize a new IDoc >>>
    1. Define IDoc Segment (WE31)
    2. Convert Segments into an IDoc type (WE30)
    3. Create a Message Type (WE81)
    4. Create valid Combination of Message & IDoc type(WE82)
    5. Define Processing Code(WE41 for OUT / WE42 for IN)
    6. Define Partner Profile(WE20)
    Important Transaction Codes:
    SALE - IMG ALE Configuration root
    WE20 - Manually maintain partner profiles
    BD64 - Maintain customer distribution model
    BD71 - Distribute customer distribution model
    SM59 - Create RFC Destinations
    BDM5 - Consistency check (Transaction scenarios)
    BD82 - Generate Partner Profiles
    BD61 - Activate Change Pointers - Globally
    BD50 - Activate Change Pointer for Msg Type
    BD52 - Activate change pointer per change.doc object
    BD59 - Allocation object type -> IDOC type
    BD56 - Maintain IDOC Segment Filters
    BD53 - Reduction of Message Types
    BD21 - Select Change Pointer
    BD87 - Status Monitor for ALE Messages
    BDM5 - Consistency check (Transaction scenarios)
    BD62 - Define rules
    BD79 - Maintain rules
    BD55 - Defining settings for IDoc conversion
    WEDI - ALE IDoc Administration
    WE21 - Ports in Idoc processing
    WE60 - IDoc documentation
    SARA - IDoc archiving (Object type IDOC)
    WE47 - IDoc status maintenance
    WE07 - IDoc statistics
    BALE - ALE Distribution Administration
    WE05 - IDoc overview
    BD87 - Inbound IDoc reprocessing
    BD88 - Outbound IDoc reprocessing
    BDM2 - IDoc Trace
    BDM7 - IDoc Audit Analysis
    BD21 - Create IDocs from change pointers
    SM58 - Schedule RFC Failures
    Basic config for Distributed data:
    BD64: Maintain a Distributed Model
    BD82: Generate Partner Profile
    BD64: Distribute the distribution Model
    Programs
    RBDMIDOC – Creating IDoc Type from Change Pointers
    RSEOUT00 – Process all selected IDocs (EDI)
    RBDAPP01 - Inbound Processing of IDocs Ready for Transfer
    RSARFCEX - Execute Calls Not Yet Executed
    RBDMOIND - Status Conversion with Successful tRFC Execution
    RBDMANIN - Start error handling for non-posted IDocs
    RBDSTATE - Send Audit Confirmations
    FOr testing you can use WE19.
    There are two filtering in IDoc.
    Segment Filtering:
    Segment filtering can be achieved using T/Code BD56. Here you can suppress a whole segment irrespective of data inside it . You have to give Message Type / Sender Prrtner / Receiver Partner.
    Data Filtering:
    Data filtering can be done in dustribution model (BD64) where you can restrict whole IDOCS or partials IDOCS to be send based on data in fields inside IDOC depending on whether the segment in which you filter is at the highest level or at a lower level. For example in MATMAS if you put a filter of E1MARCM for a particular plant , only data for this plant will go and other plants will be ignored.
    Please check this link for more information.
    http://help.sap.com//saphelp_470/helpdata/EN/0b/2a611c507d11d18ee90000e8366fc2/frameset.htm
    BAPI MATERIAL:
    please check this:
    http://help.sap.com/saphelp_nw04/helpdata/en/e0/9eb2370f9cbe68e10000009b38f8cf/frameset.htm
    BAPI Programming Guide
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/CABFABAPIREF/CABFABAPIPG.pdf
    BAPI User Guide
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCMIDAPII/CABFAAPIINTRO.pdf
    BAPI is also a Remote enabled function module but the difference between BAPI and RFC is in BAPI there is a bussiness object attached to it which calls SAP application internally.
    BAPI stands for Business Application Programming Interface.
    It is a library of functions that are released to the public
    as an interface into an existing SAP system from an external system.
    http://help.sap.com/saphelp_46c/helpdata/en/9b/417f07ee2211d1ad14080009b0fb56/frameset.htm
    http://searchsap.techtarget.com/originalContent/0,289142,sid21_gci948835,00.html
    Checkout !!
    http://searchsap.techtarget.com/originalContent/0,289142,sid21_gci948835,00.html
    http://techrepublic.com.com/5100-6329-1051160.html#
    http://www.sap-img.com/bapi.htm
    http://www.sap-img.com/abap/bapi-conventions.htm
    http://www.sappoint.com/abap/bapiintro.pdf
    RFC:
    Remote Function Call:
    RFC is an SAP interface protocol. Based on CPI-C, it considerably simplifies the programming of communication processes between systems.
    RFCs enable you to call and execute predefined functions in a remote system - or even in the same system.
    RFCs manage the communication process, parameter transfer and error handling.
    Have a look at this link.
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCFESDE2/BCFESDE2.pdf
    http://help.sap.com/saphelp_47x200/helpdata/en/22/042860488911d189490000e829fbbd/frameset.htm.
    Regards,
    SHIva(reward if helpful)

  • ALE interface programing

    hi experts,
    whtat is ALE and why we r using ALE.please give the
    steps with  example.
      regards,
       cnu

    Check this questions u may get ur answers.
    1.     What is ALE?
    Application Link Enabling (ALE) is a set of business processes and tools that allow applications on different computer systems to be linked. This can be done between different SAP systems as well as between SAP and non-SAP systems.
    In a single SAP system different applications are integrated via a single database (e.g. finance, sales, production, human resources). However, many companies do not have just one integrated system but a distributed environment with different applications running on different systems. To run the whole business in such an environment the distributed applications have to be linked. This can be done through Application Link Enabling (ALE).
    ALE provides distributed business processes that can be used to link the applications on different platforms. There are some ALE business processes delivered in the standard SAP system. Furthermore, there are tools that can be used to change the existing ALE business processes or to implement new distributed business processes.
    Besides the business processes there are special ALE services that are required to set up and control a distributed environment. These services include a distribution model, business object synchronization and tools for monitoring or error handling.
    ALE is a major part of SAP's Business Framework Architecture. Besides the basis middleware, that provides the communication between components, and the interfaces (BAPIs), ALE business processes and ALE services enable the cooperation of the single components within the framework. That makes ALE the glue of the Business Framework.
    2. What are the benefits of ALE?
    With ALE companies get the opportunity to improve business performance and to solve organizational or technical issues.
    Through distribution you can decentralize your business, enabling local units to operate independently from each other. This flexibility enables the local units to return better business results than in a centralized environment. They have the necessary flexibility to optimize business processes in different organizational units and can ensure that information systems can handle the speed of change in rapidly expanding markets. Distribution allows a high level of freedom, provided that this level of freedom has been clearly defined.
    On the other hand, some companies, that already have a distributed organization with different computer systems in the local units, have the opportunity to link their units through ALE business processes. This enables them for example to provide a 'one face to the customer' approach. Another area that can benefit through ALE are virtual organizations (partnerships between independent companies, joint ventures and mergers and acquisitions).
    Of course, in many cases an integrated solution based on a single system is not possible at all. Some applications used by a company can not run on the same computer system. This includes legacy systems or complementary software. It may also be possible that a company uses different SAP industry solutions or specific country solutions, which do not run on the same SAP System. If these applications run on different systems they can not be linked by a central database but have to use a special integration mechanism like ALE. In this way ALE also links SAP Core Systems to other SAP components like CRM, Business Information Warehouse or APO.
    Besides the benefits of having an improved flexibility in setting up the whole business processes, ALE may also reduce costs, in particular costs of upgrading. If the whole business is run on one integrated system you have to upgrade the whole system, even if only one part of your company (e.g. human resources) requires an update. So the entire company is affected by the upgrade project and all users have to be trained for the new release. Within a distributed environment with release independent interfaces, like those provided by ALE, you can focus the upgrade project on that part of the company that has to be upgraded. The other parts of the company are not involved and need no training. This can save a lot of money. Furthermore, existing investments are protected.
    Another cost factor for distribution might be communication costs. For an overseas connection it can be more expensive to provide online access to one central system (T1) than to connect distributed systems to each other (64K line).
    There might also be some technical reasons for distributed systems. If some parts of the business have special requirements for security of data access (e.g. human resources), this can be set up much safer on a standalone system, which is, however, linked to other parts of the company through distributed business processes. A similar example is high availability. High availability is usually required by the operations part of the company (production, logistics) but not by other areas (e.g. financials, human resources). In a distributed environment high availability can be set up for specific parts of the environment instead of for the whole business. This can also reduce costs.
    In a distributed environment you can not decrease the overall workload of the systems but you can separate the user workloads on different systems. Through this scalability you can improve performance. Another benefit of distributed systems is that if a technical failure occurs on one system, all other systems continue to operate. Only a small part of the business is disrupted by the error. On one central system such an error would disrupt the entire business.
    3. When should ALE be used?
    Besides the benefits of ALE there are also reasons not to distribute:
    The functional scope in a distributed environment is restricted. Not all functionality that is available in an integrated SAP system can be used with distributed systems in the standard yet. Although ALE provides tools to create new ALE business processes or to enhance existing business processes, this does involve additional expenditure.
    Each company needs some organizational standards and data harmonization. In a distributed environment less standards are required than on a single integrated system. However, in a distributed environment the maintenance of the standards and the data harmonization is more difficult than on a single system.
    The administration of decentralized systems is more expensive. Support and service costs for hardware and software in decentralized systems are higher than these costs in a single centralized system.
    ALE should be used in a company if the benefits of ALE for this company outweigh the reasons against distribution. For this you always need to carry out a company specific investigation, in which you also should consider the culture of the company. ALE is good for some companies but not for all.
    4. What is the relationship between ALE and Middleware?
    Electronic Data Interchange (EDI) is a term for the transfer of business messages between two systems. There are many such messages, the most common of these include a customer sending a purchase order message to a vendor, or a vendor sending an invoice message to a customer. Classic EDI is mainly restricted on the exchange of transactional data, no master data or configuration data. In most cases, EDI replaces the transfer of paper copies of these documents. Via the messages ALE business processes can be implemented between business partners. The EDI messages also use the ALE services.
    For the communication between different types of systems special EDI messages are defined as standards for inter company communication. There are many standards for these messages - in the United States, the ANSI X.12 standard is the most prevalent, in Europe, the UN/EDIFACT standard is used. For sending EDI messages the information has to be converted into an EDI standard. With SAP systems this is done by EDI subsystems. This conversion is the only difference between EDI messages and other messages used in ALE business processes. The processing of these messages on the SAP System is the same as the processing of other ALE messages.
    5. Which ALE business processes are available?
    IDoc Types - Message Types
    ALE business processes are integrated business processes that run across distributed systems. This can be two different SAP systems, links between SAP and non-SAP systems, SAP and Web-servers (Internet Application Components) or SAP and desktop applications. The links between the systems may be loosely (asynchronous) or tightly (synchronous) coupled. These business processes are release independent and can run between different release levels of the systems.
    Many SAP applications offer ALE distribution processes. The following list gives some examples:
    Master data replication (IDoc Types - Message Types - Master Data)
    - Material
    - Customer
    - Vendor
    - General Ledger accounts
    - Bill of materials
    Accounting (IDoc Types - Message Types -Accounting Business Processes)
    - Links to logistic systems
    - Distributed financial accounting
    - Distributed cost center accounting
    - Distributed special ledger
    - Profitability analysis
    - Distributed profit center accounting
    - Consolidation
    - Treasury
    Logistics(IDoc Types - Message Types - Logistics Business Processes)
    - Reallocation of materials
    - Distribution of sales and shipping
    - Product data management
    - Purchasing contracts
    - Sales and operations planning
    - Warehouse management
    - Links to warehouse control systems
    - Links to production optimization systems
    - Links to transport planning systems
    Information systems (IDoc Types - Message Types - Logistics Business Processes)
    - SAP Business Information Warehouse (BW)
    - Exchange of data between information systems
    - Web reporting
    Human resources (IDoc Types - Message Types - HR Business Processes)
    - Human resources as a single component
    - Payroll results
    - Travel expense accounting
    - Links to time collecting systems
    However, these standard solutions may not fit 100% for a company. There may be differentiation in the business process or a required distributed business process is not supported in the standard. If this happens, ALE provides tools that can be used to adapt a standard ALE business process or to create a new distributed business process.
    6. Which ALE services are available and what do they do?
    To integrate distributed systems you need more than a communication infrastructure and interfaces. Some additional services are required that are provided by ALE:
    Business process harmonization:
    Within system overlapping business processes multiple functions running on multiple systems are involved and connected through multiple interfaces. The processes are combinations of functions (sub-processes) running on the single systems.
    (Example: A business process for customer order management involves functions in sales, manufacturing, warehouse management, finance, and so on. It is possible that the sales functions are carried out on another system than the manufacturing, the warehouse management or the accounting. Furthermore, some information exchange with the customer, a supplier or a bank may be involved in the process.)
    ALE helps to coordinate the whole business process by defining it within a global model. In this model the business rules for the distribution are defined. Via the model the sub-processes get to know which part of the overall process they have to do themselves and when they have to pass the process over to another system. Through this the whole business process gets harmonized.
    Receiver determination:
    For distributed business processes a sub-process on one application (client) has to start another sub-process on another application (server). It is important that the new sub-process is started on the right server. Which server is the right one can not be defined by technical values, it depends on the business content of the process.
    (Example: A sales system forwards customer orders to two different production systems. To which system a special sales order is forwarded depends on the entries in the sales order (this may depend, for instance, on the ordered material or on the customer). One sales order may also be split into two or more different orders that may be forwarded to different production systems.)
    To notify the client which system is the receiver of the communication (server), ALE uses a distribution model. From this model the applications get the information about the right server. There are special ALE BAPIs and function modules available for this. The receiver determination makes sure that the information is sent to the right places.
    Business object synchronization (semantic synchronization):
    If business processes run across distributed systems, they have to share some data to be harmonized. This is data like business information data, master data or customizing data. If this data is changed in any of the distributed systems, other systems have to be informed about the change. There has to be some kind of subscription of the data.
    ALE provides a special service for this data synchronization. This service can detect data changes and distribute the information to those systems that need to know about the change. This service also defines which data is shared. You can determine which fields of a data object shall be common and which fields may vary locally.
    Consistency checks:
    For a business process running across two distributed applications there has to be some harmonization of the sub-processes in the single applications. For making sure that the sub processes are harmonized there are special ALE consistency check tools. These tools help to find and repair inconsistencies. By this it can be ensured that the whole ALE business process works in the right way.
    Monitoring:
    For the monitoring of distributed processes it is not enough to monitor all activities on the single systems. The overall business process has to be monitored. The ALE monitoring services provide detailed information about the communication process, the sub-process on the other systems and its results. Database links are created between the business objects in question on the client and the server. This is especially important for loosely coupled applications with asynchronous links. In this case the server can not give return values back to the client directly so that the ALE monitoring is the only channel for feedback.
    Error handling:
    Another problem with asynchronous communication is error handling. If an error occurs on the server the calling process on the client may have finished already. So the server can not return the error message to the client. A special error handling process required. This process is one of the ALE services. It uses workflow functionality to identify the error and to start the required error handling.
    7. Synchronous vs. asynchronous links?
    When distributed applications are linked by ALE business processes, the question often arises as to how tight the link should be. Synchronous and asynchronous links have both advantages and disadvantages.
    Synchronous links have the advantage that the sub-process on the server can return values to the sub-process on the client that has started the link. Problems with synchronous links occur if the communication line or the server is temporarily not available. If this happens, the sub-process on the client can not be finished (otherwise there would be data inconsistencies).
    (Example: There is a logistics system and a financial system. Every stock movement in logistics has to be posted in the general ledger of the financial system. If the link between logistics and finance is synchronous, no stock movement can be recorded in the logistics system if the communication line to the financial system is down.)
    Because of this, synchronous links are usually used if the client only wants to get some data from the server and the sub-processes on the server do not have to write any data to the database.
    With asynchronous links the sub-process on the client can be finished even if the communication line or the server is not available. In this case the message is stored in the database and the communication can be done later. The disadvantage of asynchronous links is that the sub-process on the server can not return information to the calling sub-process on the client. A special way for sending information back to the client is required. In addition, a special error handling mechanism is required to handle errors on the receiving side.
    Asynchronous links are used if a synchronous link is not applicable. For the problems with sending return information to the client and with error handling there is some support from the ALE services.
    8. Which kind of interfaces do ALE business processes use?
    ALE business processes are integrated processes across distributed systems, requiring interfaces between the systems. These interfaces have to be stable to enable the communication between different releases and to reduce the impact of release changes within the distributed environment.
    In SAP R/3 release 3.0 and 3.1 ALE uses IDocs as interfaces. An IDocs is a data container for transferring messages asynchronously. They are release independent. Since SAP Release 3.1G BAPIs are a new type of object oriented, stable interfaces that can be called synchronously or asynchronously. Asynchronous BAPIs use IDocs as data containers. ALE business processes can use BAPIs as well. In the future new ALE business processes will use BAPIs as interfaces. But the existing IDocs will still be supported. In time, BAPIs will be created with similar functionality to existing IDoc interfaces.
    9. Why does SAP uses ALE instead of database replication or distributed databases?
    Database replication is another possibility for doing business object synchronization. However, there are some major disadvantages with database replication. At the moment database replication is database dependent and release dependent within one database. This makes database replication impossible for the use with non-SAP systems and even for the replication between SAP Systems you have to make sure that all systems are running on the same SAP release and the same database release of a single database vendor. Furthermore, with database replication you cannot do things like field conversions or version changes. ALE does not have these shortcomings because it offers application driven data replication independent of the underlying database.
    Another technology, distributed databases, is no alternative for ALE at the moment, either. There are some good results of distributed databases available, but the performance is far from sufficient for using it with larger applications like SAP.
    10. What is the relationship between ALE and middleware?
    For distributed business processes many different services are required. Most of these services are offered by SAP. For some of these services you can also use products that are provided by SAP's complementary software partners or by other companies:
    The communication service for doing the pure communication is usually done via Remote Function Call (RFC). RFC is provided by SAP for most platforms both for synchronous and asynchronous communication. There are other messaging systems for the communication service available as well, like IBM's MQSeries. However, the communication between SAP and the messaging system is still done via RFC.
    For the serialization of asynchronous communication the RFC provides little functionality at the moment. The serialization has to be checked by the application. ALE offers some support to do these checks. The serialization of the RFC communication will be improved in the future. Serialization services are provided by some of the existing messaging systems, but even they can not guaranty a 100% serialization of the communication, since they use RFC for the connection to SAP.
    The monitoring and error handling of the communication is done via services provided by the RFC and ALE. If messaging systems are used for the communication they also offer some monitoring and error handling functionality.
    If a non-SAP system is involved in the ALE business scenario and this system does not understand SAP's BAPI or IDoc interfaces, the data has to be mapped to any interface structure that this system offers. For this mapping SAP does not provide a service but it certifies mapping tools from software partners. These tools are called ALE translator. The most known product in this area is probably Mercator from TSI International Software. The same kind of mapping can also be done by 'EDI converters'.
    Another type of middleware products offer process ware. This is mainly a combination of the communication service, the mapping service and a set of rules for the mapping. Some ALE translator can be used for this as well.
    Receiver determination is one of the ALE services (see above). Parts of this service can also be provided by some of the messaging systems, but you cannot use these systems without using ALE receiver determination.
    For the other ALE services like application monitoring, application error handling, semantic synchronization and business process harmonization, there are no middleware products available as a replacement of ALE.
    ALE is open for the use of middleware products for the distribution, but in most cases the additional middleware is not necessary. In a communication between different SAP systems usually the use of additional middleware makes no sense at all. For the communication between SAP and non-SAP systems there might be some benefits, especially if the middleware is used at the company already. The only middleware tool that is really required if the non-SAP system does not understand BAPIs or IDocs is an ALE translator.
    Regards

  • ALE INTERFACE BOR KNA1 error generetion in transaction BDGD

    Moderator message: Do not use the word "urgently" in your posts.  It is generally considered quite rude to do so.  I have edited the subject.
    Hello! i would like to implement ALE interface of the BAPI BAPI_CUSTOMER_CREATEFROMDATA1 (business object KNA1) to use it in transaction LSMW but until i generate the interface using transaction BDGD the program block the generation and give me the follow error:
    Segment Z1BPKNA105 is used multiple times in IDoc types
    Message no. EA799
    Diagnosis
    Segment type Z1BPKNA105 is used multiple times in the IDoc type. A segment type may only be used once in each IDoc type.
    What i have to do for resolve the error and generate ALE interface of BAPI BAPI_CUSTOMER_CREATEFROMDATA1???
    HELP ME THANKS!!
    Edited by: Matt on Nov 7, 2008 5:25 PM
    Edited by: Matt on Nov 7, 2008 5:25 PM

    >
    Matt wrote:
    > What would you like me to change it to?
    I was going to add a "Too late ;-)" but it probably doesn't matter now
    Rob

  • Regarding BDC's, BAPI's, ALE ,IDOCs, BADI's

    Hi all,
    can any one send materials with screen shots having example programs
    for BDC's, BAPI's, ALE ,IDOCs, BADI's
    to my mail id
    <b><REMOVED BY MODERATOR></b>
    regards and thanks
    venu
    Message was edited by:
            Alvaro Tejada Galindo

    hi
    For BDC:
    http://myweb.dal.ca/hchinni/sap/bdc_home.htm
    https://www.sdn.sap.com/irj/sdn/wiki?path=/display/home/bdc&
    http://www.sap-img.com/abap/learning-bdc-programming.htm
    http://www.sapdevelopment.co.uk/bdc/bdchome.htm
    http://www.sap-img.com/abap/difference-between-batch-input-and-call-transaction-in-bdc.htm
    http://help.sap.com/saphelp_47x200/helpdata/en/69/c250684ba111d189750000e8322d00/frameset.htm
    http://www.sapbrain.com/TUTORIALS/TECHNICAL/BDC_tutorial.html
    Check these link:
    http://www.sap-img.com/abap/difference-between-batch-input-and-call-transaction-in-bdc.htm
    http://www.sap-img.com/abap/question-about-bdc-program.htm
    http://www.itcserver.com/blog/2006/06/30/batch-input-vs-call-transaction/
    http://www.planetsap.com/bdc_main_page.htm
    call Transaction or session method ?
    http://www.sapbrain.com/FAQs/TECHNICAL/SAP_ABAP_DATADICTIONARY_FAQ.html
    http://www.****************/InterviewQ/interviewQ.htm
    http://help.sap.com/saphelp_46c/helpdata/en/35/2cd77bd7705394e10000009b387c12/frameset.htm
    ALE/ IDOC
    http://help.sap.com/saphelp_erp2004/helpdata/en/dc/6b835943d711d1893e0000e8323c4f/content.htm
    http://www.sapgenie.com/sapgenie/docs/ale_scenario_development_procedure.doc
    http://edocs.bea.com/elink/adapter/r3/userhtm/ale.htm#1008419
    http://www.netweaverguru.com/EDI/HTML/IDocBook.htm
    http://www.sapgenie.com/sapedi/index.htm
    http://www.sappoint.com/abap/ale.pdf
    http://www.sappoint.com/abap/ale2.pdf
    http://www.sapgenie.com/sapedi/idoc_abap.htm
    http://help.sap.com/saphelp_erp2005/helpdata/en/0b/2a60bb507d11d18ee90000e8366fc2/frameset.htm
    http://help.sap.com/saphelp_erp2005/helpdata/en/78/217da751ce11d189570000e829fbbd/frameset.htm
    http://www.allsaplinks.com/idoc_sample.html
    http://www.sappoint.com/abap.html
    http://help.sap.com/saphelp_erp2004/helpdata/en/dc/6b835943d711d1893e0000e8323c4f/content.htm
    http://www.sapgenie.com/sapgenie/docs/ale_scenario_development_procedure.doc
    http://edocs.bea.com/elink/adapter/r3/userhtm/ale.htm#1008419
    http://www.netweaverguru.com/EDI/HTML/IDocBook.htm
    http://www.sapgenie.com/sapedi/index.htm
    http://www.allsaplinks.com/idoc_sample.html
    Check these step-by-step links
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/uuid/ccab6730-0501-0010-ee84-de050a6cc287
    https://sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/uuid/8fd773b3-0301-0010-eabe-82149bcc292e
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/uuid/3c5d9ae3-0501-0010-0090-bdfb2d458985
    BAPI
    http://help.sap.com/saphelp_46c/helpdata/en/9b/417f07ee2211d1ad14080009b0fb56/frameset.htm
    http://searchsap.techtarget.com/originalContent/0,289142,sid21_gci948835,00.html
    Checkout !!
    http://searchsap.techtarget.com/originalContent/0,289142,sid21_gci948835,00.html
    http://techrepublic.com.com/5100-6329-1051160.html#
    http://www.sap-img.com/bapi.htm
    http://www.sap-img.com/abap/bapi-conventions.htm
    http://www.sappoint.com/abap/bapiintro.pdf
    http://www.sapgenie.com/abap/bapi/example.htm
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCMIDAPII/CABFAAPIINTRO.pdf
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/CABFABAPIREF/CABFABAPIPG.pdf
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCFESDE8/BCFESDE8.pdf
    List of all BAPIs
    http://www.planetsap.com/LIST_ALL_BAPIs.htm
    http://www.sappoint.com/abap/bapiintro.pdf
    http://www.sappoint.com/abap/bapiprg.pdf
    http://www.sappoint.com/abap/bapiactx.pdf
    http://www.sappoint.com/abap/bapilst.pdf
    http://www.sappoint.com/abap/bapiexer.pdf
    http://service.sap.com/ale
    http://service.sap.com/bapi
    http://www.geocities.com/mpioud/Abap_programs.html
    http://www.sapdevelopment.co.uk/reporting/reportinghome.htm
    <b><REMOVED BY MODERATOR></b>
    regards
    Nagesh.Paruchuri
    Message was edited by:
            Alvaro Tejada Galindo

  • Transport of ALE Interfaces for Function Module

    hi,
    i have a Z function module, Z business object type and z message type identifying ALE interface.
    i need to move all the objects from Dev R3 to QA R3. What are the steps involved?
    Thanks,
    Tirumal

    Hi
    While creating a Z function module it will ask you for a change request number. attach it to change request and migrate it to Production.
    In case your function group to which you assigned this function module is open then the CTS number will by default come in CTS number field if any exists for the function group. You can now migrate your CTS to production.
    Now after assinging function module to a CTS you can be sure that your program for function module and FM both will be migrated. For confirmation you can now check attribuutes section in your function module. it will list the SAP program associated with Func mod , function group to which function module is assigned , package and include programs which needs to be migrated. So you only need to attach a CTS and migrate your CTS.
    You can create a Change erquest (CTS) in SE01 or SE10 transactions.
    Regards,
    Amit.
    Please reward any help
    Message was edited by: amit bhadauria
    Message was edited by: amit bhadauria

  • Inbound ALE interface for HR Master and OM data

    Dear Experts,
    I have a requirement for ALE interface to create and maintain HR master and OM data with the details coming from external HR system and I need to send back the pernrs,position or org. unit created back to external system.I am trying to use HRMD_A message type for this interface which will use  FM IDOC_INPUT_HRMD to post the idocs which will update the DB tables of infotypes directly.But in my case i need to create the pernr or position with details coming from external system and send them back.how i can create and catch these details using this standard FM IDOC_INPUT_HRMD?
    Thanks a lot in anticipation!!

    Hi Ramnaresh,
    Did you get the solution for this. we have the similar requirement from people soft to SAP but only one direction.
    We are using the IDOC ( IDOC_INPUT_HRMD). It is working fine except for the fields KOSTL (Cost Center), ORGEH (Org Key), SETLL (Job key) in infotype 0001. the values are showing in generated IDOC but not updating the infotype table PA0001.
    The functionality is working fine for other fields and other infotypes.
    When I debug the program it is dealing with the config table T77S0 parameters: PLOGI , ORGA , Value 'X'.
    If we maintain this value, I am getting the below error message.
    The EMPLOYEE_ORG_ASSIGNMENT-COSTCENTER field cannot be maintained in dialog, which means you cannot fill it with data at this point. It is calculated automatically by the system.
    If the Config, table parameters are not maintained, then IDOC is in successful state but not updating the cost center in PA0001.
    Can you please let me know if you get any solution on this.
    Thanks,
    Jitender

  • Testing ALE Interface

    Hi Friends,
    How do we test ALE Interface.
    Please provide me with stpes for configuring the ALE Interface for SAP-SAP,SAP-Non SAP scenarios on Outbound & Inbound Systems.
    After configuring,How do we send the data.
    <REMOVED BY MODERATOR>
    Thanks
    Edited by: Alvaro Tejada Galindo on Feb 14, 2008 11:01 AM

    Hi Annapurna,
    you can try these links as well .
    IDOCS:
    http://www.sappro.com/downloads/OneClientDistribution.pdf
    http://www.sapgenie.com/sapgenie/docs/ale_scenario_development_procedure.doc
    http://www.sapgenie.com/sapedi/idoc_abap.htm
    ALE/IDOCS:
    http://www.netweaverguru.com/EDI/HTML/IDocBook.htm#_Toc8400404
    http://help.sap.com/saphelp_erp2005/helpdata/en/0b/2a6620507d11d18ee90000e8366fc2/frameset.htm
    http://www.sappoint.com/presentation.html
    http://www.allsaplinks.com/idoc_search.html
    http://www.sapgenie.com/sapedi/idoc_abap.htm
    http://help.sap.com/saphelp_erp2004/helpdata/en/dc/6b835943d711d1893e0000e8323c4f/content.htm
    http://www.sapgenie.com/sapgenie/docs/ale_scenario_development_procedure.doc
    http://edocs.bea.com/elink/adapter/r3/userhtm/ale.htm#1008419
    http://www.netweaverguru.com/EDI/HTML/IDocBook.htm
    http://www.sapgenie.com/sapedi/index.htm
    http://www.sappoint.com/abap/ale.pdf
    http://www.sappoint.com/abap/ale2.pdf
    http://www.sapgenie.com/sapedi/idoc_abap.htm
    http://help.sap.com/saphelp_erp2005/helpdata/en/0b/2a60bb507d11d18ee90000e8366fc2/frameset.htm
    http://help.sap.com/saphelp_erp2005/helpdata/en/78/217da751ce11d189570000e829fbbd/frameset.htm
    http://www.allsaplinks.com/idoc_sample.html
    http://www.sappoint.com/abap.html
    http://help.sap.com/saphelp_erp2004/helpdata/en/dc/6b835943d711d1893e0000e8323c4f/content.htm
    http://www.sapgenie.com/sapgenie/docs/ale_scenario_development_procedure.doc
    http://edocs.bea.com/elink/adapter/r3/userhtm/ale.htm#1008419
    http://www.netweaverguru.com/EDI/HTML/IDocBook.htm
    http://www.sapgenie.com/sapedi/index.htm
    http://www.allsaplinks.com/idoc_sample.html
    or have a look at this thread..
    https://forums.sdn.sap.com/click.jspa?searchID=8882009&messageID=4770944
    Regards,
    Ramesh.

  • ALE interface generation from BAPI_POEC_CREATE

    Hi,
    I want to generate an ALE interface from BAPI_POEC_CREATE (object type BUS2201).
    FUNCTION BAPI_POEC_CREATE.
    *"*"Lokale Schnittstelle:
    *"  IMPORTING
    *"     VALUE(I_PO_HEADER) LIKE  BAPI_PO_HEADER_C STRUCTURE
    *"        BAPI_PO_HEADER_C
    *"     VALUE(I_PO_HEADER_CUST) LIKE  BAPI_PO_HEADER_CUST_C STRUCTURE
    *"        BAPI_PO_HEADER_CUST_C OPTIONAL
    *"     VALUE(I_TESTRUN) TYPE  BBPS_BAPI2091-TESTRUN DEFAULT SPACE
    *"  EXPORTING
    *"     VALUE(E_PO_HEADER) TYPE  BAPI_PO_HEADER_D
    *"     VALUE(E_PO_HEADER_CUST) TYPE  BAPI_PO_HEADER_CUST_D
    *"  TABLES
    *"      I_PO_ITEMS STRUCTURE  BAPI_PO_ITEM_C OPTIONAL
    *"      I_PO_ITEMS_CUST STRUCTURE  BAPI_PO_ITEM_CUST_C OPTIONAL
    *"      I_PO_ACCASS STRUCTURE  BAPI_ACC_C OPTIONAL
    *"      I_PO_ACCASS_CUST STRUCTURE  BAPI_ACC_CUST_C OPTIONAL
    *"      I_PO_PARTNER STRUCTURE  BAPI_BUP_C OPTIONAL
    *"      I_PO_TEXT STRUCTURE  BAPI_TEXT_I OPTIONAL
    *"      I_PO_ATTACH STRUCTURE  BAPI_ATT_C OPTIONAL
    *"      I_PO_ORGDATA STRUCTURE  BAPI_ORG_C OPTIONAL
    *"      I_PO_LIMIT STRUCTURE  BAPI_LIMIT_C OPTIONAL
    *"      I_PO_SDLN STRUCTURE  BAPI_SDLN_C OPTIONAL
    *"      E_PO_ITEMS STRUCTURE  BAPI_PO_ITEM_D OPTIONAL
    *"      E_PO_ITEMS_CUST STRUCTURE  BAPI_PO_ITEM_CUST_D OPTIONAL
    *"      E_PO_ACCASS STRUCTURE  BAPI_ACC_D OPTIONAL
    *"      E_PO_ACCASS_CUST STRUCTURE  BAPI_ACC_CUST_D OPTIONAL
    *"      E_PO_PARTNER STRUCTURE  BAPI_BUP_D OPTIONAL
    *"      E_PO_ORGDATA STRUCTURE  BAPI_ORG_D OPTIONAL
    *"      E_PO_LIMIT STRUCTURE  BAPI_LIMIT_D OPTIONAL
    *"      E_PO_SDLN STRUCTURE  BAPI_SDLN_D OPTIONAL
    *"      E_PO_TEXT STRUCTURE  BAPI_TEXT_I OPTIONAL
    *"      E_PO_STATUS STRUCTURE  BAPI_BBP_STATUS OPTIONAL
    *"      E_PO_ATTACH STRUCTURE  BAPI_ATT_D OPTIONAL
    *"      RETURN STRUCTURE  BAPIRET2 OPTIONAL
    1) I encoutered a first problem : as you can see, these are two parameters with the same type BAPI_TEXT_I. So it gives an error message during generation in BDBG. I can bypass this error by deleting the second parameter (E_PO_TEXT) in debug. But I don't like this method of course...
    2) I have a second problem : the three parameters I_PO_HEADER_CUST, I_PO_ITEMS_CUST, I_PO_ACCASS_CUST are not taken in account in the generated FM (ZIDOC_INPUT_ZPURCHASEORDEREC_C), even if corresponding EDI segments are generated. I needed to add them manually (at the end of the following code) :
    FUNCTION zidoc_input_zpurchaseorderec_c.
    *"*"Interface locale :
    *"  IMPORTING
    *"     VALUE(INPUT_METHOD) LIKE  BDWFAP_PAR-INPUTMETHD
    *"     VALUE(MASS_PROCESSING) LIKE  BDWFAP_PAR-MASS_PROC
    *"  EXPORTING
    *"     VALUE(WORKFLOW_RESULT) LIKE  BDWF_PARAM-RESULT
    *"     VALUE(APPLICATION_VARIABLE) LIKE  BDWF_PARAM-APPL_VAR
    *"     VALUE(IN_UPDATE_TASK) LIKE  BDWFAP_PAR-UPDATETASK
    *"     VALUE(CALL_TRANSACTION_DONE) LIKE  BDWFAP_PAR-CALLTRANS
    *"  TABLES
    *"      IDOC_CONTRL STRUCTURE  EDIDC
    *"      IDOC_DATA STRUCTURE  EDIDD
    *"      IDOC_STATUS STRUCTURE  BDIDOCSTAT
    *"      RETURN_VARIABLES STRUCTURE  BDWFRETVAR
    *"      SERIALIZATION_INFO STRUCTURE  BDI_SER
    *"  EXCEPTIONS
    *"      WRONG_FUNCTION_CALLED
    *  this function module is generated                                   *
    *          never change it manually, please!        10.06.2008         *
      DATA:
          z1zpurchaseorderec_create LIKE z1zpurchaseorderec_create,
          z1bp_po_header_c LIKE z1bp_po_header_c,
          z1bp_po_item_c LIKE z1bp_po_item_c,
          z1bp_acc_c LIKE z1bp_acc_c,
          z1bp_bup_c LIKE z1bp_bup_c,
          z1bp_bup_c1 LIKE z1bp_bup_c1,
          z1bp_bup_c2 LIKE z1bp_bup_c2,
          z1bp_text_i LIKE z1bp_text_i,
          z1bp_att_c LIKE z1bp_att_c,
          z1bp_org_c LIKE z1bp_org_c,
          z1bp_limit_c LIKE z1bp_limit_c,
          z1bp_po_item_d LIKE z1bp_po_item_d,
          z1bp_po_item_d1 LIKE z1bp_po_item_d1,
          z1bp_acc_d LIKE z1bp_acc_d,
          z1bp_bup_d LIKE z1bp_bup_d,
          z1bp_bup_d1 LIKE z1bp_bup_d1,
          z1bp_bup_d2 LIKE z1bp_bup_d2,
          z1bp_org_d LIKE z1bp_org_d,
          z1bp_limit_d LIKE z1bp_limit_d,
          z1bp_bbp_status LIKE z1bp_bbp_status,
          z1bp_att_d LIKE z1bp_att_d,
    * go through all IDocs                                                 *
      LOOP AT idoc_contrl.
    *   select segments belonging to one IDoc                              *
        REFRESH t_edidd.
        LOOP AT idoc_data WHERE docnum = idoc_contrl-docnum.
          APPEND idoc_data TO t_edidd.
        ENDLOOP.
    *   through all segments of this IDoc                                  *
        CLEAR error_flag.
        REFRESH bapi_retn_info.
        CATCH SYSTEM-EXCEPTIONS conversion_errors = 1.
          LOOP AT t_edidd INTO idoc_data.
            CASE idoc_data-segnam.
              WHEN 'Z1ZPURCHASEORDEREC_CREATE'.
                z1zpurchaseorderec_create = idoc_data-sdata.
                MOVE z1zpurchaseorderec_create-i_testrun
                  TO i_testrun.
              WHEN 'Z1BP_PO_HEADER_C'.
                z1bp_po_header_c = idoc_data-sdata.
                MOVE-CORRESPONDING z1bp_po_header_c
                   TO i_po_header.                              "#EC ENHOK
                IF z1bp_po_header_c-doc_date
                   IS INITIAL.
                  CLEAR i_po_header-doc_date.
                ENDIF.
                IF z1bp_po_header_c-pcdat_to
                   IS INITIAL.
                  CLEAR i_po_header-pcdat_to.
                ENDIF.
                IF z1bp_po_header_c-vper_start
                   IS INITIAL.
                  CLEAR i_po_header-vper_start.
                ENDIF.
                IF z1bp_po_header_c-vper_end
                   IS INITIAL.
                  CLEAR i_po_header-vper_end.
                ENDIF.
              WHEN 'Z1BP_PO_ITEM_C'.
                z1bp_po_item_c = idoc_data-sdata.
                MOVE-CORRESPONDING z1bp_po_item_c
                   TO i_po_items.                               "#EC ENHOK
                IF z1bp_po_item_c-deliv_date
                   IS INITIAL.
                  CLEAR i_po_items-deliv_date.
                ENDIF.
                APPEND i_po_items.
              WHEN 'Z1BP_ACC_C'.
                z1bp_acc_c = idoc_data-sdata.
                MOVE-CORRESPONDING z1bp_acc_c
                   TO i_po_accass.                              "#EC ENHOK
                APPEND i_po_accass.
              WHEN 'Z1BP_BUP_C'.
                z1bp_bup_c = idoc_data-sdata.
                MOVE-CORRESPONDING z1bp_bup_c
                   TO i_po_partner.                             "#EC ENHOK
                READ TABLE t_edidd TRANSPORTING NO FIELDS WITH KEY
                             segnam = 'Z1BP_BUP_C1'.
                IF sy-subrc <> 0.
                  APPEND i_po_partner.
                ENDIF.
              WHEN 'Z1BP_BUP_C1'.
                z1bp_bup_c1 = idoc_data-sdata.
                MOVE-CORRESPONDING z1bp_bup_c1
                   TO i_po_partner.                             "#EC ENHOK
                READ TABLE t_edidd TRANSPORTING NO FIELDS WITH KEY
                             segnam = 'Z1BP_BUP_C2'.
                IF sy-subrc <> 0.
                  APPEND i_po_partner.
                ENDIF.
              WHEN 'Z1BP_BUP_C2'.
                z1bp_bup_c2 = idoc_data-sdata.
                MOVE-CORRESPONDING z1bp_bup_c2
                   TO i_po_partner.                             "#EC ENHOK
                APPEND i_po_partner.
              WHEN 'Z1BP_TEXT_I'.
                z1bp_text_i = idoc_data-sdata.
                MOVE-CORRESPONDING z1bp_text_i
                   TO e_po_text.                                "#EC ENHOK
                APPEND e_po_text.
              WHEN 'Z1BP_ATT_C'.
                z1bp_att_c = idoc_data-sdata.
                MOVE-CORRESPONDING z1bp_att_c
                   TO i_po_attach.                              "#EC ENHOK
                APPEND i_po_attach.
              WHEN 'Z1BP_ORG_C'.
                z1bp_org_c = idoc_data-sdata.
                MOVE-CORRESPONDING z1bp_org_c
                   TO i_po_orgdata.                             "#EC ENHOK
                APPEND i_po_orgdata.
              WHEN 'Z1BP_LIMIT_C'.
                z1bp_limit_c = idoc_data-sdata.
                MOVE-CORRESPONDING z1bp_limit_c
                   TO i_po_limit.                               "#EC ENHOK
                APPEND i_po_limit.
              WHEN 'Z1BP_PO_ITEM_D'.
                z1bp_po_item_d = idoc_data-sdata.
                MOVE-CORRESPONDING z1bp_po_item_d
                   TO e_po_items.                               "#EC ENHOK
                IF z1bp_po_item_d-deliv_date
                   IS INITIAL.
                  CLEAR e_po_items-deliv_date.
                ENDIF.
                READ TABLE t_edidd TRANSPORTING NO FIELDS WITH KEY
                             segnam = 'Z1BP_PO_ITEM_D1'.
                IF sy-subrc <> 0.
                  APPEND e_po_items.
                ENDIF.
              WHEN 'Z1BP_PO_ITEM_D1'.
                z1bp_po_item_d1 = idoc_data-sdata.
                MOVE-CORRESPONDING z1bp_po_item_d1
                   TO e_po_items.                               "#EC ENHOK
                APPEND e_po_items.
              WHEN 'Z1BP_ACC_D'.
                z1bp_acc_d = idoc_data-sdata.
                MOVE-CORRESPONDING z1bp_acc_d
                   TO e_po_accass.                              "#EC ENHOK
                APPEND e_po_accass.
              WHEN 'Z1BP_BUP_D'.
                z1bp_bup_d = idoc_data-sdata.
                MOVE-CORRESPONDING z1bp_bup_d
                   TO e_po_partner.                             "#EC ENHOK
                READ TABLE t_edidd TRANSPORTING NO FIELDS WITH KEY
                             segnam = 'Z1BP_BUP_D1'.
                IF sy-subrc <> 0.
                  APPEND e_po_partner.
                ENDIF.
              WHEN 'Z1BP_BUP_D1'.
                z1bp_bup_d1 = idoc_data-sdata.
                MOVE-CORRESPONDING z1bp_bup_d1
                   TO e_po_partner.                             "#EC ENHOK
                READ TABLE t_edidd TRANSPORTING NO FIELDS WITH KEY
                             segnam = 'Z1BP_BUP_D2'.
                IF sy-subrc <> 0.
                  APPEND e_po_partner.
                ENDIF.
              WHEN 'Z1BP_BUP_D2'.
                z1bp_bup_d2 = idoc_data-sdata.
                MOVE-CORRESPONDING z1bp_bup_d2
                   TO e_po_partner.                             "#EC ENHOK
                APPEND e_po_partner.
              WHEN 'Z1BP_ORG_D'.
                z1bp_org_d = idoc_data-sdata.
                MOVE-CORRESPONDING z1bp_org_d
                   TO e_po_orgdata.                             "#EC ENHOK
                APPEND e_po_orgdata.
              WHEN 'Z1BP_LIMIT_D'.
                z1bp_limit_d = idoc_data-sdata.
                MOVE-CORRESPONDING z1bp_limit_d
                   TO e_po_limit.                               "#EC ENHOK
                APPEND e_po_limit.
              WHEN 'Z1BP_BBP_STATUS'.
                z1bp_bbp_status = idoc_data-sdata.
                MOVE-CORRESPONDING z1bp_bbp_status
                   TO e_po_status.                              "#EC ENHOK
                APPEND e_po_status.
              WHEN 'Z1BP_ATT_D'.
                z1bp_att_d = idoc_data-sdata.
                MOVE-CORRESPONDING z1bp_att_d
                   TO e_po_attach.                              "#EC ENHOK
                APPEND e_po_attach.
    *** JSE 12/06/08 segments "forgotten" by BDBG
              WHEN 'Z1BP_PO_HEADER_CUST_C'.
                z1bp_po_header_cust_c = idoc_data-sdata.
                MOVE-CORRESPONDING z1bp_po_header_cust_c
                  TO i_po_header_cust_c.
              WHEN 'Z1BP_PO_ITEM_CUST_C'.
                z1bp_po_item_cust_c = idoc_data-sdata.
                MOVE-CORRESPONDING z1bp_po_item_cust_c
                   TO s_po_items_cust.                          "#EC ENHOK
                APPEND s_po_items_cust TO i_po_items_cust.
              WHEN 'Z1BP_ACC_CUST_C'.
                z1bp_acc_cust_c = idoc_data-sdata.
                MOVE-CORRESPONDING z1bp_acc_cust_c
                   TO s_po_accass_cust.                         "#EC ENHOK
                APPEND s_po_accass_cust TO i_po_accass_cust.
    *** JSE 12/06/08
            ENDCASE.
          ENDLOOP.
        ENDCATCH.
    As for first point, I don't like this method, because it modifies a generated FM. Is there a way to force generation of this 3 parameters by BDBG ?
    3) Considering the risk of overwriting modications in the generated FM, I have these questions : when are regenerated interfaces created by BDBG ? Are they regenerated always manually ? Or are they regenerated during transport for example ?
    Thanks a lot for your help.
    Julien.

    Hi,
    Pls see this very useful thread:
    Re: 'BAPI_POEC_CREATE' function doesn't work with extended classic scenario
    BR,
    Disha.
    Do reward points for useful answers.

  • ALE Interface Error

    Experts
    Im trying to generate an ALE interface for BUS0050. The process errors with "Segment ZIBP_0050_ITEM is used multiple times in IDOC types".
    I have also tried this using a copy of the Object and get the same result
    thanks for your help
    Andy

    hi,  I think segment ZIBP_0050_ITEM  is a customize segment which be added by EEWB, right?
    Sometime, the problem in EEWB enhance field will impact our idoc generation.
    in my opinion,  you'd better delete all the customziing idoc type for BUS0050.
    Then go to EEWB, delete the custimizing field related to ZIBP_0050_ITEM, and create them again.

  • ALE-Interface and batch file

    Hi,
    So far we have transferred Data from one system to main system through ALE-Interface and Batch file. Now we are thinking to harmonize and optimize this process and run all data transfers though ALE-Interface and eliminate Batch File process.
    Can anybody tell me, why the ALE-Interface is better than Batch file for data transfers?
    Thanks

    Batch file is carried out at offline and at certain time intervals
    where as ALE is online transfer and while triggering a particular tcode it can be made to trigger
    This is why ALE is best
    cheers
    S.Janagar

  • ALE interface to same client - different machines.

    Is it possible to create an ALE Interface to the same client(200 to 200) for sample testing or customizing ??
    Thanks in advance.

    I think this depends on the logical system name of the clients. you can check in scc4.
    regards,
    martin

Maybe you are looking for