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: 
6 REPLIES 6
Read only

gopi_narendra
Active Contributor
0 Likes
674

you can refer this link for BAPI to create a BAPI.

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

Regards

Gopi

Read only

Former Member
0 Likes
674

Vijaya,

plz check this link u you can get the solution http://www.sapgenie.com/abap/bapi/example.htm

regards

Vijay.

Read only

Former Member
0 Likes
674

Hi,

BAPI step by step procedure

STEP 1 - Define Structure For The BAPI

STEP 2 - Write Function Module

STEP 3 - Create the API Method Using The BAPI WIZARD

STEP 4 – Final Steps

Step 1 :

Define a Structure for BAPI

In this step structures for the parameters and tables of the

function module used for the BAPI are defined.

USE TCODE : SE11 then Data type -> Structure

Define the structure Name : Ex: ZVEND

Important note: You will have to define a structure for

every parameter 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 Module

Each 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 RFC enabled

function module

Step 3 : Create the API Method Using

The BAPI WIZARD

BAPI wizard is used to expose the remote function module as a BAPI

Wizard will generate some additional code, so the function module is a valid

method of the BOR. This allows the BAPI to be called as a workflow method

in addition to be called by an outside program.

Each function module corresponds to a method in the BOR

Go to the Business Object Builder SWO1.

You can either create the new Object type as a subtype of an existing business

object or create a new business object from scratch..

Create new BAPI Object

USE TCODE

SWO1

Supertype not

required as we are

creating a new Object

  • for Cross

Apps

Create new BAPI Object

Note that when you create the business object a standard

interface, an attribute ObjectType and the methods

ExistenceCheck and Display are automatically generated.

These cannot be changed !

Adding API method

Implementing BAPI Object

Select the BAPI object

Implementing BAPI Object

Change release status To implemented

Releasing BAPI Object

Change release status To released

Implementing API Method

Select the API Method

Implementing API Method

Change release status To implemented

Releasing API Method

Change release status To released

Generating API Method

At last you can see your bapi in BAPI transaction....

****do rewards if usefull

regards,

vijay

Read only

Former Member
0 Likes
674

HI,

Check the following link:

http://erpgenie.com/sap/abap/bapi/example.htm

It contains step by step example of creating BAPI.

Hope this helps.

Reward if helpful.

Regards,

Sipra