Application Development 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: 

BAPI-SWO1

Former Member
0 Kudos

Hi all,

I have made one BAPI.

In that I define two structure for export and import and made one function module also.

I call that function from my report and its working fine.

But i dont what is the use of SWO1.

while creating BAPI, we also create one object/interface and than one method in SWO1...

So what is the use of this method and object??

Can please anybody tell me?

Thanks in advance....

4 REPLIES 4

Former Member
0 Kudos

Hi..

<b>NON-SAP</b> systems cannot call BAPI untill we assign it to an OBJECT in <b>SWO1</b>.

we have to release it...then it should appear in object list in transaction code <b>BAPI</b>

then only we can call our BAPI from <b>JAVA, VB</b> and <b>Internet, Intranet and R/3 satellite systems</b>so...on.

1)<b>BAPI are RFC enabled function modules</b>. the difference between RFc and BAPI are business objects. You create business objects and those are then registered in your BOR (Business Object Repository) which can be accessed outside the SAP system by using some other applications (Non-SAP) such as VB or JAVA. in this case u only specify the business object and its method from external system in BAPI there is no direct system call. while RFC are direct system call 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.

The following standardized BAPIs are provided:

Reading instances of SAP business objects

GetList ( ) With the BAPI GetList you can select a range of object key values, for example, company codes and material numbers.

<b>The BAPI GetList() is a class method</b>.

GetDetail() With the BAPI GetDetail() the details of an instance of a business object type are retrieved and returned to the calling program. The instance is identified via its key. The BAPI GetDetail() is an instance method. BAPIs that can create, change or delete instances of a business object type

The following BAPIs of the same object type have to be programmed so that they can be called several times within one transaction. For example, if, after sales order 1 has been created, a second sales order 2 is created in the same transaction, the second BAPI call must not affect the consistency of the sales order 2. After completing the transaction with a COMMIT WORK, both the orders are saved consistently in the database.

Create( ) and CreateFromData! ( )

The BAPIs Create() and CreateFromData() create an instance of an SAP business object type, for example, a purchase order. These BAPIs are class methods.

Change( )

The BAPI Change() changes an existing instance of an SAP business object type, for example, a purchase order. The BAPI Change () is an instance method.

Delete( ) and Undelete( ) The BAPI Delete() deletes an instance of an SAP business object type from the database or sets a deletion flag.

The BAPI Undelete() removes a deletion flag. These BAPIs are instance methods.

Cancel ( ) Unlike the BAPI Delete(), the BAPI Cancel() cancels an instance of a business object type. The instance to be cancelled remains in the database and an additional instance is created and this is the one that is actually canceled. The Cancel() BAPI is an instance method.

Add<subobject> ( ) and Remove<subobject> ( ) The BAPI Add<subobject> adds a subobject to an existing object inst! ance and the BAPI and Remove<subobject> removes a subobject from an object instance. These BAPIs are instance methods.

No it is not possible to connect <b>SAP to Non-SAP</b> systems to retrieve data using RFC alone. RFC can acces the SAP from outside only through BAPI and same is for vice versa access.

Message was edited by:

Rammohan Nagam

Former Member
0 Kudos

Hi,

BAPI is nothing but the BUSINESS OBJECT (which you create in SWO1) Method.

So SWO1 is used to create business objects.

This object will have Key figures, methods, Events etc.

create the correct object with correct method ans use it for BAPI.

reward if useful

regards,

ANJI

Former Member
0 Kudos

hI.,

you are calling that BAPI or the REMOTE enabled function module from the same R/3 system itself... try calling this from a NON-SAP system.. then u cannot get the data from this system INto a NON-SAP system through JAVA connector .. for that u need to assign this FM to a Business Object and Generate it... then onli u can call this BAPI from out side the SAP system..

Check whether ur BAPI gets stored in BAPI explorer or not?? it will not ..

Transaction code is BAPI.. when u assign this to a BO then onli it will be explored in BAPI explorer..!!

Hope u understood..

regards,

sai raemsh

0 Kudos

Thanks for ur help

I understood....

But can u tell me procedure to use BAPI from JAVA or VB?

Thanks in advance...