Application Development and Automation 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: 
Read only

Regarding BAPI

Former Member
0 Likes
612

Hi

I am want to about the BAPI. I have some basic idea about the BAPI,like it is a remote enabled function module.But here what is the purpose of SWO1 tcode & can we access this function module from the JAVA programs, web interface.

Please tell me clearly what is the main purpose of this BAPI.

Regards

Lakshmi

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
540

BAPI (Business Application Program Interface)

BAPI is a set of interfaces to Object- oriented programming methods that enable a programmer to integrate 3rd party software into the proprietary R/3 product from SAP.

CL_HTTP_CLIENT --- By activating this class we can provide connectivity between R/3 and any other legacy system.

JCO (Java), COM/DCOM (Microsoft) connectors are used.

The adapter provides local transaction support for the BAPI. The following BAPI calls support local transactions

BAPI_TRANSACTION_COMMIT

BAPI_TRANSACTION_ROLLBACK

BAPI Creation

Define a Function Group -- SE37

Write RFC-FM -- SE37

Create an object -- SWO1

Make the FM as an API method within the object.

Transfer Request Release -- SE09

BAPI Types

GetList()

GetDetail()

Create()

Change()

Delete()

Add<subobject> , Remote<subobject>

Replicate() , SaveReplicate()

Some Standard BAPIs

Bapi_salesorder_change

Bapi_salesorder_createfromdat1

Bapi_salesorder_getlist

Bapi_salesorder_getstatus

Bapi_creditcard_check

Bapi_bpcontact_change

Bapi_billingdoc_confirm

Bapi_po_create

Regards

3 REPLIES 3
Read only

Former Member
0 Likes
541

BAPI (Business Application Program Interface)

BAPI is a set of interfaces to Object- oriented programming methods that enable a programmer to integrate 3rd party software into the proprietary R/3 product from SAP.

CL_HTTP_CLIENT --- By activating this class we can provide connectivity between R/3 and any other legacy system.

JCO (Java), COM/DCOM (Microsoft) connectors are used.

The adapter provides local transaction support for the BAPI. The following BAPI calls support local transactions

BAPI_TRANSACTION_COMMIT

BAPI_TRANSACTION_ROLLBACK

BAPI Creation

Define a Function Group -- SE37

Write RFC-FM -- SE37

Create an object -- SWO1

Make the FM as an API method within the object.

Transfer Request Release -- SE09

BAPI Types

GetList()

GetDetail()

Create()

Change()

Delete()

Add<subobject> , Remote<subobject>

Replicate() , SaveReplicate()

Some Standard BAPIs

Bapi_salesorder_change

Bapi_salesorder_createfromdat1

Bapi_salesorder_getlist

Bapi_salesorder_getstatus

Bapi_creditcard_check

Bapi_bpcontact_change

Bapi_billingdoc_confirm

Bapi_po_create

Regards

Read only

Former Member
0 Likes
540

Hi

A Business Application Programming Interface is a precisely defined interface providing access process and data in Business Applications Systems Such as SAP R/3

Benefits of BAPICan be used in diverse languages / Development Environments(ABAP, Visual Basic, Java, C++, etc.)Can be called from diverse platforms (COM, CORBA, Unix)Reduced development costReduced maintenance cost“Best-of-both-worlds” approachRich functionality of the R/3 systemUser-specific front-ends

Return Code InformationUsually a structure, sometimes a tableData dictionary structures usedBAPIRETURNBAPIRETURN1BAPIRET1BAPIRET2

BAPI Return StructureType Message typeblank or "S"=Success"E"=Error"W"=Warning"I"=Information"A"=AbortMessage Message text Log_No Application Log NumberLog_Msg_No Application Log Message Serial NumberMessage_V1 -V4 Message variables

SAP transactionsBAPI Business Object Browser (BAPIs only)SWO1 Business Object Builder (all objects)SWO2 Business Object Browser (all objects)SE11 Data DictionarySE37 Function Builder

BAPI step by step procedureSTEP 1 -Define Structure For The BAPISTEP 2-Write Function ModuleSTEP 3 -Create the API Method Using The BAPI WIZARDSTEP 4 –Final Steps

Step 1: Define a Structure for BAPIIn this step structures for the parameters and tables of the function module used for the BAPI are defined.USE TCODE : SE11then Data type -> StructureDefine the structure Name : Ex: ZVENDImportant note:You will have to define a structure for everyparameter in the BAPI. You cannot use the same structures used in existing applications because BAPI structures are frozen when BAPIs are released and then there are restrictions on changing them.

Step 2 : Write Function ModuleEach BAPI must have its own function group.Under the attributes tab remember to select Processing Type Remote Enabled module, otherwise the function module cannot be invoked via RFC and used as a BAPI Import/Export parameters can only be BY VALUE for an RFCenabled function module.

BAPI

http://help.sap.com/saphelp_nw2004s/helpdata/en/7e/5e114a4a1611d1894c0000e829fbbd/frameset.htm

http://www.sapgenie.com/abap/bapi/example.htm

http://help.sap.com/saphelp_46c/helpdata/en/9b/417f07ee2211d1ad14080009b0fb56/frameset.htm

http://searchsap.techtarget.com/originalContent/0,289142,sid21_gci948835,00.html

http://searchsap.techtarget.com/originalContent/0,289142,sid21_gci948835,00.html

http://techrepublic.com.com/5100-6329-1051160.html#

http://www.sap-img.com/bapi.htm

http://www.sap-img.com/abap/bapi-conventions.htm

http://www.sappoint.com/abap/bapiintro.pdf

http://www.sapgenie.com/abap/bapi/example.htm

http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCMIDAPII/CABFAAPIINTRO.pdf

http://help.sap.com/printdocu/core/Print46c/en/data/pdf/CABFABAPIREF/CABFABAPIPG.pdf

http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCFESDE8/BCFESDE8.pdf

http://help.sap.com/printdocu/core/Print46c/en/data/pdf/CABFABAPIREF/CABFABAPIPG.pdf

http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCMIDAPII/CABFAAPIINTRO.pdf

Thanks&regards

Sravani.

Read only

Former Member
0 Likes
540

Hi

regarding accessing from java

JCO OverviewHigh-performance JNI-based middlewareSupport R/3 3.1H and higher.Supports inbound and outbound calls.Supports client pooling.Supports desktop and web/application server applications. Multi-platformComplete and correct code page handlingEasy to install and deploy

DeploymentRequired files in \WINNT\system32:librfc32.dll (at least 46D, build 263)jRFC11.dll (JDK 1.1)jRFC12.dll (JDK 1.2 and 1.3)Required files in Java class path:jCO.jar

About the Example:Front End: Java Servlets (Web Application)Web Server: Apache Tomcat The Servlet takes Vendor number and passes it to the BAPI which in turn fetches the Vendor information from the LFA1 table and returns it in BAPIRET2 format to the servlet, the servlet fetches the data from return structure and displays it.