on 2016 Apr 29 1:46 PM
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.
The main entity "Order" :
Example of an associated entity "Partner" :
This is the association between Order and Partner
Sample data from my backend service:
I can read my associated entities like that:
Here is my fiori application. I am using SAP Web IDE CRUD App template.
Here is my edit page, you can see the bindings of related entities:
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
Here is the batch request when model.submitChanges() is triggered when saving the changes.
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..
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.
Request clarification before answering.
Hi Ugur,
Is it possible you share your application?
Not sure I understand what is the scenario.
Do you change the association from order to partner when submitting the change?
What is the state of the record after pressing the save button. could you please share the ui for the updated record?
Best regards,
Limor
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Limor,
I have added 2 videos, tried to make it more understandable.
If I just make a change on my main entity "OrderSet" everything is fine, however when I change more fields which include an associated entity my problem occurs.
When I change OrderSet('xxxx')/PartnerSet('yyyy')/field I expect to see the xxxx key at update_partnerset_entity since they are related. However the change request I receive is like a seperate entity PartnerSet('yyyy')/field
Regards,
Ugur.
Hi Ugur,
The CRUD template does not support associations. Did you edit the generated application. If so could you please send your application : [email removed by Moderator]
The model is bound to the edit view. I suspect there is an issue with either the binding of the model to the view or there is a bug in UI5 submitChanges function which does not update the associations correctly. To confirm that and to handle this issue to the appropriate team I need to view the application
Best regards,
Limor
Message was edited by: Michael Appleby
User | Count |
---|---|
56 | |
10 | |
8 | |
8 | |
6 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.