cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Excel Upload in Fiori Elements List Report Using Guided Development (Custom Action)

Arijit_Dhar
Discoverer
1,235

Hi, So recently i was trying to play around with the feature capabilities of SAP Fiori Tools in BAS (Guided Development). 
My goal was to  add a custom button on the table toolbar of a Fiori Elements List Report App, which pops up a dialog box containing a file uploader control and two buttons of 'ok' and 'cancel'.To achieve it i followed the following steps : - 

1. Created a custom action button named 'Upload Excel' using guided development.

Arijit_Dhar_1-1719491579306.png

Arijit_Dhar_2-1719491659212.png

2. Created an xml fragment file with a simple dialog and a fileuploader and invoked it from the extended controller.

Arijit_Dhar_3-1719491879833.pngArijit_Dhar_4-1719491918660.png

And this is how it looks when we click on the 'Upload Excel' Button.

Arijit_Dhar_5-1719491971010.png

Now the problem is that my neither my endbutton(cancel) or begin button (upload) is working.
For example in this case, if I click on cancel, it should trigger the '

onDialogCancelPress' method and close the popup, right? But no boom, no response! , my method is not even getting triggered.
I think there is a problem with the controller reference, how do I use the correct context and get my method triggered?
Please help.

 

 

Accepted Solutions (0)

Answers (2)

Answers (2)

Marian_Zeis
Active Contributor
dvedekar
Discoverer
0 Kudos
Thanks for the documentation, but we are using odata V2 with RAP and now i am getting upload pop up it is working fine for me now
Marian_Zeis
Active Contributor
0 Kudos
@dvedekar it is possible for every OData Version, UI5 Version and all the platforms (ECC, S/4, BTP) https://docs.spreadsheet-importer.com/pages/GettingStarted/#starting-with-fiori-elements-odata-v2
ArunJacob
Active Participant
0 Kudos

Hi,

From Console to check if any "event handler not found" messages appear when you click 'Begin' or 'Cancel'
In the extended controller, hope mapping is correctly in place:-

async onOpenDialog() {
			this.oDialog ??= await this.loadFragment({
				name: "ui5.walkthrough.view.HelloDialog"
			});

			this.oDialog.open();
		},

		onCloseDialog() {
			// note: We don't need to chain to the pDialog promise, since this event-handler
			// is only called from within the loaded dialog itself.
			this.byId("helloDialog").close();
		}

Please refer: Walkthrough - Step 17 - Fragment Callbacks - Samples - Demo Kit - SAPUI5 SDK