The first and foremost step to model OData service is to build entity types and provide properties to them. Besides doing that manually, you can either import them or you can redefine services.
DATA MODEL FROM FILE function lets you import data model from files like .edmx (using Microsoft Visual Studio) or .xml (metadata files). The MV Studio file, EDMX is an XML file which defines storage model, mapping between models and a conceptual model. And in order to import EDMX file, click on DATA MODEL and select IMPORT * DATA MODEL FORM FILE. Next, FILE IMPORT Wizard will open in the window.
How to Use the FILE IMPORT Wizard?
- To import DATA MODEL FILE, click on BROWSE.
- Now, choose whichever data model file you want and click on OPEN and then click NEXT.
- To allow access to the file, click on ALLOW.
- Finally, click FINISH. Once done, you’ll have the data model imported into your project.
Did you know that there’s a physical table on the database for every transparent table? So, a physical table definition is generated in database, defining stores in ABAP Data Dictionary, whenever a table is activated. With the help of DDIC structure import method, you can import structures, views or even database tables. The imported structure from the Data Dictionary can be reused to develop entity types and other types, as the development time gets reduced.
Steps to Import a Data Model using DDIC
- Click on DATA MODEL and select Import * DDIC STRUCTURE. This will open the Data Dictionary Structure Import Wizard.
- Now, give a name and choose an ABAP structure and then click NEXT.
- Choose the fields and parameters and click NEXT.
- Finally click FINISH. Now, you’ll be able to see data model imported into the project.
The ABAP Backend system comes with unique tools to generate services on the basis of various SAP application data. The standard APIs in SAP like Business APIs, RFCs and BOR, makes it easy to get data from SAP Business Suite applications. The fetching of data using SAP APIs (RFC) is commonly used method since, SAP Gateway OData Services are dependent on remote function modules. So, this method reduces the development time to create entity types in the data model. In order to import RFC or BOR API, click on DATA MODEL and select IMPORT * RFC/BOR INTERFACE. Import Wizard for RFC/BOR will open up.
Importance of Search Help
This function lets you import and reuse existing search help from the system to generate a new entity type. Thus, I’ve compiled the steps to enable the import of search help, as follows:
- Click on DATA MODEL and select IMPORT * SEARCH HELP, which will open IMPORT FROM SEARCH HELP Wizard.
- Write ENTITY TYPE NAME and choose IMPORT SEARCH HELP field and then, click NEXT.
- Choose the fields or parameters and hit NEXT.
- Click on FINISH to see the search help imported into your project.
Thus, I’ve shown you how to model an OData service in SAP Fiori, ways to build an OData service and how to make on OData model and generate OData service using RFC Interface.
Receive my tips and tutorials on SAP Industry and developments of SAP. Join my Community of SAP Professionals & Entrepreneurs!
Finally, CONNECT WITH ME ON FACEBOOK HERE. I’d love to hear about your experiences if you’ve worked in SAP, what modules are you certified in and more, on Facebook. I’d also love to help you in your SAP learning journey so that you achieve success in the industry.