on 08-24-2020 11:19 PM
Hello Experts,
Any idea how to fill the navigations HeaderToItemAA and HeaderToItemFI from SAP.m.Table(view data) as payload Odata Model
Thank
Hi Bikash,
from your question, i understand that you want to do two expand call in one time.
try this,
var aExpands = ['HeaderToItemAA','HeaderToItemFI']
and this in _bindViewNav:
this.getView().bindElement({
path: sObjectPath,
parallelExpand : aExpands.join(",");}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Bikash,
Here's a sample if you're doing it in freestyle UI5 (my assumption):
_bindView: function (sObjectPath) {
this.getView().bindElement({
path: sObjectPath,
parameters: {
expand: "HeaderToItemAA,HeaderToItemFI"
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Jhodel,
Here is my code.I am trying to save all data header and items in one call. In header I am receiving the data but not in items. That is why I am trying push data to navigation HeaderToItemAA and HeaderToItemFI from UI5 level. I am using HEADER_UPDATE_ENTITY here.And the import structure is deep one.
handleSavePress: function(oEvent) {
var oDataModel = this.getView().getModel();
var vPath = this.getView().getBindingContext().getPath();
var vBukrs = this.getView().getModel().getProperty(vPath).Bukrs;
var sObjectPath = this.getModel().createKey("CompCodeHeaderSet", { Bukrs : vBukrs });
this._bindViewNav("/" + sObjectPath);
var payload = this.getView().getModel().getProperty(vPath);
oDataModel.update("/CompCodeHeaderSet('"+vBukrs+"')", payload,{
success: function(oResponse){ Toast.show("Success"); },
error: function(oResponse){ debugger; Toast.show("Error"); } });
_bindViewNav: function (sObjectPath) {
this.getView().bindElement({
path: sObjectPath, parameters: {
expand: "HeaderToItemAA" } }); },
Thanks
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.