cancel
Showing results for 
Search instead for 
Did you mean: 

How many gateway services used in real project scenario for 1 application?

Former Member
0 Kudos

Hi all,

Lets say i have ui5 app which involves transaction business process so is it necessary to have one gateway service for one sapui5 application.

My assumption:There may be n no of service depending on the application built like one service can be to get the f4 help of the input field other to get the text details used in the screen and another to handle the business process.

Please help me understand.

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Thanks, Let's say I have an app for sales order in one screen there two buttons each button has to do different functionality relevant to order.In back end each button has to call different respective rfc function module. In this case can I send one flag as input to service from Ui indicating which functionality it is and the in backend service based on flag call the respective function module in generated mpc class update method.is my understanding correct or is there any other way.I have 10 different functionality of different module does it mean it is good to create 10service and generate 10 dpc and mpc classes

ChandraMahajan
Active Contributor
0 Kudos

You need to understand first the different operations done on OData service's entity such as CRUDQ. For more information, refer my blog

for sales order scenario, it will have different functionality such as create sales order,  read sales order, update sales order, delete sales order etc which can be performed into relevant entity methods of Z*DPC generated class. you need not to pass any flag from UI but just need to call proper CRUD method of OData model. Refer OData Write Support - SAPUI5 Developer Guide - SAP Library

Also check this blog which explains the association between different entities.

In summary. all relevant entities can be part of single OData service and then you need to write logic in respective entity, entityset methods as per CRUDQ scenario.

Regards,

Chandra

0 Kudos

Hi Chandrashekhar,

How can we handle cases where one project has more than one service with File Uploads.

As we know there is only one MPC_EXT class for each project in which in the Define Method we have to give the entity name with the Field which contains the File Type.

Is there any way we can provide more than one entities which their respective field names for File Types.

In my case i have two services and both of them has File Uploads how can i handle this under one project or do i have to create different projects for each services.

Thanks in advance,

Samir

EkanshCapgemini
Active Contributor
0 Kudos

Hello Deepan,

Yes, you can have multiple gateway service for multiple components(as Chandrashekhar said). Even this is the right approach instead of creating only one service in the gateway.

Once I have seen that in one project they were using only one gateway service for the whole application of around 40 screens. The problem in that case was that the service was also having around 30+ entities and it was so cumbersome to maintain that service. Every time you need to do even a minor change, it was taking around 10+ minutes to regenerate the runtime artifacts. Also the code in Deep_Entityset method also gets complicated.

So I would suggest you to create the multiple services and reuse them in the application to the possible extent but do not complicate the single service.

Regards,

Ekansh

ChandraMahajan
Active Contributor
0 Kudos

Hi,

in real project scenario, developers may/will develop sapui5 components and then these components can be integrated into single application (like fiori launchpad). Now for each component, you could have separate OData service which will fulfill the requirement of that particular sapui5 component.

again within sapui5 component, there could be separate services for e.g to get F4 help etc(you already mentioned)

Regards,

Chandra