Start of Content Area

Object documentation ABAP Proxy Objects  Locate the document in its SAP Library structure

Definition

All ABAP objects that are created when you generate an interface object from the Integration Repository in an SAP system are called ABAP Proxy Objects.

Structure

You can divide the different interface objects (the objects from the Integration Repository from which you generate proxies) into two classes: The message interface itself and the corresponding parameters and data types (also see: Converting WSDL to the Target Language). Each generated proxy object can be assigned to its corresponding interface object in the Integration Repository even after generation. The ABAP proxy generation function notes this assignment using metadata, which is transported with the proxy object.

Interfaces

Message interfaces can have the mode synchronous or asynchronous (see: Communication Parameters). Furthermore, the category of the message interface determines what type of proxy is generated.

        The counterparts to outbound message interfaces in application systems are client proxies. They are called to send a message to an inbound interface. An outbound message interface is mapped to an ABAP object class (prefix CO_).

        The counterparts to inbound message interfaces in application systems are server proxies. They are called to start a service that, in the synchronous case, returns a result. The proxy generation functions generate an ABAP object interface (prefix II_) for an inbound message interface; you must implement this interface using an ABAP object class to make this service available.

Note

This class must be recognized by the ABAP proxy runtime so that it can call the appropriate method when a message arrives. The proxy generation function enters an implementing class as the default setting on the tab page Properties; this class is generated after the proxy has been activated. If you want to use a class that already exists, enter it in this field.

        Abstract message interfaces have no significance for application systems and are ignored by the proxy generation function.

The system generates methods with the following names, depending on the type of communication:

        In the case of synchronous interfaces, the method is called EXECUTE_SYNCHRONOUS

        In the case of asynchronous interfaces, the method is called EXECUTE_ASYNCHRONOUS

These names apply, regardless of whether the interfaces are inbound or outbound message interfaces. A proxy class also contains methods for implementing protocols as well as enabling message exchange.

See also: Programming with Client and Server Proxies.

Parameters and Data Types

The following can be established for both outbound and inbound message interfaces:

        The output message type becomes a parameter with the name OUTPUT. The input message type becomes a parameter with the name INPUT. OUTPUT refers to an outbound message, INPUT to an inbound message. Both parameters are structures of the respective message type with a field for the data component of the message.

        The data component of the message is communicated with by using the message type name. For example, if the message type is Report and it references the data type InvoiceData, then a structure Report of type InvoiceData is generated.

Proxy generation saves a reusable data type in the ABAP Dictionary for global XSD data types, for example data elements or structures. It generates fields of a structure for local elements or attributes. The reuse of data types in the Integration Repository is reflected in the data types created in the system.

Tables

There is no explicit table type in XSD. However, you can define elements so that there is no limit as to how often they may occur (also see: Elements and Attributes). For example, assume you require a data type staff, which you can use to select a group of colleagues as members of staff and assign them a manager. The following table reflects the definition of this data type in the XSD editor:

Definition of an Unbounded XSD Element Within a Structure

Structure

Category

Type

Occurrence

Description

staff

Complex Type

 

 

 

[-] manager

Element

 

1

staff manager

 

name

Element

xsd:string

1

 

 

birthday

Element

xsd:date

1

 

[-] employee

Element

 

1..unbounded

staff members

 

name

Element

xsd:string

1

 

 

birthday

Element

xsd:date

1

 

 

According to this definition, the element employee can occur more than once in the corresponding XML schema. For employee, the proxy generation functions generate an ABAP Dictionary table type and a structure for the line type with the fields name and birthday.

Integration

You cannot change ABAP proxy objects manually in the SAP system. You can only change an ABAP proxy object by using the ABAP proxy generation function. ABAP proxy objects only map data structures defined in the Integration Repository. Therefore, they are not supported and must not be used on the interface.

Message Interfaces with RFC or IDoc Messages

You can generate ABAP proxies for message interfaces that reference RFC or IDoc messages. The generated proxy objects (for example, classes and generated structures) use the name of the message interface that references the message as the prefix in the technical name. The proxy objects belonging to the RFC or IDoc message belong to the superordinate message interface and are not reused by the proxy generation function. RFC exceptions are grouped in an exception class.

Example

The following graphic illustrates how an interface from the Integration Repository is mapped to an ABAP proxy:

This graphic is explained in the accompanying text

 

 

 

 

 

End of Content Area