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

BADI

Former Member
0 Likes
641

hi,

IN BADI WHAT IS MEANT BY INTERFACE WHITOUT INTERFACE IS IT POSSIBLE CREATE A BADI?

THANK YOU

ASHOK KUMAR

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
613

Its nothing but different events/method in a BADI.

I dont think its possible to create a BADI without interface.

4 REPLIES 4
Read only

Former Member
0 Likes
613
Read only

Read only

Former Member
0 Likes
614

Its nothing but different events/method in a BADI.

I dont think its possible to create a BADI without interface.

Read only

Former Member
0 Likes
613

Hi,

It is often necessary for similar classes to provide similar functions that are coded differently in each class but which should provide a uniform point of contact for the user. For example, you might have two similar classes, savings account and check account, both of which have a method for calculating end of year charges.

The interfaces and names of the methods are the same, but the actual implementation is different. The user of the classes and their instances must also be able to run the end of year method for all accounts, without having to worry about the actual type of each individual account.

Interfaces are independent structures that you can implement in a class to extend the scope of that class.

Interfaces are base for the method overloading.

<b>Defining Interfaces</b>

Like classes, you can define interfaces either globally in the R/3 Repository or locally in an ABAP program. For information about how to define local interfaces, refer to the Class Builder section of the ABAP Workbench Tools documentation. The definition of a local interface <intf> is enclosed in the statements:

INTERFACE <intf>.

...

ENDINTERFACE.

The definition contains the declaration for all components (attributes, methods, events) of the interface. You can define the same components in an interface as in a class. The components of interfaces do not have to be assigned individually to a visibility section, since they automatically belong to the public section of the class in which the interface is implemented. Interfaces do not have an implementation part, since their methods are implemented in the class that implements the interface.

<b>Implementing Interfaces</b>

Unlike classes, interfaces do not have instances. Instead, interfaces are implemented by classes. To implement an interface in a class, use the statement

INTERFACES <intf>.

in the declaration part of the class. This statement may only appear in the public section of the class.

When you implement an interface in a class, the components of the interface are added to the other components in the public section. A component <icomp> of an interface <intf> can be addressed as though it were a member of the class under the name <intf~icomp>.

<b>follow this link for more information on INTERFACES.</b>

http://help.sap.com/saphelp_nw2004s/helpdata/en/c3/225b6254f411d194a60000e8353423/content.htm

Two implementation are possible for the same BADI, because BADI is an INTERFACE.

the triggering of the IMPLEMENTATION depends on the CALLING THE INTERFACE method.

which method( implementaion part) called first, that method only triggered first.

<b>Filtering concept in BADI.</b>

BADI may be implemented depending on a specific filter value( example COUNTRY-SPECIFIC VERSIONS: distinct implementations of the BADI can be created for the COUNTRY).

a filter type must be entered when defining your enhancement ( a country or industry, for example).

all methods created in the enhancement's interface have filter value 'FLT_VAL' as their import parameter.

the method then selects the active implemetation based on the data provided in the filter value.

for seting the filter value, you must enable the option FILTER DEPEND and provide FILTER TYPE in the ATTRIBUTES of the BADI defination.

SE18 is the transaction code for creating BADI.

<b>follow this link for more information on BADI.</b>

http://help.sap.com/saphelp_nw04/helpdata/en/ce/b09b3cbe4ca00ee10000000a11405a/content.htm

Regards,

Padmam.