Skip to Content
0
Aug 07, 2023 at 05:10 PM

getBinding returns oContext unDefined

100 Views Last edit Aug 07, 2023 at 05:13 PM 2 rev

Hi Experts,

Trying to enable a Excel Download button for List Report. New button is to download Header and List report details in to One Sheet.

Works fine with ECC 7.5 Fiori, Same lines does NOT work in S/4 2020 - UI5 1.84.7.

Below lines works good in ECC 7.5 Fiori - oRowBinding gets defined and oContext - Defined as Constructor

Same does not work in S/4 -- oRowBinding gets defined and oContext - UnDefined

excelDownload: function () {
	var aCols, oRowBinding, oSettings, oSheet, oTable;
 	if (!this._oTable) {
		this._oTable = this.byId(
		'com.deere.tms.var.zabc_ui5_var::sap.suite.ui.generic.template.ObjectPage.view.Details::VarHeaderSet--Facet2::Table'
		);
		}
						
	oTable = this._oTable;
	oRowBinding = oTable.getBinding('noData');
	var oModel = oRowBinding.oContext.getModel();   // OContext -- Undefined in S/4 2020 & UI5 1.84.7

With S/4 not clear what is changed ? Hopefully I've provided enough context so you can answer.

Thank You for your time.