About interface

I want to know how to use interfaces in ABAP oops with an example.

Hi,
You use it just the same way as you use them in other OO languages supporting this concept, e.g. Java. There are many examples in the SAP system itself as well as on the internet (at least for Java, here: http://java.sun.com/docs/books/tutorial/java/concepts/interface.html).
Regards, Gerd Rother

Similar Messages

  • About interface mapping

    what are there case about interface mapping?
    i knew that the following:
    outbound to inbound
    abstract to abstract.
    what else the case?

    Hi joy zheng  ,
    These r the details about interface mapping :
    Interface Mappings
    You can define mappings for an interface pair (source and target interface) by using message interfaces and message types in the Integration Repository.You can also define the corresponding mappings when the source or target interface is an IDoc, an RFC, or another interface connected by an adapter.
    When defining mapping programs for request, response, or fault messages, the definition is first separated from the interfaces that reference the corresponding message types. Furthermore, you can reuse a message type for multiple interfaces. This means that the simple definition of a mapping program is not sufficient to establish a connection (that is based on the assignment of outbound and inbound interfaces).
    This role is undertaken by the interface mapping:
    ●     An interface mapping specifies the corresponding mapping programs for request, response, or fault messages for a selected interface pair. You use an interface mapping to register mappings for an interface pair.
    ●     You can also specify multiple mapping programs to be executed one after the other in the case of requests and responses for an interface mapping.
    You can also define multiple interface mappings for the same interface pair, to provide multiple variants in the Integration Repository. At configuration time, the customer can select the appropriate mapping in an interface determination and save it in the Integration Directory
    Use :
    Interface mappings register your mapping program for an interface pair in the Integration Repository. If you require a mapping at runtime, it is sufficient to select the interface mapping for the interface pair at configuration time . The Integration Server uses the interface mapping to identify associated mapping programs for request messages, response messages, fault messages, or all three.
    Features
    Executing Multiple Mapping Programs for One Direction
    By using an interface mapping you can execute multiple mapping programs consecutively for the transformation of a request or response message. In such cases, an interface mapping comprises multiple steps for which the following applies:
    ●     The steps are executed in the sequence specified (from top to bottom). The result of the mapping program from the previous step is forwarded to the mapping program of the subsequent step.
    ●     Each step can reference a mapping program that executes a 1:1, 1:n, n:1, or an m:n transformation. In the case of multi-mappings (1:n, n:1, or m:n), the previous step must create the same number of messages that the subsequent step expects.
    ●     Multi-mappings use one envelope to put all messages in one structure. If one of the steps references a multi-mapping program, all subsequent steps must use the same envelope.
    The mapping for a request message comprises two message mapping programs: one 1:1 transformation and one 1:n transformation. Since the latter message mapping uses the multi-mapping envelope for both the target message and the source message, the message mapping for the 1:1 transformation must also create a transformation result with a multi-mapping envelope.
    You do not strictly need to divide up one direction of the whole mapping into different steps. However, this enables all the message formats in one system landscape to be mapped to a central message format, for example. This results in less mapping programs being required because you no longer need to be able to map all the different message formats to each other.
    Activities
           1.      Create your interface mapping on the design maintenance screen of the Integration Builder (see also: Creating an Object).
    You can also create multiple interface mappings for the same interface pair.
           2.      Enter the source and target interfaces that require a mapping of the request message, the response message, the fault message, or all three, in the table of the same name. The following restrictions apply:
    ○     If you want to use the interface mapping in a transformation step in an integration process, you must only specify abstract message interfaces. Furthermore, all objects (integration process, interface mapping, and all objects referenced by the interface mapping) must be in the same software component version. If you want to reference objects from underlying software component versions, you must access the objects from the Basis Objects branch (in the navigation tree or using an input help) (see also: Underlying Software Component Versions).
    ○     If you want to map multiple messages to each other by using a multi-mapping, you can only specify asynchronous interfaces (for further restrictions, see: Multi-Mappings). If any message interfaces are missing, you can also create them by using the functionCreate New Object ().
    If the interface cannot be imported or cannot be created in the Integration Repository (in the case of an external adapter, for example), you must enter the interface names manually. However, it is not possible to check the technical name in this case.
           3.      To import the properties of the interfaces, choose Read Interfaces. The table in the lower area displays tab pages for the request message, response message, and if available, for the fault message, for each mode of the interfaces (either synchronous or asynchronous).
           4.      To develop an external mapping program, export the XSD schema of the respective request or response message as a zip file after you have imported the interfaces. The zip file can contain multiple schema files that reference each other, for example in a multi-mapping. In this case, the schema with the global message element has the name MainSchema.
           5.      To reference a mapping program for the respective message, you have the following options:
    ○     Select an existing mapping program from the Integration Repository by using the input help (). If this is a message mapping, the default setting of the input help only displays those message mappings that are found using the source and target message in the Integration Repository (in multi-mappings, the first source and target messages are used as the search criteria). However, you can also display any number of message mappings, for example, because you are constructing a mapping from several mapping programs with intermediate instances which have no message types.
    ○     You can create message mappings directly from the interface mapping. To do this, select the mapping type Message Mapping in the Type column. Position the cursor in the Name column and choose the function Create New Message Mapping () in the Mapping Program frame. The Integration Builder copies the specifications of the messages and their occurrence directly from the interface mapping.
    An interface mapping can only reference mapping programs that belong to the same or an underlying software component version of the interface mapping. This ensures that the mapping program can be shipped together with the interface mapping (see: Software Logistics).
           6.      If you are not using a mapping for a fault message, you can execute multiple mapping programs in succession for request and response messages:
    ○     To insert an additional line for a mapping program, choose .
    ○     To delete the registration for a mapping program, choose .
    At runtime, the mapping programs are executed from top to bottom.
           7.      Save the interface mapping.
    The following web-site gives complete details about interface mapping :
    http://help.sap.com/saphelp_nw2004s/helpdata/en/12/05731a10264057badc32d3d3957015/content.htm
    **********Please reward points if u find this useful
    cheers,
    gyanaraj

  • Question about Interface

    Hi everyone,
    I have a question about interface :
    an interface can only have abstract methods, right ?
    so how come ResultSet (which is an interface) has methods like next() which can't be abstract otherwise it wouldn't do anything ?
    thanks for answering !

    an interface can only have abstract methods, right ?Yes. All methods in an interface are inherently public and abstract.
    so how come ResultSet (which is an interface) has
    methods like next() which can't be abstract otherwise
    it wouldn't do anything ?It defines the next() method for classes that implement the interface. When you get a ResultSet reference returned from a method call, you're not getting a reference to an interface; you're getting a reference to an object that implements that interface (or null, as the case may be).

  • Doubt about interface & abstract

    Hai everybody,
    I am new java technology. I need clear discribtion about interface & abstract.
    Please give some examples and differentiate it.
    i awaiting for your reply
    by
    azhar

    Even Wikipedia has info about this:
    http://en.wikipedia.org/wiki/Interface_%28Java%29
    http://en.wikipedia.org/wiki/Class_%28computer_science
    %29#Abstract_and_concrete_classeswhenever someone asks this question, they don't really want to read about it, they just want someone to tell them the secret rules about when to use an interface and when to use an abstract class. but we're not telling :-)

  • Docs about Interfaces between CO and BW/BI

    Hi all Gurus,
    I am just looking for documents about Interfaces between FI/CO and BW/BI. Can any body provide me the required documents. It is very urgent....  [email protected]
    Thanks in advance
    SIM
    Edited by: SIM on Feb 22, 2008 12:19 PM

    Hi
    You are right. I meant the interfaces between FI/CO and BW/BI. Namely how do we build the Interfaces such as IDOC and other interfaces between them. I need practice oriented docs with all steps towards building interfaces.
    Thanks
    SIM

  • The question about Interface Mapping in BPM

    Hello,
    I am a few confused about  an Interface Mapping in BPM at the Design step.
    I have a task to transmit and trasform two messages of two sender file adapter to  two IDOCs messages and then to send them to SAP system.
    I use BPM.
    But I don't understand what types of message interfaces should I use for source and target interfaces in Interface Mapping? As to the target interface I understand it must be abstract but which of interfaces exactly?
    Actually there are some questions here:
    1) If the source interface should be abstract or real in Interface Mapping?
    2) If the target interface should be  the abstract interface of Receive Step object or the abstract interface of Send Step object?
    3) And what the message types should I use for the source and target message interfaces in Interface Mapping? If I understand correctly that these message types

    hi igor,
    you have to import the IDOC Types under the imported objects in the integration repository objects,
    what are all the data that coming out from the file adapter, you design the datatype.
    the target IDOC should be real and you do the mapping for the all necessary fields.
    refer: --
    File to IDOC:
    Re: how to Sending XML data to idoc
    IDOC Mapping:
    http://help.sap.com/saphelp_crm40/helpdata/en/77/a1d48b1ce06d40932e0a26f3c117ce/frameset.htm

  • About Interface objects in Integration Repository

    Hi All,
       I want to know details about Data type enhancements & Context objects in Interface Objects.Please help me.
    Thanks,
    GOPI.

    Hi Gopikishor,
            _Context objects:_ Its nothing but  to access a  element payload of the message,in Simple terms,  X-Path expressions in the repoistery..
    Deeply Nested elements in the Message structure.
    Ex:
    <Header>
         <PurchaseOrgData>
                <Sender>
                       <PurchaseData> Goods</PurchaseData>
                 </Sender>
         </PurchaseOrgData>
    </Header>
    Define X-path for the above structure: \Header\PurchaseOrgData\Sender\PurchaseData\
    Once we can define the "Context Objects" we can use following situations..
    1) Receiver Determination: During the Receiver Condition in the Integration directory,
    2) Integration Process: During the processing business process depends upon content of message.
    Datatype Enhancement:
    http://help.sap.com/saphelp_nw04/helpdata/en/a5/04623c4f69b712e10000000a114084/frameset.htm.
    Regards,
    Sateesh N.

  • Question about interface for recording electric guitar and vocals

    Ok, I've been messing around with Garageband all day, totally stoked and I'm ready to get into it. Right now I'm using a First Act quarter inch plug to USB cord to hook up my guitar and start recording and after some messing around I got it to work.
    Here's my question... to really make quality recordings, what's the best way to hook up the guitar? Is the way I'm doing it now fine with the USB cord or is some sort of interface better? Can someone recommend one that's on the cheap side? Also, I haven't tried yet, but what's the best way to record vocals? Should I invest in a USB mic? Can anyone recommend one? I have a Shure SM58 already, what's the best way to hook that up?
    Really excited about this, can't wait to start cranking out some songs!
    PS: When I use the USB cord, I don't see any way to control the recording level, and sometimes I get a Feedback control warning. How can I lower the level so I don't get that? Thanks!
    Message was edited by: xSlamx

    I have a total now of 4 interfaces - I recently purchased a FOCUSRITE SAPPHIRE 6 USB - it's amazing quality and I only paid $149 for it at my local Guitar Center. I use it with my Guitar and everything sounds fantastic - they say the preamps are really high-quality for Mics too... I recommend it. I have a firewire interface too but the Sapphire is my man baby now - don't let the USB 1.1 fool you - it works flawlessly with my Mac and my Windows 7 machine too. It also comes with a selection of software including Ableton Live Lite and 4 really nice Focusrite plug-ins too.

  • Need information about interfaces and namespaces in actionscript 3.0

    Hi,
    I need information about actionscript interfaces and
    namespaces, I'm preparing for ACE for Flash CS3 and I need to learn
    about this subjects and I can not find resources or simple examples
    that make these subjects understandable.
    Anybody can help me!
    Thanks a lot.

    Interfaces (cont.)
    Perhaps the most useful feature of interfaces is that you not
    only can define the data type but also method signature of the
    class that implements this interface. In other words, interface can
    define and enforce what methods class MUST implement. This is very
    useful when classes are branching in packages and team of
    developers works on a large application among others.
    The general syntax for an Interface with method signatures is
    written the following way:
    package{
    public interface InterfaceName {
    // here we specify the methods that will heave to be
    implemented
    function method1 (var1:dataType,
    var2:datType,…):returnType;
    function method2 (var1:dataType,
    var2:datType,…):returnType;
    To the previous example:
    package{
    public interface IQualified {
    function method1 ():void;
    function method2 ():int;
    Let’s write a class that implements it.
    If I just write:
    package{
    public class ClassOne extends DisplayObject implements
    IQualified {
    public function ClassOne(){}
    I will get a compilation error that states that I did not
    implement required by the interface methods.
    Now let’s implement only one method:
    package{
    public class ClassOne extends DisplayObject implements
    IQualified {
    private function method1():void{
    return;
    public function ClassOne(){}
    I will get the error again because I implemented only one out
    of two required methods.
    Now let’s implement all of them:
    package{
    public class ClassOne extends DisplayObject implements
    IQualified {
    private function method1():void{
    return;
    private function method2():int{
    return 4;
    public function ClassOne(){}
    Now everything works OK.
    Now let’s screw with return datatypes. I attempt to
    return String instead of void in method1 in ClassOne:
    private function method1():String{
    return “blah”;
    I am getting an error again – Interface requires that
    the method1 returns void.
    Now let’s attempt to pass something into the method1:
    private function method1(obj:MovieClip):void{
    return;
    Oops! An error again. Interface specified that the function
    doesn’t accept any parameters.
    Now rewrite the interface:
    package{
    public interface IQualified {
    function method1 (obj:MovieClip):void;
    function method2 ():int;
    Now compiler stops complaining.
    But, if we revert the class back to:
    private function method1():void{
    return;
    compiler starts complaining again because we don’t pass
    any parameters into the function.
    The point is that interface is sort of a set of rules. In a
    simple language, if it is stated:
    public class ClassOne implements IQualified
    it says: “I, class ClassOne, pledge to abide by all the
    rules that IQualified has established and I will not function
    correctly if I fail to do so in any way. (IMPORTANT) I can do more,
    of course, but NOT LESS.”
    Of course the class that implements an interface can have
    more that number of methods the corresponding interface requires
    – but never less.
    MORE means that in addition to any number of functions it can
    implement as many interfaces as it is desired.
    For instance, I have three interfaces:
    package{
    public interface InterfaceOne {
    function method1 ():void;
    function method2 ():int;
    package{
    public interface InterfaceTwo {
    function method3 ():void;
    package{
    public interface InterfaceThree{
    function method4 ():void;
    If our class promises to implement all three interface it
    must have all four classes in it’s signature:
    package{
    public class ClassOne extends DisplayObject implements
    InterfaceOne, InterfaceTwi, InterfaceThree{
    private function method1():void{return;}
    private function method2():int{return 4;}
    private function method3():void{return;}
    private function method4():void{return;}
    public function ClassOne(){}
    Hope it helps.

  • Information about interfaces

    HI all,
    now a computer can have a number of interfaces. e.g ethernet port, USB port, fire wire. All of these can be used for communication (let say connecting to the internet when i say communication ) however a few of them can be used for other purpose as well e.g. u can connect a mouse / external mememory to the USB port. then it doesnot function as a comuunication port.
    Now what i need to do is find out all the interfaces on the computer and find out whether it is being used as an communication interface (and also what kind of communication e.g. ethernet, 802.11a, 802.11b etc).
    So basically i need to get two things.. all the intefaces and the signatures of the different kind of devices attached to the interface so that i can discover the kind of device connected to the interface.
    Now the Network INterface class in java API gives the interfaces on the basis of IP address right? but i guess here i need to do a bit further and not just check for the IP address.
    Can anyone help me out here?? give me some hints/directions ?
    Thanks in advance
    Amitabh

    You could get the names of the Serial ports using the Java Comm API from IBM developer works and the java.net API to get the NIC card interfaces. This does not include the mouse and keyboard ports.
    The remaining stuff, as far as I know, is out of the realm of possibility for Java alone. As a rule of thumb, when you need detailed information about a system's hardware configuration, Java cannot help. You'd have to write some C/C++ JNI code to get them.

  • Suggestions about interface: graph, directed and undirected graph

    Hello all,
    I'm having some doubts about the right 'choice' of interfaces. I'm designing a little library for graphs and I was thinking about the difference between directed and undirected graphs, and how I should reflect this in the library. My apologies for my bad English.
    There is a small, but elegant, difference between directed and undirected graphs. Therefor, I don't know if it's worth to distuingish this difference in interfaces or not. I'll explain the difference by example. Usually, you can ask a directed graph the following queries:
    - all out-edges of a node + the total of such edges (outdegree)
    - all in-edges of a node + indegree
    - the successors of a node
    - the predecessors of a node
    The same questions can be asked to a undirected graph, but the in-edges and the out-edges of a node are equal, the successors and the predecessors are equal, etc... Thats basically the only difference between directed and undirected graphs.
    I found some solutions to define graphs, directed graphs and undirected graphs by means of interfaces.
    [1] one interface, duplicate methods, no tagging interfaces
    public interface Graph {
        Set getOutEdges(Node node);
        int getOutDegree(Node node);
        Set getinEdges(Node node);
        int getinDegree(Node node);
        Set getSuccessors(Node node);
        Set getPredecessor(Node node);
        boolean isDirected(); // no tagging interface
    }[2] one interface, duplicate methods, tagging interfaces
    public interface Graph {
        Set getOutEdges(Node node);
        int getOutDegree(Node node);
        Set getinEdges(Node node);
        int getinDegree(Node node);
        Set getSuccessors(Node node);
        Set getPredecessor(Node node);
    public DirectedGraph extends Graph { } // tagging interface
    public UndirectedGraph extends Graph { } // tagging interface[3] three interfaces
    public interface Graph {
    public interface DirectedGraph extends Graph {
        Set getOutEdges(Node node);
        int getOutDegree(Node node);
        Set getinEdges(Node node);
        int getinDegree(Node node);
        Set getSuccessors(Node node);
        Set getPredecessor(Node node);
    public interface UndirectedGraph extends Graph {
        Set getTouchingEdges(Node node);
        int getdegree(Node node);
        Set getNeighbors(Node node);
    }In the first solution, you dont know at compile time whether a graph is directed or undirected. However, it is very elegant for algorithms, since a lot of algorithms work for directed and undirected graphs. The main disadvantage of this solution is that you have duplicate functions in case of of undirected graphs: getOutEdges and getInEdges return the same set, etc.
    The difference between the first and the second solution is that the second solutions gives a way to detect whether a graph is directed or undirected at compile-time.
    The third solution has two seperate interfaces. This is much logical, and you know the graphtype at compile-time. However, this approach might lead to bloated code, as the algoritms for undirected and directed graphs now have two graphtypes (this can ofcourse be fixed by itroducing some kind of decorator, which in fact simulates the first solution).
    As I don't have much experience in design, I can't forsee any big problems or disadvantes of one of the approaches. Therefor, I would like to ask for your opinion. What approach is most common and best practice?
    Thanks in advance.

    I would tend to go with true inheritance for this case. There is a strong ISA relationship between a graph and uni-directional and bi-directional graphs. Programming to an interface (as in the Lyskov substitution principle) will give you a parallel heirachy of interfaces and implementations. This can become a problem if you start out not knowing what interface needs to be published, but in the case of graphs this should not be a problem. With a heirachy all the shared code can be written once. In this case the specialized code will just simplify calling more general code in the parent class.
    If all your graphs fit into memory then the implemenation should not be a problem. I used to work with map data where the graph does not fit into memory. Then you have to be careful about your interface or you will be getting calls that cannot be properly optimized "behind the scenes". Another specialization is in game programming where nodes are not actually expanded until they are "arrived at". Then you have to keep information about what parts of the structure are fleshed out and which are provisional.

  • Questions about interfaces,monitors,keyboards,cables help please

    I just bought a macbook pro 1.87ghz. w/ 1 gb I would like to record music primararly acoustic stuff (john mayer type stuff) I was wondering what types of
    interfaces or keyboards, mics, monitors, cables ,should I buy to get the most professional sound with. I have a budget of about 1200.00 I want to spend any recommendations? Please Help I appreciate your time:)

    What I would probably go with in this situation, using the limited information you have given:
    Interface - Presonus Firebox $300
    Keyboard - M-Audio Oxygen 8 v2 $150
    Mics - Studio Projects B1 and C1 $300
    Monitors - Event ALP5 $300
    (really would depend on whatever small monitor sounds best to you)
    Cables (firewire, usb, mic, stands, etc.) - $100
    Now you will probably get as many different answers as you will responders but the best advice I can give is to read everything you can on recording and mixing. During this time, save up another $800 or so and treat your recording and mixing area.

  • Urgent help about Interface problem

      Please take a look at the following picture:
    Description:The vitual keyboard doesn't disappear when I slide to the leftmost "Search :iPhone" and then slide to the right.Whatever I slide the interface It remains until I start an app ! What is the problem?
    Location:China mainland
    OS:iOS 5.1, Not  Jailbreak
    问题描述:如图所示,当滑动到最左面的"搜索:iPhone"后,再向右滑动,该虚拟键盘不消失,此时,不论左滑还是右滑,都是这种情况,只有当点击一个程序时,它才会消 失!
    位置:中国大陆
    <Edited by Host>

    Please ignore - DOH
    Mental Block removed, twas a silly mistake ;-) When I had tried it earlier this way I had made a typo.

  • Help about Interfaces in Java

    I need some help with Interfaces since I'm really new to OOP.
    I have 1 interface, 1 class implementing the interface and 1 main function. Here is the structure:
    public interface t_action
          public boolean isvalid(int a, int b);
    public class sec implements t_action
         public boolean isvalid(int a, int b)
         /* Implmentation of this method */
    public class main()
         public static void main(string args[])
              boolean valid = false;
              /* Need to call isvalid in public class sec
                  and assign it to the "valid" variable above
    }My Question is:
    How do i call the method "isvalid" in class sec that implements the t_action interface? I need to assign it to my variable "valid" in class main
    Any help is appreciated.
    Thanks.
    MAZ@McMaster Engineering

    Hey all...
    Thanks for your contribution.
    As I said earlier here: "I'm new to Java" so cut me some slack!!!
    I've been doing C programming all my life so java is similar but quite foreign to me since I started learning it recently on my own
    If this were a normal class and not an interface, it would be:
    class_name myclass = new class_name();
    myclass.isvalid(a, b);But why is it:
    interface_name i = new class_implementing_interface();
    i.isvalid(a,b);Thanks

  • Problem about interface implementation

    Sorry, solved!
    Message was edited by:
    xixiao

    Hi Chris,
    Thanks for your reply. I said that it worked but looks like I still have a question.
    Can I use an interface type as an instance member. If I do, I get an exception
    Exception Description: [MySampleTypeImpl] uses a non-entity [interface MyStatus] as target entity in the relationship attribute.
    When I have MySampleTypeImpl defined as under
    Class MySampleTypeImpl {
    @ManyToOne
    MyStatusImpl status;
    And I put the interface type in the list of classes in persistence.xml it works fine. But when I have the definition of MySampleTypeImpl as below
    Class MySampleTypeImpl {
    @ManyToOne
    MyStatus status;
    Where MyStatus is an interface type I get the exception above. Is there a way out for this.
    Thanks and Regards
    Anil

  • About interfaces

    why should we write public before the method which is implemented in a class from an interface? what is that meaning?

    Hi,
    If you declare that your class implements an interface, you are declaring that it implements the methods defined in the interface.
    External objects expect to have this interface into your object, so they need access.
    patumaire

Maybe you are looking for

  • Apple broke my iPhone. What should i do?

    After ugrading to iOS4, my iPhone 3G is almost useless. I was never advised of this before hand. Since my first post was "REMOVED" by Apple (instead of taking time to direct me to an intelligent answer to my problem...), here is my "technically" "acc

  • Please help.. (Budget)

    Hi all. Good day! I need help, or should I say just an idea how much will I spend on my notebook. My notebook is HP Pavillion G32. 1. Battery - totaly broken. 2. Fan - Im not sure what they call that, but they say its the "fan" inside. Im sure its br

  • Got new imac g5- NO APPLEWORKS!

    I got my IMAC yesterday but there is no appleworks. I have Office 2004 Microsoft word test application. What do I do? Do you have to download appleworks from somewhere? I looked everywhere!

  • [Cisco ISE] What is CACS?

    Dear Sir, Here is the operation>Authentication detail on my Cisco ISE: Result State ReauthSession:0a01010100077000545c5b8a Class OU=VPN-USER2 Class CACS:0a01010100077000545c5b8a:psn/203756592/237  I searched many documents, but none of them could tel

  • Auto SMS alert for Travel reimbursement

    Hi Experts, We want  to send a Auto SMS alert for Travel reimbursement after payment entry in sap.  can anybody help me for the same Regards Raj