BAPI-ALE Interfaces

Published On: July 19, 2008

BAPI-ALE INTERFACES Summary:
This document talks about custom BAPI creation and generating the ALE interface for the Custom BAPI. BAPIs are integrated into the ALE communication model. ALE communication is asynchronous and message-based. ALE communication is the preferred way to integrate distributed SAP Systems, for example, for distributing master data. Since Release 4.0 BAPIs are the standardized interfaces for ALE-supported communication. ALE services, such as asynchronous BAPI calls, distribution model, monitoring and error handling can be used for BAPIs. The IDoc types required for the ALE services can be generated from BAPIs.

Author(s): Izhar Khan Company: Deloitte Consulting India Pvt Ltd

Izhar Khan is working as SAP Netweaver Consultant with Deloitte Consulting India Pvt Ltd. His key areas are ABAP, XI & ALE.

SAP GEEKS CLUB

http://sapgeeksclub.com

BAPI-ALE Interfaces

Published On: July 19, 2008

TABLE OF CONTENT 1.0 Introduction............................................................................................................... 3 1.1 Concept ................................................................................................................. 3 1.2 Mini requirement for the creation of a BAPI........................................................ 4 2.0 Step by Step BAPI-ALE Interface creation .............................................................. 5

SAP GEEKS CLUB

http://sapgeeksclub.com

BAPI-ALE Interfaces

Published On: July 19, 2008

1.0 Introduction
This document talks about custom BAPI creation and generating the ALE interface for the Custom BAPI.
BAPIs are integrated into the ALE communication model. ALE communication is asynchronous and message-based. ALE communication is the preferred way to integrate distributed SAP Systems, for example, for distributing master data. Since Release 4.0 BAPIs are the standardized interfaces for ALE-supported communication. ALE services, such as asynchronous BAPI calls, distribution model, monitoring and error handling can be used for BAPIs. The IDoc types required for the ALE services can be generated from BAPIs.

1.1 Concept
Below Object stack shows flow of message from source system to target system. Object Stack: o/b – outbound i/b – inbound

Once ALE-BAPI interface is created, below objects will get generated. 1. Inbound function module 2. Outbound function module 3. Custom IDoc type 4. Custom message type SAP GEEKS CLUB http://sapgeeksclub.com

SAP GEEKS CLUB http://sapgeeksclub. On receiver side. On receiver side. Above inbound function module sits a BAPI and supporting Business object.com . 2. When any Object event is triggered. it will be received by BAPI-ALE inbound function module based on partner profile settings. b. Explicitly calling BAPI-ALE outbound function module.2 Mini requirement for the creation of a BAPI Do not use “type” for parameters. This IDoc will then get transmitted to corresponding target system via tRFC based on Partner profile setting. Via some object event a.BAPI  If Filter Objects are to be used. Must be “RFC enabled” Note:  For full BAPI compliance. a. Inbound function module will convert this IDoc data into structures/tables of BAPI and the BAPI in turn shall implement the required Business logic. but are not utilized during the processing of the inbound IDoc. One can directly call BAPI-ALE outbound function module by passing all required structure/tables data. 1. parameters must be passed as tables (i. 2008 ALE-BAPI interface is used to push IDoc from one SAP system to another SAP system. b. check the “BAPI Project” in the “BAPI Explorer” . BAPI-ALE outbound function module which will in turn generate corresponding IDoc. Use “like” 2. They are required for the generation of the BAPI-ALE interface objects. 1. Must had “Return” parameter 4. 1.BAPI-ALE Interfaces 5. Inbound function module will convert this IDoc data into structures/tables of BAPI and the BAPI in turn shall implement the required Business logic Notice the inbound process flow exits during the inbound function module. Import parameters must be passed in as “value” 3. multi-line in BAPI parameters. it will be received by BAPI-ALE inbound function module based on partner profile settings. Custom IDoc segments Published On: July 19. This IDoc will then get transmitted to corresponding target system via tRFC using Partner profile setting.e. transaction data is passing to BAPI-ALE outbound function module which will in turn generate corresponding IDoc. IDoc transmission can be triggered in two ways.

Analyze the fields that require filling in the IDOC segment. SAP GEEKS CLUB http://sapgeeksclub. In this scenario structure looks as below. .com . 2008 2. Follow the naming standard as ZBAPI_<FRICEID>_<DESC> 2.0 Step by Step BAPI-ALE Interface creation 1.BAPI-ALE Interfaces Published On: July 19. Create a dictionary structure for the same fields.

Save and assign to a package and request.BAPI-ALE Interfaces Published On: July 19. Create function group. SAP GEEKS CLUB http://sapgeeksclub.com . Follow naming standard as Z<APPLICATION AREAS><FRICE ID> 4. 2008 3.

SAP GEEKS CLUB http://sapgeeksclub.com . Supply function group that was created already. Select Processing type as “Remote-Enabled-Module” as shown in screen shot.Follow naming standard as Z_BAPI_<FRICEID>_<DESC> 6. 7. Create Function module .BAPI-ALE Interfaces Published On: July 19. 2008 5.

Go to TABLE tab pass the structure that was created at first (point: 1) and assign a parameters name. Go to EXPORT tab and pass BAPIRETURN as shown below.com . SAP GEEKS CLUB http://sapgeeksclub. 2008 8.BAPI-ALE Interfaces Published On: July 19. 9. BAPI returns the value.

BAPI-ALE Interfaces Published On: July 19. In the status bar you can see the message. SAP GEEKS CLUB http://sapgeeksclub.Save and activate. Release it as shown below.com . 2008 10 .

2008 11.BAPI-ALE Interfaces Published On: July 19. Object ZMINT207 was created as shown. Follow naming standard as Z<APPLICATION AREA><FRICEID> 12. 13.com . Go to T. Assign values to the fields as shown below and continue. SAP GEEKS CLUB http://sapgeeksclub.code SWO1 and create object.

2008 14. Select on the key fields as shown and select create button on the tool bar. 15.BAPI-ALE Interfaces Published On: July 19. Pass the dictionary table i.e. SAP GEEKS CLUB http://sapgeeksclub. Select YES. 16. as to your scenario and select the key field and continue. A pop up message will display as shown.com .

It added key field (Order) to the node key fields.com .BAPI-ALE Interfaces Published On: July 19. If you want you can change the names & description and then select create button. Add method: To add methods go to menu Utilities->API methods->Add Method SAP GEEKS CLUB http://sapgeeksclub. 18. 19. 2008 17.

com .BAPI-ALE Interfaces Published On: July 19. SAP GEEKS CLUB http://sapgeeksclub. 2008 20 Then it will request for function module name. Supply BAPI that was created earlier (Ref STEP-5) and continue.

Click on the continue arrow as shown. We can change these names if required .com . SAP GEEKS CLUB http://sapgeeksclub. Again continue the screen as shown 23. description. 2008 21. Select YES. It displays a pop up window. name. 22.BAPI-ALE Interfaces Published On: July 19. Then by default it will has a method.

com .BAPI-ALE Interfaces Published On: July 19. It inserted a method under methods node and message can see in the status bar. SAP GEEKS CLUB http://sapgeeksclub. 2008 24.

BAPI-ALE Interfaces Published On: July 19.com . 2008 25. Implement the object type as shown. SAP GEEKS CLUB http://sapgeeksclub.

Message can see in the status bar. SAP GEEKS CLUB http://sapgeeksclub.BAPI-ALE Interfaces Published On: July 19.com . After implemented the object type. 2008 26.

28. Release the object type shown below. 2008 27. Continue the information message SAP GEEKS CLUB http://sapgeeksclub.com .BAPI-ALE Interfaces Published On: July 19.

2008 30.com . SAP GEEKS CLUB http://sapgeeksclub. Released message can see in the status bar. Continue the information message Published On: July 19.BAPI-ALE Interfaces 29.

2008 31. Implement the object type component as shown below.com .BAPI-ALE Interfaces Published On: July 19. SAP GEEKS CLUB http://sapgeeksclub.

Published On: July 19.com .BAPI-ALE Interfaces 32. 2008 SAP GEEKS CLUB http://sapgeeksclub. Implemented status can see in the status bar.

BAPI-ALE Interfaces 31.com . 2008 SAP GEEKS CLUB http://sapgeeksclub. Release object type component as shown below. Published On: July 19.

BAPI-ALE Interfaces 32.com . 2008 SAP GEEKS CLUB http://sapgeeksclub. Published On: July 19. Release status can see in the status bar.

Published On: July 19.BAPI-ALE Interfaces 33.com . As shown below. 2008 34. Finally generate it. SAP GEEKS CLUB http://sapgeeksclub. Generated status can see in the status bar.

Select tab ALPHABETIC. Go to T. 2008 35.BAPI-ALE Interfaces Published On: July 19. SAP GEEKS CLUB http://sapgeeksclub. Check for your object name which was created in the STEP: 12.code BAPI .com .

SAP GEEKS CLUB http://sapgeeksclub. Generate a new ALE interface for BAPI . 2008 36.com . Expand the object name and select method . 37.In the right hand side observes the ALE message type – “does not exit”. Click on.BAPI-ALE Interfaces Published On: July 19.To do this click on the create button as shown.

com . SAP GEEKS CLUB http://sapgeeksclub. 2008 38. Continue.BAPI-ALE Interfaces Published On: July 19. By default it shown the message type with certain name.

By default it has certain names. 2008 39.BAPI-ALE Interfaces Published On: July 19. A pop up interface parameter screen appears .com . Continue SAP GEEKS CLUB http://sapgeeksclub.

BAPI-ALE Interfaces Published On: July 19. Continue SAP GEEKS CLUB http://sapgeeksclub. 2008 40. Check rounded check box as shown.com .

2008 41. As shown below. 42.BAPI-ALE Interfaces Published On: July 19. Click on the IDOC type as shown below SAP GEEKS CLUB http://sapgeeksclub.com . Finally it generated an ALE interface for the BAPI.

com . SAP GEEKS CLUB http://sapgeeksclub. 2008 43. The screen shown as below.BAPI-ALE Interfaces Published On: July 19. Set release status for IDOC as shown. 44.

It the status bar you can the see the release message.BAPI-ALE Interfaces Published On: July 19. 2008 45.com . Just click on the YES. A POP up message was displayed. SAP GEEKS CLUB http://sapgeeksclub.

BAPI-ALE Interfaces Published On: July 19.com . 2008 46. SAP GEEKS CLUB http://sapgeeksclub. Click on the Segment type as shown below.

BAPI-ALE Interfaces Published On: July 19. Set release status for segment as shown.com . SAP GEEKS CLUB http://sapgeeksclub. 2008 47.

Release check was checked as shown below. 2008 48. Finally by calling the BAPI we can trigger the IDOC. Once it was set to release. 49.com . SAP GEEKS CLUB http://sapgeeksclub.BAPI-ALE Interfaces Published On: July 19.

com . 2008 Disclaimer: Sapgeeksclub is determined to provide useful learning materials but it does not hold liability or responsibility of any damage caused by using the code sample or information provided in this document. SAP GEEKS CLUB http://sapgeeksclub.BAPI-ALE Interfaces Published On: July 19. This document has been published based on Author’s understanding of the subject and neither the author nor sapgeeksclub can be hold responsible for any disparity in the information provided here and at any other source.

Sign up to vote on this title
UsefulNot useful