Introduction
To reduce the time required to create complex types and entity types in your data model,
the Service Builder provides you the
Import DDIC Structure
function with which you can import an existing ABAP (DDIC) structure and reuse this data
to create new complex types and entity types with ease.
Note
DDIC structures can be imported only for the projects of type Service
with SAP Annotations and Service with Vocabulary-Based
Annotations.
You can import the following DDIC structures into the Service Builder:
- Views
- Database tables
- Structures
Procedure
Importing the DDIC Structure comprises three steps:
- Import the DDIC Structure
- Select the parameters from the DDIC Structure
- Modify the selected parameters
To import a DDIC structure into a data model, proceed as follows:
- Log onto the SAP NetWeaver Gateway system.
- Open transaction SEGW.
The SAP NetWeaver Gateway
Service Builder opens.
- Create a new project.
- Right-click the Data Modelfolder in the open project and select .
The Wizard Step 1 of 3: Import from DDIC Structure—Create
an Entity Type or Complex Type screen of the wizard opens.
- Do the following in the Import from DDIC Structure window:
- Enter a name for the new entity type/complex Type in the
Name field.
- Select either Entity Type (imports the selected structure
into your data model as an entity type) or Complex Type
(imports the selected structure into your data model as a complex type).
- In the ABAP Structure field, enter the ABAP structure
name or use input help to get assistance.
Note
Input help (F4 Help) is not available for class/interface-based type
structures.
- Select Create Default Entity Set to create an entity set
for the entity created.
- Click Next to proceed. If any entry is incorrect, an
error message is displayed.
If the validation check is successful, the
Wizard Step 2 of 3: Import from DDIC Structure-Select
Parameter(s) screen of the wizard opens.
Based on the
selected ABAP structure name in the Wizard Step1 of 3, you can see a
detailed display of the components of the structure as a
tree.
Following columns are editable in this window:
- Data Source Parameter
- Assign Structure
- Import Search Help
The column Search Help displays the
search help associated with the fields.
- Expand the Data Source Parameters and select the required
structures, tables, and properties. You can also use
(Select All) and
(Deselect All) to perform a mass select and deselect. - On selecting the nested structure or table, the corresponding Assign
Structure checkbox also gets selected by default. If you select
individual property in nested structure or table Assign
Structure checkbox should be selected manually.
- If respective Assign Structure checkbox is not selected
then all the selected properties will be created under one root as a flattened
structure.
- Complex Type are created if structures are imported and entity types are
created if tables are imported. In addition, DDIC assignment will be retained
for the newly created artifacts and DDIC structure is assigned if
Assign Structure is selected.
- The Import Search Help checkbox will be enabled if a search
help is associated with the respective Data Source Parameter. The associated search
help is displayed in Search Help column. You can import this
search help by selecting respective checkbox.
Note
The imported search help will be created as a separate entity in Data Model.
End of the note.
- Click Next .
The Wizard Step 3 of 3: Import from
DDIC Structure-Modify Entity Type screen of the wizard opens.
Based on the selection from Wizard Step 2 of 3, the Service Builder lists
an overview of all fields in the structure you have selected to import as an
entity type/complex type. From this list, select the key property.
- The Modify Entity Type screen provides the following editable
and non-editable information:
Table 1:
Modify Entity Type Screen Details
| Name |
Description |
|
| ISEntity |
If the property belongs to the entity type, this check box is
selected. If it is not selected, the property belongs to the complex
type. |
Non-Editable |
| Complex/Entity Type Name |
This is the name of the property. It can either be a complex type
or entity type |
Editable |
| ABAP Name |
This is the technical name. This will not be displayed in the
metadata. |
Non-Editable |
| Is Key |
Indicates whether the imported property is to be imported as a key
of the entity type. Each entity type must define at least one key
property. |
Editable |
| Type |
Type of property. |
Editable |
| Name |
Name of the property |
Editable |
| Label |
Name of the property |
Editable |
Note
If Create Default Entity Set option in Wizard
Step 1 of 3 is selected, then entity sets are created for all
the entities and mapping proposal are created for Query and Read operations for
the selected entities created from Search Help.
Entity sets will be created with the suffix name set.
For example, If Entity type name is E1 then the default entity set name will be
E1Set. You can choose not to create entity sets and mapping proposal by
deselecting this box.
- Click Finish.
Result
- The model contents are transformed from the wizard to the data model as a new entity
type together with its properties and entity sets are also created.
- The selected ABAP Structure name is displayed in the ABAP
Structure Type Name field of the imported entity type/complex type.
- Mapping proposal for query and read operation, for the entities created from Search
Help, are created. This can be confirmed by expanding Service Implementation folder.
Open the new entity sets created. Expand GetEntity (Read) and
GetEntitySet (Query) operations. Double click the
Mappingnode to open. It displays mapping proposal in the
mass maintenance view.
Importing Properties
There might be instances when some properties
were not selected during an import of DDIC structure. In such cases, the Import properties
function can be used to import more properties from the same data source. To import
properties see Importing Properties section in Importing a Data
Source (RFC/BOR Interface). For more information, see Importing a Data Source
(RFC?BOR Interface)