BAPI for SAP ABAP Two

The BAPI Explorer is the R/3 System working environment for developing BAPIs themselves and for developing with BAPIs.The BAPI Explorer is available as of Release 4.6A and enhances or replaces the BAPI Browser used in earlier releases. The BAPI Explorer uses the latest HTML control technology. For this reason to work with the BAPI Explorer, you must be using a SAPgui of version 4.6A.

If you are using a SAPgui from an earlier release, the BAPI Browser (Transaction BAPI45) is automatically called instead of the BAPI Explorer. For information about working in the BAPI Browser see BAPI Browser in the BAPI User Guide.

Purpose

In the BAPI Explorer, application developers can get an overview of the status of BAPIs in the BOR. The BAPIs can be determined either by the position of the associated object or interface type in the component hierarchy in the BOR, or from an alphabetical list. All information required to use a particular BAPI is provided in the BAPI Explorer.

The BAPI Explorer is used internally in SAP to develop BAPIs, but can also be used by customers and partners. The BAPI Explorer provides all the tools used to create BAPIs and the required development objects in an integrated programming environment. The entire development process of a BAPI takes place in the framework of form-controlled "projects" to achieve maximum quality, stability and usability of the BAPI.

Structure

The BAPI Explorer is divided into two areas:

• Hierarchy display

Here all the business object types or interface types for which BAPIs have been defined are displayed. For further information see Working with Display Functions.

• Work area

Here the details and documentation of the development object selected in the hierarchy display can be viewed.The tools used to develop BAPIs are also available in the work area. For further information see Working with Tools and Projects.

Integration

To call the BAPI Explorer choose Tools, Business Framework, BAPI Explorer. To call it directly use Transaction BAPI.

Working with Display Functions

Use
In the hierarchy display of the BAPI Explorer all the business object types or interface types for which BAPIs have been defined are displayed.Using the tabs Alphabetical and Hierarchical in the hierarchy display, you can select whether the business object types or interface types are displayed alphabetically or as they are assigned in the component hierarchy in the BOR.By expanding the relevant nodes you can navigate up to the parameter level of individual BAPIs.

Features
The following display functions are also provided which enable you to directly access BAPIs and their details in the BOR.

Displaying details
Under the Detail view of the work area all the technical details of the development object selected in the hierarchy are displayed.In most cases you can double-click on a field in the Detail display to get to the development environment or to display further information. For example, in the detail display for a particular method, by double clicking on the name of the function module, it will be displayed in the Function Builder.
Displaying and Printing Documentation
In the Documentation view of the work area the documentation for the development object selected in the hierarchy is displayed.The data element documentation for each parameter field is contained in the documentation for structured BAPI parameters.If you have installed Microsoft Internet Explorer Version 4.0 on the front-end computer, you can print the documentation using the standard SAPgui print function.

Changing the level of the hierarchy display
The component hierarchy may have many hierarchy levels. To make it easier to find a business object type and its BAPIs, you can use the function Goto  Change hierarchy level to limit the display to two hierarchy levels.

Specifying the BAPIs to be displayed
The default is to display only released BAPIs of business object types. By choosing Goto  BAPIs to display, you can display all the BAPIs contained in the BOR, that is BAPIs of SAP interface types and BAPIs that have not yet been released.Business object types and interface types are identified by different symbols. To display these, choose Go to, Display legend.

Searching for BAPIs :Using the standard functions Find and Find next you can search the displayed business object types or interface types using specified criteria (placeholders such as ' * ' can be used):

  1. Object name, e.g. Business Process
  2. Object type (technical object name) e.g. SAP0001
  3. Object description, e.g. Plan*
  4. Method name, e.g. GetList
  5. Method description, e.g. object list*
Working with Tools and Projects

The views Tools and Projects in the work area are mainly used for developing BAPIs.Depending on the development object selected in the hierarchy display, in the Tools view, the following tools and navigation options are provided:
• Direct access to the Business Object Builder, Function Builder and ABAP Dictionary.
• List generator to create lists of BAPIs using specified selection criteria.
In the Project view you can create projects to assist you with following and documenting the development procedures below:

• Implementing new BAPIs (for internal SAP use, BAPI developments must be carried out and documented using a project in the BAPI Explorer)
• Changing released BAPIs (only for SAP internal use)
• Requesting a new business object type (only for SAP internal use)
For each of these projects there is a project form that takes you step by step through the entire development process and provides direct navigation options to the required development tools and information.Within the project management you can save and delete your projects and you can edit the projects managed by other users by selecting other users.If you have installed Microsoft Internet Explorer Version 4.0 on the front-end computer, you can print the project form using the standard SAPgui print function.

Defining the Scenario

Before you program a BAPI you should clearly define the processes and situations the BAPI will be used for. BAPIs should only be implemented within the context of a meaningful business scenario.For examples of BAPI scenarios refer to Overview of ALE Integration Scenarios in the Library of ALE Business Processes. SAP developers will also find templates for defining and documenting BAPI scenarios.

Process Flow

To define the scenario the BAPI is to be used in, consider the following issues:

Which scenario is to be implemented?
Every BAPI should be based on a model of a scenario in which it can be usefully employed.Keep in mind whilst you are planning the scenario that COMMIT WORK commands must not be used in BAPIs. COMMIT WORK commands can adversely effect the process flow of the scenario and how the BAPIs in the scenario work together.
Which SAP business object types are required and do they exist?
From the scenario definition you can get information about the SAP business object types relevant to the BAPI scenario. If the business object types required do not exist, they must be created. For information about creating SAP business object types see the documentation, SAP Business Workflow. For SAP internal development you have to complete a business object request form in the BAPI Explorer.

A BAPI is required to read the data of a company code. First of all, a list of all company codes is to be displayed. From this list a company code can be selected, and then using another BAPI, details about this company code are to be displayed.The relevant SAP business object type for this scenario is Company Code.

What functionality should the BAPI provide and how does it affect related BAPIs, especially the other BAPIs of the SAP business object type in question?
In line with the scenario concept, BAPIs must complement each other to create a complete scenario. Their relationships with each other must be clearly defined.To read the details of a company code as described in the above example scenario, two BAPIs are required:

• To display all the company codes
• To display a specific company code
The interdependency between these two BAPIs is evident because first the list of company codes is displayed to obtain the ID of the specific company code sought. From this ID details of the company code can be displayed.However, the two BAPIs remain functionally independent of each other, because if the company code ID is known, the BAPI "Display details of a specific company code" can be used without first calling the BAPI "Display list of all company codes".
To what extent can the BAPI's functionality be implemented within the scope of the business object?

A BAPI should be developed so that it provides functionality exclusively within the context of its associated SAP business object type. If the data of a different SAP business object type is to be read or updated then the appropriate interface for this object type must be used. The functions or methods of these other object types are used implicitly.

The BAPIs required to read the details of a company code in the above example scenario are only able to access data in the SAP business object type Company Code. Other object types are not involved.

Is the BAPI assigned to the SAP business object type in a meaningful and semantically correct way?
Result Once you have considered these issues you will be able to clearly conceptualize the functionality of the planned BAPI(s). You will also have identified the SAP business object types relevant to the BAPI scenario.

RELATED POSTS

No comments :

Post a Comment