cancel
Showing results for 
Search instead for 
Did you mean: 

CRUD operations with BOPF->OData gateway service->SAP UI5

0 Kudos

Hi experts,

I "just landed" into these SAP topics... I am trying to build a CRUD application by building, as first, a BOPF service, then, to redefine it as a Data model in the project that I created into SEGW, and finally, to consume that service into a Sapui5 application into our local sapwebide.

For that, I just created a Root node into a BOPF with all its "data model" (just a simple one, containing only a couple of fields like: "Plant", "Plant Active y/n").

I have added 2 Queries "SELECT ALL" & "SELECT_BY_ELEMENTS".

After the activation of the BOPF, everything seems to work fine here, when I press the Test key, I get the CRUD operations here, and they seem to work 🙂

Second step for me, is to create the Data service by SEGW transaction.

For that, I created a project, and Redefined that BOPF... I see that all the structure of the BOBP is sent here, so, I implemented "myzclass_dpc_ext" GET_ENTITYSET, with a simply SELECT at my "Data model" table... Also seems to work fine until here, I can get a list of Plants that are in the table, and I also have the chance to filter them 🙂

Last step was to create an easy SAPUI5 APP through the webide "app wizard".

I can see the result of the "GET_ENTITYSET" execution also here, even when I filter by some plant, I can get the result, but, as a final step, it would be nice to be able to manage Data Model table entries (creating, updating, deleting) from this application.

I see as the only operation that I can perform is "READ", so I miss CREATE/DELETE/UPDATE.

I´m working with SAPNW 7.4, so I guess I can not use any CDS functionality... I see there are other methods like "UPDATE_ENTITY", "DELETE_ENTITY" or "CREATE_ENTITY", but, how can they work?

In my SAPUI5 APP, I have disabled the "Delete" button, and when press the "Add" button, I can not see any form to enter new values for my entity...

Any of you have an idea of how can I get these other operations? Or is there a documentation where I can follow how to build that?

Thank you in advance!

Carles

View Entire Topic
iftah_peretz
Active Contributor
0 Kudos

Hi,

Please take a look here, here and here.