Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 8581

SAP Web IDE CRUD App - Update Entity / Submit changes Problem

$
0
0

Hello Experts,

 

I am developing a CRM application and this time i decided to go with the SAP Web IDE Crud template.

I have trouble with update operations. I will try to explain the situation as much as I can.

 

 

 

My oData service consists of a main entity "Order" and couple of association entities. "Partner", "Text" etc.

 

1.PNG

 

The main entity "Order" :

 

3.PNG

 

Example of an associated entity "Partner" :

 

4.PNG

 

This is the association between Order and Partner

 

11.PNG

 

Sample data from my backend service:

 

5.PNG

 

I can read my associated entities like that:

 

6.PNG

 

 

 

Here is my fiori application. I am using SAP Web IDE CRUD App template.

 

7.PNG

 

Here is my edit page, you can see the bindings of related entities:

 

13.PNG

8.PNG

 

 

My problem is with the update part.

 

When user wants to update an order it means there will be update on following entities:

Order

Partner

 

 

I did not make any changes on save function, it works alright if i only want to save the main entity Order

 

12.PNG

 

Here is the batch request when model.submitChanges() is triggered when saving the changes.

9.PNG

 

The problem is:

 

When changes are submitted to backend system, I can not read the related association from Partner Entity.

I am expecting to read "header_guid" field from association which will lead me to my main entity "Order", however changes are submitted to backend system as seperate entities.

 

When i send this get request to backend system, i can clearly get specified partner.

 

OrderSet(guid'5EF3FCDF-B94F-1ED6-83A7-7C7D819DD875')/PartnerSet('ZS000021')


However when changes are submitted i am able to read PartnerSet('ZS000021') as a seperate entity,


not related to OrderSet(guid'5EF3FCDF-B94F-1ED6-83A7-7C7D819DD875').



The backend request for update PartnerSet has only its own key 'ZS000021', no associated key from OrderSet sadly..


10.PNG



I am expecting to read the key from Order association to Partner. Any ideas how to achieve this on the current SAP Web IDE CRUD APP template ?

 

Looking forward to find a solution, otherwise It will be frustrating to remake the application with my own way from scratch.

 

 

Regards,

 

Ugur.


Viewing all articles
Browse latest Browse all 8581

Trending Articles