BAPI'S
BAPI'S
BY ----Arjun
Overview
BAPI stands for
BusninessObject
BY ----Arjun
Overview
BUSINESS OBJECT(BO) :
It is an object which is similar to class, which is group of attributes methods, interfaces, key fields, events for a particular Business Application or Scenario.
SW01 is the TCODE for Business Object Repository Examples for Business objects are, BUS1001 Materials BUS2012 Purchase Order
Overview
BUS1001
Methods are :
BAPI_Material _Get detail BAPI_Material_GETLIST BUS2012 Methods are : BAPI_PO_GETDETAIL BAPI_PO_GETITEMS
SAP AG 2001, Smart Forms - the Form Printing Solution,
Claudia Binder / Jens Stumpe 5
Overview
What is BAPI?
Overview
BAPI:
It is also an Remote Enable function module which is used to communicate between SAP-SAP or SAPNONSAP servers.
Basically BAPI uses RFC Technology In the Initial stage it is a RFC Function module Later, this RFC Function module will be inserted into a business object, Now it is converted into BAPI.
Overview
Overview
Overview
Both are used to communicate between SAP-SAP & NONSAP-SAP. Both are remote enabled FM The difference is, RFCs are called as Standalone Function Modules. BAPIs are part of Business Objects which are used to communicate with other BAPIs, events, Interfaces, attributes, Key fields etc., with in a single B.O. This is not possible with RFCs. Because they are standalone FMS
SAP AG 2001, Smart Forms - the Form Printing Solution,
Claudia Binder / Jens Stumpe 10
Overview
USAGE OF BAPIS
Overview
Overview
Overview
RULES FOR BAPIS:
Overview
If BAPI is Success, we have to use another BAPI BAPI_TRANSACTION_COMMIT to Save the Data into Database Tables. If the BAPI has error, use another BAPI BAPI_TRANSACTION_ROLLBACK to revert back the changes made to the Database Tables.
Overview
Overview
Reports:
Overview
Overview
Develop a Custom BAPI to display the Material details which can be used by NON-SAP. Step 1: Create structures for Importing and Exporting Parameters. Step2: Create a function module and make it as remote enabled. Step3 : Create a BO.
Step4 : Embed or insert RFC into BO so that it will be converted into BAPI.
Overview
Step 1: Create structures for Importing and Exporting Parameters. Go to SE11 Create a structure by Name ZBAPI_MATNR Create a single field MATNR.
Overview
Again Go to SE11
Overview
Step2: Create a function module ZBAPI_MAT_GET_DET and make it as remote enabled Goto SE37 Create a function module ZBAPI_MAT_GET_DET Specify importing parameter as below with pass by value.
Overview
Specify Exporting parameter as below with pass by value. Ssssssssssssssssssssssssssssssssssssssssssssssss ssssssssssssssssssssssssssssssssssssssssssssssss ssssssssssssssssssssssssssssssssssssssssssssssss ssssssssssssssssssssssssssssssssssssssssssssssss Specify returning parameter as below:
Overview
Write the below source code:
FUNCTION ZBAPI_MAT_GET_DET.
select SINGLE * from mara into CORRESPONDING FIELDS OF mara WHERE matnr = matnr . ENDFUNCTION. Save it. Make the FM as REMOTE ENABLED . Save, Activate and test it .
SAP AG 2001, Smart Forms - the Form Printing Solution,
Claudia Binder / Jens Stumpe 24
Overview
Step3 : Create a BO
Overview
Put the cursor on methods
Overview
Press enter
Overview
Again click on NEXT STEP button
Overview
Click on Yes
Overview
Goto Object Type Change Release Status Implemented
Overview
Again Go to Object Type Change Release Status Released
Overview
Now our Business Object is released and it can be visible/used by NON-SAP System Mapping from NON-SAP fields to BAPI fields will be done by NON-SAP Consultants. The Remote connection between SAP and NON-SAP Servers will be done by BASIS Consultants As an ABAP Consultant, our role is to develop a BAPI and give it to NON-SAP Consultants
Overview
Overview
Business Requirement:
BAPI_MARAPROG.txt
MARA.txt
SAP AG 2001, Smart Forms - the Form Printing Solution,
Claudia Binder / Jens Stumpe 34