Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
8 REPLIES 8

suresh_datti
Active Contributor

Former Member
0 Kudos

how can i check the diffrent Bapi's available for an sales,material etc

0 Kudos

hi sai,

check the transaction BAPI( BAPI Explorer)

hope this helps,

do reward if it helps,

priya.

uwe_schieferstein
Active Contributor
0 Kudos

Hello Sai

I refer to BAPIs as "Dialog without dialog".

What does this mean?

BAPIs provide external access (via RFC) to internal business objects (e.g. SAP users). If you want to create a new sap user, you call (in dialog) transaction SU01. The same task can be done remotely using BAPI BAPI_USER_CREATE1. Internally, this BAPI uses other function modules to eventually create the user.

Now the major difference between the BAPI and the internal function modules that eventually do the task(s) is that the BAPI is <b>much more scrupulous</b> in checking the validity of the incoming data.

For example:

Your SAP user is male and you want to add the title "Mr." (mister) to you SAP user data. You provide the title with a title key (e.g. '0001'). If this key does not exist in the corresponding check table the BAPI will not create the user. This behaviour is identical to the foreign-key checks in the dialog. (=> dialog behaviour without dialog because usually we call BAPIs via RFC).

In contrast, if you use an internal function module to create the user this function module may not care at all about the validity of the title key (e.g. '9999') and creates the SAP user anyway. What will happen if you want to change this user in dialog (SU01)? The system will send an error that the title key does not exist.

Therefore I generally prefer BAPIs over "normal" function modules if both provide me with the required function. Even in applications where I do not need to have RFC access.

Regards

Uwe

Former Member
0 Kudos

HI,

Use

SAP has introduced object-oriented technology in the R/3 System by making R/3 processes and data available in the form of SAP Business Objects.

External applications can access SAP Business Objects through standardized, platform-independent interfaces - BAPIs. SAP Business Objects and their BAPIs provide an object-oriented view of R/3 business functionality.

This guide provides an overview of the Business Framework, SAP Business Objects and SAP Interface Types and their BAPIs as well as the Business Object Repository in which business objects and BAPIs are defined and stored.

SAP Business Objects

Definition

Business object technology and business object programming are based on the concept of "business objects". Real world objects, for example an employee or a sales order, are modeled as business objects in business application systems, such as the R/3 System.

SAP Business Objects encapsulate R/3 data and business processes, thus hiding the details of the structure and implementation of the underlying data.

Structure

To achieve this encapsulation, the SAP Business Objects are constructed as entities from several layers:

• At the core of an SAP Business Object is the kernel, which represents the object's inherent data.

• The second layer, the integrity layer represents the business logic of the object. It comprises the business rules for consistent embedding in the environment and the constraints regarding the values and domains that apply to the business object.

• The third layer, the interface layer, describes the implementation and structure of the SAP Business Object, and defines the object's interface to the outside world.

• The fourth and outermost layer of a business object is the access layer, which defines the technologies that can be used for external access to the object’s data, for example, COM/DCOM (Component Object Model/Distributed Component Object Model).

Business Application Programming Interface (BAPI)

Use

The SAP Business Objects held in the Business Object Repository (BOR) encapsulate their data and processes. External access to the data and processes is only possible by means of specific methods - BAPIs (Business Application Program Interfaces).

A BAPI is defined as a method of an SAP Business Object.

For example, the functionality that is implemented with the SAP Business Object type Material includes a check for the material's availability. Thus, the business object type Material offers a BAPI called Material.CheckAvailability.

The BAPIs in the R/3 System are currently implemented as function modules all of which are created and managed in the Function Builder. Each function module underlying a BAPI:

• Supports the Remote Function Call (RFC) protocol

• Has been assigned as a method to an SAP Business Object in the Business Object Repository

• Is processed without returning any screen dialogs to the calling application

Advantages of Using BAPIs

Use

BAPIs are standardized methods of SAP Business Objects that enable customers and third parties to integrate their software components with the R/3 System and the Business Framework. This section lists some of the advantages of using BAPIs as a means of accessing the SAP Business Objects.

Business Standard

SAP Business Objects and their BAPIs are the standard for the business functions in the R/3 System. They enable the R/3 System and other software products to be integrated on one business level.

Standards Conformance

BAPIs are being developed as part of the SAP joint initiative with customers, partners, and leading standards organizations. BAPIs are becoming a communication standard between business systems.

You can access SAP Business Objects and their BAPIs by using object-oriented interfacing technologies such as Microsoft's COM/DCOM (Component Object Model/Distributed Component Object Model).

The SAP Business Objects already comply with the Object Application Group (OAG) specifications, and, in conjunction with ObjectBridge from VisualEdge, conform to the Object Management Group's CORBA (Common Object Request Broker Architecture) guidelines.

Characteristics of BAPIs

Use

This section describes the BAPI characteristics you should know about before you begin integrating BAPI calls into your application programs.

Naming Conventions

BAPIs are identified by the name of the business object in question followed by the name of the BAPI. (BAPI names are in English and describe what the BAPI does to the business object). A period separates the two parts of the name.

For example, the full name of the BAPI CheckAvailability of the business object Material is Material.CheckAvailability.

There are some standardized BAPIs that can be implemented for most of the business objects. These BAPIs have specific functions, such as listing existing instances of business objects.

These BAPIs are implemented according to specified rules and are assigned the same name for all business objects. The BAPI GetList, which lists existing object instances can be used for many business objects, for example, CompanyCode.GetList and Material.GetList.

For information about these BAPIs see Standardized BAPIs.

Database Consistency

Each BAPI that creates an instance of an object or updates the data of an object is responsible for database consistency. All database changes are carried out completely or not at all.

However, the COMMIT WORK command must not be executed by the BAPI itself; it must be executed by the calling program. For further information see the Transaction Model for Developing BAPIs.

No Dialog Orientation

BAPIs do not return dialog screens from the R/3 server system to the calling program.

Authorization

Any interaction with the R/3 System requires the user to have a certain set of authorizations. To execute a BAPI as part of your application program, the users of your application must have the appropriate authorizations set up in their R/3 master records. The documentation provided with the BAPI contains information about the required authorizations.

Any attempts to execute a BAPI that fail as a result of insufficient authorization are reported back to the calling application