ODATA topics necessary for SAP Ui5 / FIORI

 

  • The main purpose of OData services is to implement ‘Database Functionalities’.

Types of OData services :-

  1. ODATA ABAP Service :- Interact with backend system of ( SAP ECC/CRM/SRM/SCM )
  2. ODATA HANA Service :- Interact with backend system ( SAP HANA ).
  3. ODATA External Services :- Interacts with backend system ( Non SAP system ).

ODATA ABAP Service :-

  • These OData services are mainly executed under SAP NetWeaver gateway component with database operations ( Select, Insert, Delete, Update ).
  • SAP NetWeaver gateway support two formats mainly
    1. XML format
    2. JSON format ( preferred because it is a light wight format )
  • From frontend if we indicate format with xml then SAP NetWeaver gateway component will hold the data under entity set in XML format.

Suppose, we have this employee Data

1001 Vijay 34

XML format



JSON Format




Advantages of OData Services :-

  • OData services are independent of frontend, these can be accessed in various front end apps like SAP Ui5 or FIORI, .NET, PHP etc.
  • OData services are reusable.
  • OData ABAP services will be developed under SEGW transaction code.
  • SEGW :- SAP NetWeaver gateway service builder tool.

Properties of OData service :-

  • Every OData service project contains mainly
    1. Data Model
    2. Service Implementation
    3. Runtime Artifacts
    4. Service Maintenance

1. Data Model :-

1. Entity Type :-

  • It is an option to maintain the collection of fields with data type and length.

2. Entity Type :-

  • Entity Type is similar to structure in normal ABAP.

3. Entity :-

  • Entity is an option to hold a single record at a time.
  • Entity is similar to work area in normal ABAP.

4. Entity Set :-

  • Entity Set is an option to hold the collection of records.
  • Entity Set is similar to internal table in normal ABAP.

5. Association :-

  • Association is the relationship between two entity types.

6. Association Set :-

  • Association is a relationship between two entity sets.

Note :-

  • Under single ODATA project we can have n number of entity type and entity sets.

2. Service Implementation :-

  • It mainly contains CRUD Methods.

    


3. Runtime Artifacts :-

  • Runtime artifacts mainly contains runtime classes ( which are auto generated ).

1. _MPC → Model Provider Class

2. _MPC_EXT → Model Provider Extension Class

3. _DPC → Data Provide Class

4. _DPC_EXT → Data Provider Extension Class

5. _SRV → Registered Service

6. _MDL → Registered Model


4. Service Maintenance :-

  • Error Log → To trace / find out error
  • Gateway Client :- Temporary screen to test ODATA service functionality.

Comments

Popular posts from this blog

Understanding Different Types of SAP Function Modules: Normal, RFC, and Update

Unlocking SAP ABAP Secrets: Interactive Classical Reports with GET CURSOR, At User Command, and a Comparison of HIDE Statements

Mastering ABAP: A Step-by-Step Guide to Function Modules and Groups for Modularized Programming