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

BAPI

Former Member
0 Likes
742

Hi Friends

Whats is instance dependant and instance independant BAPIs?

what is check of Dialog indicates on details screen in BAPI Explorer.

Please suggest

Regards

Niketan Maral

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
698

Instance methods refer to a specific instance of a business object type; for example, the BAPI Flight.GetDetail retrieves the details of precisely one flight. These methods are defined as instance-dependent in the BOR.

Class methods do not refer to a specific instance of a business object type; for example, the BAPI Flight.GetList supplies a list of all the existing flights that match specific criteria.

Standardized create methods also belong to class methods. A create method creates a new instance. The BAPI FlightBooking.CreateFromData() creates a new flight booking in the SAP System, for example. These methods are defined as instance-independent in the BOR.

Please have a look at below link for details:

http://help.sap.com/saphelp_nw04/helpdata/en/43/b46c1e53c111d395fa00a0c94260a5/frameset.htm

I hope it helps.

Thanks,

Vibha

Please mark all the useful answers

4 REPLIES 4
Read only

Former Member
0 Likes
698

Hi Niketan.

For calling BAPIs of Instance dependent type, you must pass an instance of the object type as input to the BAPI.

Conside BAPI_SALESDOCUMENT_COPY. Here we are passing an Salesorder (instance of object type BUS2032) to the BAPI, hence this is instance dependent.

Instance indpendent BAPIs are similar to static method. You dont have to pass the object instance. This is the indicator that the attribute is valid for all instances (objects) of the object type ("class attribute") or that the method does not operate(s) on a concrete object.

No object reference is passed to an instance independent method when it is called. Instance independent methods are generally methods which deliver an object reference (method "Create", method "Find").

For example, in BAPI_SALESORDER_CREATEFROMDAT1, you are creating a sales oder, so it is instance independent.

Dialog Indicates that to execute this method, dialog with a user is required.

Fundamentally, dialog methods cannot be executed in the background.

Please assign points if helpful.

Read only

0 Likes
698

Hi swasthik

thanks for excellent and specific reply.Now i am abosolutely clear with it....

I need your further help..actually i am doing in VB code wherein i am able to call BAPI functions e.g. bapi_po_create which as cleared by you is not a dialoge

now is it possible for me to access bapi functions like bapi_materialcreate standard(not sure about excat name) which is a dialog based function which probably calls SAP GUI screen

pls suggest if any settings to be done

Thanks again and regards

Niketan

Read only

Former Member
0 Likes
699

Instance methods refer to a specific instance of a business object type; for example, the BAPI Flight.GetDetail retrieves the details of precisely one flight. These methods are defined as instance-dependent in the BOR.

Class methods do not refer to a specific instance of a business object type; for example, the BAPI Flight.GetList supplies a list of all the existing flights that match specific criteria.

Standardized create methods also belong to class methods. A create method creates a new instance. The BAPI FlightBooking.CreateFromData() creates a new flight booking in the SAP System, for example. These methods are defined as instance-independent in the BOR.

Please have a look at below link for details:

http://help.sap.com/saphelp_nw04/helpdata/en/43/b46c1e53c111d395fa00a0c94260a5/frameset.htm

I hope it helps.

Thanks,

Vibha

Please mark all the useful answers

Read only

Former Member
0 Likes
698

Hi,

ince BAPIs represent business interfaces and not technical ones, the following central requirement for developing BAPIs arises:

In an external application, users must be able to correctly implement a BAPI call using their knowledge of the application and the BAPI documentation alone. Users are not expected to have any knowledge of SAP, so that they can view the SAP System as a "black box".

In this phase you also have to decide from the BAPI's functions, whether the BAPI is an instance method or a class method and whether it can be implemented as a standardized BAPI.

Instance methods refer to a specific instance of a business object type; for example, the BAPI Flight.GetDetail retrieves the details of precisely one flight. These methods are defined as instance-dependent in the BOR.

Class methods do not refer to a specific instance of a business object type; for example, the BAPI Flight.GetList supplies a list of all the existing flights that match specific criteria. Standardized create methods also belong to class methods. A create method creates a new instance. The BAPI FlightBooking.CreateFromData() creates a new flight booking in the SAP System, for example. These methods are defined as instance-independent in the BOR.

The specific instances of a business object type are identified by their key fields which is why they play a special role in this context. In the design phase, the keys of instance-dependent BAPIs should be identified as special parameters. For more details see Defining the Interface.

When designing the BAPI signature you should keep in mind:

The design of the method (BAPI) and the parameters must comply with certain conventions See also Conventions.

There are a range of standard methods and parameters that provide basic functions. If the BAPIs and their parameters fall into this category, they must be structured according to specified rules. For an overview see Standardized BAPIs and Standardized Parameters.

So that the signature is clearly structured and easy to use, you should follow the design recommendations.

Pls reward if useful.

Thanks,

Sirisha.