Topics covered under this are:
•What is BAPI?
•Some Conventions about BAPI
•Example showing How to Create a BAPI
What is BAPI?
BAPI is an abbreviation used for Business Application Programming Interface. These are interfaces within the business framework to link SAP components to one another and SAP components with third-party components.
The SAP Business Objects are an essential part of the Business Framework and the prerequisites for interoperability. SAP Business Objects cover a broad range of R/3 business data and processes and can be accessed using BAPIs. The SAP Business Objects and their BAPIs thus provide an object-oriented view of R/3 business functionality.
The SAP Business Object types are defined by the following:
Object type
The object type describes the features common to all instances of that object type. This includes information such as the unique name of the object type, its classification, and the data model.
Key fields
The key fields determine the structure of an identifying key, which allows an application to access a specific instance of the object type. The object type "Employee" and the key field "Employee.Number" are examples of an object type and a corresponding key field.
Attributes
An attribute contains data about a Business Object, thus describing a particular object property. For example, "EMPLOYEE.NAME" is an attribute of the "EMPLOYEE" object type.
Events
An event indicates the occurrence of a status change of a Business Object.
Interfaces
Interfaces are groups of related methods associated with an object type.
SOME CONVENTIONS ABOUT BAPI
•Methods
•Parameters
•Standardized BAPIs
•Standardized Parameters
•Guidelines for BAPI development
•BAPI/ALE Integration
Methods
A method is an operation that can be performed on a Business Object and that provides access to the object data. A method is defined by a name and a set of parameters and exceptions, which can or must be provided by the calling program in order to use the method. BAPIs are examples of such methods.
•If the BAPI to be implemented is a standardized BAPI then make use of generic names Like CheckExistence, GetList etc.
•The method name can be of maximum 30 characters and should be in English.
•Underscores are not allowed in BAPIs so to separate the words make used of a combination of upper and lower case characters for e.g. GetDetail
•BAPIs have return parameter that can be either an export parameter or an export table.
•So that customers can enhance BAPIs, each BAPI must have an ExtensionIn and an ExtensionOut parameter.
Parameters
•If standardized parameters are used, you have to use the names specified for standardized parameters.
•BAPI parameter names should be meaningful. A parameter name can be of maximum 30 characters. For example if some BAPI is related to some customer where in customer code is to be input, the parameter name can be CUSTOMERCODE or CUSTOMERNO.
The components of a parameter name in the Business Object Repository (BOR) are separated by upper and lower case letters to make them easier to read. Example: CustomerCode
•Unit of measure fields must accompany all quantity fields and currency identifiers must accompany currency amount fields.
Standardized BAPIs
Some BAPIs provide basic functions and can be used for most SAP business object types. These BAPIs should be implemented the same for all business object types. Standardized BAPIs are easier to use and prevent users having to deal with a number of different BAPIs. Whenever possible, a standardized BAPI must be used in preference to an individual BAPI.
For details use the link http://www.sap-img.com/abap/bapi-conventions.htm
BAPIs are actually created by and maintained with other BAPIs. The BAPI that creates BAPIs is in the BOR, and is called Create. (There’s also a variation, CreateFromData, that is sometimes useful.) Objects that have already been created, and need to be modified, may be manipulated with the BAPI Change, also found in the BOR.
Other BAPI utilities for object manipulation include Delete and UnDelete, Replicate and SaveReplicate, GetStatus, GetDetail, and ExistenceCheck, all of which are self-explanatory. These handy utilities exist alongside the workhorse BAPIs in the BOR. There is also a convenience in SAP called the subobject—objects attached to a greater object, such as line items on a purchase order. The BOR provides you with Add(subobject) and Remove(subobject) to facilitate these.
Typical of an object-oriented system, BAPIs must be treated as objects. Some are instance-dependent (a specific occurrence of an object); some are instance-independent (requiring class methods). When creating a BAPI, you must obviously be clear about which applies. As an example, if you’re working with a class-method BAPI (e.g., the SalesOrder class), GetDetail isn’t useful, because it returns data items from a specific sales order. Instead, you would use GetList, which would return a list of all instantiations of SalesOrder.
Guidelines for BAPI development
•BAPI structures must not use includes.
•There should be no functional dependencies between two BAPIs
•BAPIs must perform there own authorization check
•BAPIs should not use dialogs
•CALL TRANSACTION or SUBMIT REPORT must not be invoked in a BAPI
•Instead of COMMIT WORK a BAPI must make use of the BAPI TransactionCommit to execute the commit after the BAPI has executed.
•Program should not get terminated due to BAPIs but instead the BAPI must communicate relevant messages through the return parameter.
BAPI/ALE Integration
When you use the BAPIs for asynchronous messaging, the application in the sending system calls the generated ALE IDoc interface instead of the BAPI. Asynchronous BAPIs use the ALE interface this way:
•Creates an IDOC from the BAPI data
•Sends the IDOC to the target system
•Receives the IDOC in the target system, creates the BAPI data from the IDoc and calls the BAPI
An ALE interface for a BAPI is created in transaction BDBG.
Monday, December 3, 2007
HOW TO CREATE OWN BAPI’S
Labels:
BAPI
Subscribe to:
Post Comments (Atom)
Blog Archive
-
▼
2007
(952)
-
▼
December
(236)
- Working with events in a Global Class
- Events in Table Maintenance
- Archiving IDocs
- Using Sorted table and Index while processing Inte...
- Highlighting only a particular cell instead of ent...
- Raising exceptions in a method and handling the sa...
- Maintaining Translations for Work item texts and O...
- Understanding "Local Workflow"
- Implementing Enhancements in a view
- Sending recursive mails upon reaching the deadline...
- ABAP Proxy communication
- Creation of a web service in SAP
- Step by Step approach to ceate simple BDC session ...
- General Application Transaction Codes
- Inroduction TO LSMW
- 24 Column Account Managers Report
- sap ABAP report on Column Account Managers Report
- sap ABAP report on Detail Transaction Report (DTR)...
- sap ABAP report on Summary Statement Quick Reference
- free download book on abap reporting on all modules
- ABAP REPORTS
- Report YRS_DOWNLOAD_TRANSPORT_REQUEST
- Report YRS_UPLOAD_TRANSPORT_REQUEST
- Displaying Available Report Variants in sap
- Creating Report Variants in sap
- SAP helpful reports, transactions and tables
- Useful SAP Tables
- ABAP REPORTING
- SAP Solution Manager’s centralized solution
- SAP Solution Manager
- Report Tree Using SARP and SERP
- User Profile Parameters
- XML sample file
- XSLT options
- Create XSLT program
- XML XSLT with ABAP
- Transport Guide
- ABAP Acronyms
- ABAP Code Sample
- ALV Pdf books
- ALV Articles
- Class ALV
- How to do the EXCISE ANNEXURE10 report?
- How to calculate last date of the month?
- How to change the deadline of the workitem program...
- How to convert from one currency value to other?
- How do I display / add the Terms and Conditions to...
- How do I create a long text for a document?*
- Where are the long texts of a document stored and ...
- I am using a SELECT query on a database table. Sin...
- How can I convert numerals into the corresponding ...
- How can I read an Excel file from presentation ser...
- How can I download my internal table into an Excel...
- How can I get the IP address of the system program...
- How do I download data in my internal table in a C...
- How to convert a date to internal or external format?
- How are RANGES different from SELECT-OPTIONS?
- What does R/3 stands for ?
- What does ABAP stand for?
- What is this new transaction 'n' all about?
- Casino Game in SAP ABAP
- Moving Characters in SAP ABAP Report Output
- Database Table Operations- A Performance Considera...
- SAP ABAP Performnace consideration while using ‘fo...
- Applying the having clause
- Avoid nested SELECT-ENDSELECT loops
- Use high-speed array operations with UPDATE, INSER...
- Coding Style
- Building A Binary Table
- how can we change the font for weite statement
- Import graphics to SAP
- Uploading Graphics TTF files into SAp Script Text
- Schedule Background Job
- How to change Package name/Development class for a...
- Useful User Paramters
- Finding a transaction code via SE93
- Standard Conversion Exits
- How to transport Standard Texts
- Search SAP Menu
- A FM which can create internal session
- Procedure for uploading Font
- Save content of internal tables in Excel format du...
- Where all SAP ABAP programs get stored!!
- Debugging a popup window
- Spool Conversion tp PDF
- A tips on error message while writting a BDC program
- Get the next available number in Number Range Object
- SAP ABAP Macro to validate Date
- Adding pushbuttons on the application toolbar of r...
- Display your report output lines inside a Title Box
- Using Subscreens on Report Selection Screens
- Save your ABAP report list output in your desktop ...
- Listbox on Selection Screen
- Get the Report selection Criteria
- What is sequence of event triggered in report?
- What is the difference between Primary key and Uni...
- What are the various types of selection screen event?
- What are standard layouts sets in the SAP Script?
- What are the data types of Internal Tables?
- What is the difference between 'Select single * ' ...
-
▼
December
(236)
No comments:
Post a Comment