You are on page 1of 1

ABAP Proxy Generation - General Procedure - SAP Documentation http://help.sap.com/saphelp_nw70/helpdata/EN/e5/004f22192b444ab0ba...

ABAP Proxy Generation - General Procedure


The general procedure for generating, regenerating, and deleting proxies is outlined below. Additional information for generating specific proxy types is provided in separate sections.
The way you 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
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.
More information: Tips for Generating ABAP Proxies
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
The ABAP objects, such as the class, interface, DDIC type, are not created in the system until you activate the proxy.
7. Release the transport request.
Use transaction SE09 to do this.
8. Create a runtime configuration for the proxy.

NOTE
A runtime configuration is only needed for service interfaces.
You can create a runtime configuration using the SOA Manager (transaction code SOAMANAGER).
More information: Configuring a Service Provider

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.
More information: Enterprise Services Repository. You can find this documentation in the SAP Help Portal: help.sap.com SAP NetWeaver SAP NetWeaver CE SAP NetWeaver Enterprise Services Repository 7.1

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
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.
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
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.

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.

1 of 1 4/22/2010 4:48 PM

You might also like