Bapi
Bapi
BDC BAPI
In BDC we have to update the database Via Screens BAPI updates the database directly
Screen mapping is compulsory No mapping required
BDC programs not effective for Large applications BAPI ensures very good
(poor performance) performance for all
In upgradation projects as there may be New screens
with new fields therefore you
Have to rewrite your BDC program Same BAPI programs can be reused
Can upload data for Every
BDC is not available for Every transactions Transactions
Features of BAPI:
1. BAPI is an interface programming
2. It is based on Object Oriented Programming
3. It supports all types of Languages (.Net, Java, C++………etc)
4. In BAPI, RFC function module converted to method & the same method
is accessed by 3rd party communication interfaces
5. BAPI is synchronous
Business Object:
The entire business objected oriented programming is designed based on
business objects
Every business object holds business data & does not allow it to access
by outside world
Kernel:
It holds inherent data
Integration Layer:
In this layer methods are defined for accessing Kernel data
Interface Layer:
Here interfaces (BAPIs) are maintained for integrating with methods
Communication Layer:
All communication interfaces (RFC, CORBA……..etc) can access this layer
Object Type:
Business Objects are created based on Object Type
It acts as a blue print (or) template for creating business objects
Key Fields:
Using this option key fields are maintained (Customer Number, Sales
Order………etc)
Methods:
The main logic for extracting business data is maintained using Methods
Attributes:
These are the parameters which are passed & returns from Methods
These are actually part of Methods
BOR:
Business Object Repository
It is the central repository for all business object types & their BAPIs
Features of BOR:
1. It acts as central access point (or) repository for all Business Objects,
Object Types, Their Key Fields, Methods …………..etc
2. All 3rd party Communication interfaces can access Business Objects
stored in BOR
3. Business Objects maintained in BOR remains stable for a long time
Note:
The T code for working with BOR is BAPI & SW01
Standard BAPI:
In standard BAPI, all BAPI function modules are predefined
Object:
Create a bank in client database
Solution:
Go to SE38
Program: ZFI_BAPI_BANK
Create
Title: Uploading bank data using BAPI
Type: Executable Program
Save
wa_bank_address-bank_name = ‘Sbi’.
wa_bank_address-street = ‘Lbnagar’.
wa_bank_address-city = ‘Mumbai’.
wa_bank_address-bank_brnch = ‘Lbnagarbranch’.
IF SY-SUBRC EQ 0.
CALL FUNCTION ‘BAPI_TRANSACTION_COMMIT’
EXPORTING
WAIT = ‘X’.
ENDIF.
Solution:
SELECTION-SCREEN: BEGIN OF BLOCK b1 WITH FRAME TITLE
TEXT-000.
PARAMETERS: p_banks TYPE banks,
p_bankl TYPE bankl.
SELECTION-SCREEN: END OF BLOCK b1.
wa_bank_address-bank_name = ‘Sbi’.
wa_bank_address-street = ‘Tnagar’.
wa_bank_address-city = ‘Chennai’.
wa_bank_address-bank_brnch = ‘Tnagarbranch’.
wa_bank_addressx-street = ‘X’.
wa_bank_addressx-city = ‘X’.
wa_bank_addressx-bank_brnch = ‘X’.
IF SY-SUBRC EQ 0.
CALL FUNCTION ‘BAPI_TRANSACTION_COMMIT’
EXPORTING
WAIT = ‘X’.
ENDIF.