Show TOC

Procedure documentationABAP Proxy Generation - General Procedure Locate this document in the navigation structure

 

This section outlines the general procedure for generating, regenerating, and deleting ABAP proxies. Additional information for generating specific proxy types is provided in separate sections.

The procedure to generate ABAP proxies is essentially the same for each different type of proxy. There are two main steps:

  • Select the objects to be called or implemented.

  • Generate and activate the proxies.

Prerequisites

To work with ABAP proxies, you need the SAP_XI_DEVELOPER_ABAP role, which is included in the composite role SAP_XI_DEVELOPER. Use the profile generator (transaction PFCG) to assign roles.

Depending on the proxy type, the following tasks must be done before you generate a proxy:

  • All objects must be modeled in the ES Repository — or be made available as external WSDL descriptions.

    When a proxy that is modeled in the ES Repository is generated for an object that references another object in the same namespace, the proxy for the referenced object will be generated automatically. For example, a proxy could be generated for a service interface that references a specific data type.

    If a referenced object is in a different namespace, you need to generate the proxy for the referenced object separately.

  • The package structure in the ABAP back-end system must be defined.

    The package structure defines where the proxies will be created, where the service provider will be, and how the packages will fit into the overall application structure.

  • Prefixes for the ABAP objects can be defined.

    It is recommended that you define prefixes as they allow you to ensure that ABAP objects in the back-end system are assigned unique and consistent names.

Procedure

Generating a Proxy

You need to be working in the system in which you want to generate the proxy. Proxies are generated in the ABAP back-end system, in which the object will subsequently be provided.

  1. Start the Enterprise Services Repository Browser.

    Use transaction code SPROXY.

    The software component versions are displayed.

  2. Expand the nodes of the software component version and the namespace in which you want to generate a proxy.

  3. Select an object.

  4. To generate the proxy, open the context menu and choose Create proxy.

  5. Specify a package and a prefix, and choose Enter.

    Based on the prefix that you specify, valid ABAP names are proposed. You can change the proposed names as required.

    When the proxy is generated, all the underlying objects will also be generated.

    Information about the generated proxy interface, such as the implementing proxy class, and the generated service definition is displayed in the Properties tab.

    The prefix you specified is displayed as part of the ABAP name in the Properties tab and also in the Structure tab.

    The External view and Internal view tabs respectively show the operations and methods, and the corresponding ABAP message types and data types.

  6. Activate the proxy.

    When the proxy is activated, all the underlying objects are automatically activated as well.

    Note Note

    The ABAP objects, such as the class, interface, DDIC type, are not created in the system until you activate the proxy.

    End of the note.
  7. Release the transport request.

    Use transaction SE09 to do this.

  8. Create a runtime configuration for the proxy.

    Note Note

    A runtime configuration is only needed for service interfaces.

    End of the note.
    1. Start the SAP NetWeaver Administrator.

      Use transaction code SOAMANAGER, choose Central Web Service Administration, and log on.

    2. Select WS Configuration.

    3. Select the service definition that was automatically created during proxy generation.

    4. Choose Create Endpoint.

      An endpoint contains a single runtime configuration. You can create different endpoints to define different runtime behaviors for the same service definition.

    5. Specify a name for the endpoint.

      An endpoint must have a unique name within the Web service entity.

    6. Check that the security profile meets your requirements.

      To make changes, choose Edit.

    7. Save.

      The runtime configuration with a port type is now available on the back-end system, and can be integrated into an application.

Generating Proxies with Industry-Specific Enhancements

To activate industry classifications, you need to select an industry when you generate proxies for Web services delivered with an Enhancement Package. Perform the following steps:

  1. Log on to the back-end system in English.

  2. Start transaction SM30.

  3. Choose the SVW_INDUSTRY view.

  4. Select your industries.

Regenerating a Proxy

If an object is changed in the Enterprise Services Repository (ES Repository) after it has been generated, the changes will not automatically be reflected in the proxy in the ABAP back-end system. If an object in the ES Repository is changed, you will need to regenerate the corresponding proxy manually.

Note Note

In the ES Repository Browser, an icon with a red triangle indicates a version of an ES Repository entity that is different from its proxy version in the ABAP back-end system.

End of the note.
  1. In the Enterprise Services Repository Browser, locate the object whose proxy you want to regenerate.

  2. Open the context menu and choose Regenerate proxy

    This function will only be available if a proxy has already been generated.

    Only the proxy interfaces and classes will be overwritten. The implementing class will remain intact, meaning that the implementation will not be lost.

  3. Reactivate the proxy.

    From the context menu, choose Activate Proxy.

    When the proxy is activated, all the underlying objects will be automatically activated as well.

Deleting a Proxy
  1. In the ES Repository Browser, select an object.

  2. From the menu, choose   Proxy   Delete  .

    Note Note

    By default, the implementing class will not be deleted. Only the generated data will be deleted. To delete the provider class, you must choose to do so explicitly when the system prompts you.

    End of the note.

Result

When proxy objects are activated, one or more of the following ABAP objects are created:

  • ABAP Dictionary types

    ABAP Dictionary types represent the global data types in the ES Repository. The system also generates the data types that will be used as method parameters.

  • ABAP interface

    An ABAP interface comprises interface types and constants.

  • ABAP class (proxy class or implementing class) for provider or consumer proxies

    The ABAP class of a service provider contains the implementation of the service provider methods, and uses an ABAP interface. A service provider class has one method for each operation modeled in the ES Repository. For a proxy to be used by an application, the methods will need to be filled with application coding.