0% found this document useful (0 votes)
15 views

Data Provider Extension Class(4class)

The Data Provider Extension Class (DPC_EXT) is a subclass designed for developers to implement database operations by redefining methods. It includes important methods for fetching, creating, updating, and deleting entities, as well as handling file uploads and downloads. Each method contains parameters for data transfer between the front-end application (SAP UI5/Fiori) and the backend OData service.

Uploaded by

yshu1217
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views

Data Provider Extension Class(4class)

The Data Provider Extension Class (DPC_EXT) is a subclass designed for developers to implement database operations by redefining methods. It includes important methods for fetching, creating, updating, and deleting entities, as well as handling file uploads and downloads. Each method contains parameters for data transfer between the front-end application (SAP UI5/Fiori) and the backend OData service.

Uploaded by

yshu1217
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 7

Data Provider Extension Class ( DPC_EXT ) :

===============================================

Data Provider Extension Class is a Sub Class for Data Provider Class

Data Provider Extension Class contains Various Methods

Methods from Data Provider Class


+
Methods from Interfaces
+
Custom Methods if Required

Data Provider Extension Class is for Developer for Implementing Database


Operations by "Re-Defining Methods"
__________________________________________________________________________________
___________

Important Methods of Data Provider Extension Class ( DPC_EXT )


================================================
=========

<EntitySet>_Get_Entity( )
<EntitySet>_Get_EntitySet( )
<EntitySet>_Create_Entity( )
<EntitySet>_Update_Entity( )
<EntitySet>_Delete_Entity( )
+
Update_Stream( ) / Create_Stream( )
Get_Stream( )
Execute_Action( )
Create_Deep_Entity( )
Get_Expanded_Entity( )
_____________________________________________________________

Note : As a Developer , we can implment Database Functionality in DPC_EXT


Class
just by "Redefining Method"
________________________________________________________________

Method Parameters:
=======================

Every Method contains "Method Parameters" for "Data Transfer " between Front-
end App & Backend OData Service

Method Parameters are of two Types

Importing Parameters : Will Accept Input From Front-end App(SAP


Ui5/Fiori)

Exporting Parameters : Will Send Output To Front-end App(SAP


Ui5/Fiori)
_________________________________________________________________________________

<EntitySet>_Get_Entity( ) Method:
_____________________________

This method is used to Fetch Single Record


This method contains Select Statement to Fetch Single Record
This method contains below Method Parameters

it_Key_Tab : Will Accept Input Key Field Value(s) From Front-end App(SAP
Ui5/Fiori)

er_Entity : Will Send Output Record To Front-end App(SAP Ui5/Fiori )


______________________________________________________________________________

<EntitySet>_Get_EntitySet( ) Method:
__________________________________

This method is used to Fetch Collection of Record(s)


This method contains "Select Query" to Fetch N Number of Records
This method Contains below Method Parameters

iv_Filter_String
iv_Search_String
it_filter_Select_options
io_tech_request_Context : will Accept Innput From Front-End App(SAP
Ui5/Fiori )

et_EntitySet : will Send Output Record(s) To Front-end App(SAP


Ui5/Fiori )
__________________________________________________________________________________
____________

<EntitySet>_Create_Entity( ) :
______________________________

This Method is used to Insert Data


This Method contains "Insert" statement to Insert Data
This Method Contains Method Parameters

io_Data_Provider : Will Accept Input Record from Front-End App(SAP


Ui5/Fiori)

er_Entity : Will Send Output Record back to Front-end App(SAP


Ui5/Fiori )
__________________________________________________________________________________
_______
<EntitySet>_Update_Entity( ) :
______________________________

This Method is used to Update Data


This Method contains "Update" statement to Update Data
This Method Contains Method Parameters

io_Data_Provider : Will Accept Input Record from Front-End App(SAP


Ui5/Fiori)

er_Entity : Will Send Output Record back to Front-end App(SAP


Ui5/Fiori )
__________________________________________________________________________________
_______

<EntitySet>_Delete_Entity( ) :
______________________________

This Method is used to Delete Data


This Method contains "Delete" statement to Delete Data
This Method Contains below Method Parameters

it_key_tab : Will Accept Input Key Field Value(s) from Front-end


App(SAP Ui5/Fiori)

set_header : Will Send Output Message to Front-end App(SAP Ui5/Fiori )


(Output Message)
__________________________________________________________________________________
__
Update_Stream( ) Method :
______________________________

This Method is used to Deal with "File Upload Functionality"


This method contains below Parameters

it_key_Tab : Will Accept Input Key Field Value(s) From Front-end App(SAP
Ui5/Fiori)

is_media_Resource :Will Accept Input File Type & Input File Content from
Front-end App(SAP Ui5/Fiori)
__________________________________________________________________________________
______________

Get_Stream( ) Method :
___________________________

This Method is used to deal with "File Download" functionality & File Preview
Functionality
This Method contains below Method parameters

it_Key_Tab : Will Accept Input Key Field Value(s) From Front-end App(SAP
Ui5/Fiori)

er_Stream : Will Send Output File Type & Output File Content to
Front-end App(SAP Ui5/Fiori )
__________________________________________________________________________________
______________

Execute_Action( ) Method :
___________________________

This Method is used to Insert/Select Data ( But for Simple Database Operations
)
This Method contains below Method Parameters
iv_Action_Name : Will Accept "FunctionName' which is triggered in
Front-end App(SAP Ui5/Fiori )

it_Parameter : Will Accept Input Values(s) from Front-end App(SAP Ui5/Fiori


)

er_Data : Will Send Output Data to Front-end App(SAP Ui5/Fiori )


________________________________________________________________________________

Create_Deep_Entity( ) Method :
________________________________

This Method is used to Insert Multiple Records


This method is used to Insert Header + Item Records simultaneously
This method contains below Method parameter

io_Data_Provider : Will Accept Input Multiple Records from Front-end


App(SAP Ui5/Fiori )
Will Accept Input Header + items Records from Front-end
App(SAP Ui5/Fiori )
__________________________________________________________________________________
_____

Get_Expanded_Entity( ) Method :
____________________________________

This Method is used to Fetch Header + Item Recods Simultaneously


This method below Method parameters

it_key_tab
io_tech_request_Context
io_expand : Will Accept Input From Front-end App(SAP Ui5/Fiori )
er_Entity : Will Send Output to Front-end App(SAP
Ui5/Fiori)
__________________________________________________________________________________
__

You might also like