Show TOC

Creating Contracts from SchemasLocate this document in the navigation structure

Prerequisites

Contracts reference semantic contracts. The semantic contract referenced in the contract must exist in the current system. You can create the semantic contract from a schema as well. For more information, see Creating Semantic Contracts from Schemas.

Context

You can export an XML description of a contract and use this as the basis for creating a copy of this contract in another system. Contracts describe the interfaces that are used for communication. Therefore, they must be available in both systems or clients that need to communicate with each other. If you have modeled a contract in one system, you can copy it to another system using the XML file. This is useful in a distributed system landscape without a shared transport manager. A copy like this is assigned an ABAP name automatically. You can only modify such a copy of a contract by editing the original contract and regenerating the copied contract.

Importing a schema creates a complete contract that can be activated immediately. No further editing is required. It contains all required consumer and provider information, as well as the message types.

If a transport manager is available, you can transport contracts across your system landscape.

Exporting an XML Description of a Contract

  1. Open the original contract.

  2. On the Schema tab, choose the Save to file icon.

  3. Save this file and send it to the user who needs to create a contract from it.

Procedure

  1. Open the Enterprise Services Wizard.

    You can also create a contract directly from a semantic contract by choosing Create Contract in the menu bar of the semantic contract editor. To do this, the semantic contract must be active.

    For more information, see Enterprise Services Wizard.

  2. Select External WSDL/Schema as the Generation Source.
  3. Select the XML file.
  4. Specify the ABAP Name of the semantic contract that is referenced by the contract.
  5. On the Transport node, enter the Package name and transport Request (as appropriate).
  6. Choose Complete to close the wizard.
    The contract is displayed.
  7. Save the contract and activate it.

Results

A contract is created containing all necessary information.

Next Steps

In order to update a contract that was created by importing a schema, you must regenerate the original contract and re-export and -import the XML file. You cannot manually edit the contract.
  1. Open the contract in the proxy editor.

  2. Go into editing mode by clicking the Display - Change icon.

  3. Choose Regenerate.

  4. Save the file on your local machine and import into the target system.