Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement link to ODXL export of participant details as xlsx #1

Closed
gregorwolf opened this issue Jul 31, 2016 · 17 comments
Closed

Implement link to ODXL export of participant details as xlsx #1

gregorwolf opened this issue Jul 31, 2016 · 17 comments

Comments

@gregorwolf
Copy link
Contributor

The event details should contain a link to export the list of participants with all details als xlsx (Excel) using ODXL.

@gmahi
Copy link
Contributor

gmahi commented Aug 4, 2016

Hallo Gregor, I have added 3rd IconTabFilter to list the registered participants. While I am trying Implement link to ODXL export, I have encountered the following problem while trying to activate ODXL Sample Application. CA_USER_TABLE_COLUMNS_001.calculationview on HCP Trial HANA MDC as "_SYS_BI"."BIMC_DIMENSION_VIEW" does not exist.

if you like I will implement CSV export as in the following example application from https://sapui5.hana.ondemand.com/explored.html#/sample/sap.m.sample.TableExport/code
from the explored.

@gregorwolf
Copy link
Contributor Author

Hi Gmahi, thank you for taking this up. I've added you to the repositories. Please commit your addition for the 3rd Tab showing the list of participants as soon as possible.

Regarding the issue with the ODXL application: That is a known issue with HANA MDC on HCP Trial which I've already field. But you should be able to use the export anyway. Only the sample app will not work.

Please don't invest time into CSV. I hate it as it will cause all kind of problems when importing into Excel.

@gmahi
Copy link
Contributor

gmahi commented Aug 4, 2016

Hi Gregor,
Thank you for your reply. I am trying to push from SAP Web IDE. But I am
getting the following Error.

Push request failed__https://github.com/sapmentors/SITregOrganizer.git
https://github.com/sapmentors/SITregOrganizer.git: not authorized.

With best Regards,
Mahendra

On Thu, Aug 4, 2016 at 10:25 AM, Gregor Wolf [email protected]
wrote:

Hi Gmahi, thank you for taking this up. I've added you to the
repositories. Please commit your addition for the 3rd Tab showing the list
of participants as soon as possible.

Regarding the issue with the ODXL application: That is a known issue with
HANA MDC on HCP Trial just-bi/odxl#23 which
I've already field. But you should be able to use the export anyway. Only
the sample app will not work.

Please don't invest time into CSV. I hate it as it will cause all kind of
problems when importing into Excel.


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#1 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AER7t-clUWDGxcTjV41Oei1vEn04QEGjks5qcaHygaJpZM4JZGnA
.

Mit freundlichen Grüssen


Mahendra Gulla

+49 1627327599

@gregorwolf
Copy link
Contributor Author

Hi Gmahi,

have you accepted the GitHub invites I've sent?

CU
Gregor

2016-08-04 19:32 GMT+02:00 gmahi [email protected]:

Hi Gregor,
Thank you for your reply. I am trying to push from SAP Web IDE. But I am
getting the following Error.

Push request failed__https://github.com/sapmentors/SITregOrganizer.git
https://github.com/sapmentors/SITregOrganizer.git: not authorized.

With best Regards,
Mahendra

On Thu, Aug 4, 2016 at 10:25 AM, Gregor Wolf [email protected]
wrote:

Hi Gmahi, thank you for taking this up. I've added you to the
repositories. Please commit your addition for the 3rd Tab showing the
list
of participants as soon as possible.

Regarding the issue with the ODXL application: That is a known issue with
HANA MDC on HCP Trial just-bi/odxl#23 which
I've already field. But you should be able to use the export anyway. Only
the sample app will not work.

Please don't invest time into CSV. I hate it as it will cause all kind of
problems when importing into Excel.


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#1 (comment)
237486724>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AER7t-
clUWDGxcTjV41Oei1vEn04QEGjks5qcaHygaJpZM4JZGnA>
.

Mit freundlichen Grüssen


Mahendra Gulla

+49 1627327599


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#1 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AChGr1agmZl36E1io63U9YKiBJ7pQSgTks5qciIRgaJpZM4JZGnA
.

@gmahi
Copy link
Contributor

gmahi commented Aug 4, 2016

Hi Gregor,
Thank you for your reply. it worked after removing the Cache.
With best regards,
Mahendra

@gmahi
Copy link
Contributor

gmahi commented Aug 29, 2016

Hallo Gregor, I have added 3rd IconTabFilter to list the registered participants. While I am trying Implement link to ODXL export, I have encountered the following problem while trying to activate ODXL Sample Application. CA_USER_TABLE_COLUMNS_001.calculationview on HCP Trial HANA MDC as "_SYS_BI"."BIMC_DIMENSION_VIEW" does not exist.

if you like I will implement CSV export as in the following example application from https://sapui5.hana.ondemand.com/explored.html#/sample/sap.m.sample.TableExport/code
from the explored.

@gmahi
Copy link
Contributor

gmahi commented Aug 29, 2016

Hallo All,
I am trying implement link to ODXL export of participant details. I am getting the following error.
Error: parseGetRequest(no args): Invalid querypath com/sap/sapmentors/sitreg/odataorganizer/service.xsodata/Events(1)&$format=xlsx&download=Participants.xlsx does not match schema/table pattern.

Could you please let me know, where I am going wrong .
With best regards
Mahendra

onDataExport: function(oEvent) {
            var odxlServiceEndpoint = "/destinations/HANAMDC/com/sap/sapmentors/sitreg/odxl/service/odxl.xsjs";
            var oModel = this.getView().getModel(); //odata is the model, which is binding to the table
            var oTable = this.byId("idPartipicantsTable");
            var oContext = oTable.getBindingContext();
            var sPath = oContext.getPath();
            // var sServiceUrl = oModel.sServiceUrl;
            var sServiceUrl = '/com/sap/sapmentors/sitreg/odataorganizer/service.xsodata';
            var odataQuery = sServiceUrl + sPath;
            console.log(odataQuery);
            var sUrl = odxlServiceEndpoint + odataQuery ;
            var extension = "xlsx";
            var fileName = 'Participants'+"." +extension;
        var url = sUrl + "&$format=" + extension + "&download=" + fileName;
            // downloadSheetLink.download = fileName;
            var encodeUrl = encodeURI(url);
            sap.m.URLHelper.redirect(encodeUrl, true);
            console.log(encodeUrl);
        },

@gregorwolf
Copy link
Contributor Author

Hi Mahendra,

you have to provide the View or Table name in the URL instead of the OData Service. In this case please use the View:

com.sap.sapmentors.sitreg.odataorganizer.procedures::ParticipantsRead

and for the export you have to filter by the EventID.

Best regards
Gregor

@gmahi
Copy link
Contributor

gmahi commented Aug 30, 2016

Hi Gregor,
Thank you very much for your help. Unfortunately still I am missing something. I have tried
serviceUrl = /com.sap.sapmentors.sitreg.odataorganizer.procedures::ParticipantsRead also
com/sap/sapmentors/sitreg/odataorganizer/procedures/ParticipantsRead. I am getting the same error.
if you have any examples will be very helpful.
Sorry for taking your time.
Best regards,
Mahendra
```
onDataExport: function(oEvent) {
var odxlServiceEndpoint = "/destinations/HANAMDC/com/sap/sapmentors/sitreg/odxl/service/odxl.xsjs";
var oModel = this.getView().getModel(); //odata is the model, which is binding to the table
var oTable = this.byId("idPartipicantsTable");
var oContext = oTable.getBindingContext();
var sPath = oContext.getPath();
var sServiceUrl = 'com.sap.sapmentors.sitreg.odataorganizer.procedures::ParticipantsRead';
var filter = '?$filter=EventID eq' + 1;
var odataQuery = sServiceUrl + filter;
// console.log(odataQuery);
var sUrl = odxlServiceEndpoint + odataQuery;
var extension = "xlsx";
var fileName = 'Participants' + "." + extension;
var downloadSheetLink = this.byId('exportXslx');
var sHref = sUrl + "&$format=" + extension + "&download=" + fileName;
downloadSheetLink.setHref(sHref);
downloadSheetLink.download = fileName;
console.log(sHref);
},

@gregorwolf
Copy link
Contributor Author

Hi Mahendra,

I don't want to distribute odxl in SITreg. So please install odxl in:

system-local/public/rbouman/odxl

then the request for (CSV):

/system-local/public/rbouman/odxl/service/odxl.xsjs/%22SITREG%22/%22com.sap.sapmentors.sitreg.odataorganizer.procedures::ParticipantsRead%22?$filter=%22EventID%22 eq 1&$format=csv&download=com.sap.sapmentors.sitreg.odataorganizer.procedures::ParticipantsRead.csv

or:

/system-local/public/rbouman/odxl/service/odxl.xsjs/%22SITREG%22/%22com.sap.sapmentors.sitreg.odataorganizer.procedures::ParticipantsRead%22?$filter=%22EventID%22 eq 1&$format=xlsx&download=com.sap.sapmentors.sitreg.odataorganizer.procedures::ParticipantsRead.xlsx

should work.

Best regards
Gregor

@gmahi
Copy link
Contributor

gmahi commented Aug 30, 2016

Hi Gregor,
Thank you very much for your help. I have successfully implemented the feature and committed the same.
With best regards,
Mahendra

@gregorwolf
Copy link
Contributor Author

Hi @SbgMartin,
unfortunately I haven't deployed the ODXL project to our Production instance yet. I've fixed that and now the download works when I start the app from the WebIDE. Please use that as a workaround. @gmahi perhaps you can check why the download isn't working when the the app is deployed as a HTML5 app.
Best regards
Gregor

@gmahi
Copy link
Contributor

gmahi commented Sep 16, 2016

Hi Gregor,
Thank you for your feed back. I will deploy the app into SAP HANA Cloud platform and check the same.
With best regards,
Mahendra

@gmahi
Copy link
Contributor

gmahi commented Sep 21, 2016

Hi Gregor, I have deployed the app into HANA Cloud platform and tested, it is working. Is this you want me check or Should I import this app into HANA MDC and check it.

@gregorwolf
Copy link
Contributor Author

OK, when you have it working with the export also as a deployed HTML5 app on HCP using the destination to do the export that's great. Then I have to check where the problem with the export in production comes from.

@gregorwolf
Copy link
Contributor Author

I've tried it again on production and it works just fine. Thanks @gmahi

@gmahi
Copy link
Contributor

gmahi commented Sep 29, 2016

Hi Gregor,
I am delighted that it is working. Looking forward to meet to you next week
at SIT München.

Thanking you,
With best regards,
Mahendra

On Thu, Sep 29, 2016 at 7:50 PM, Gregor Wolf [email protected]
wrote:

I've tried it again on production and it works just fine. Thanks @gmahi
https://github.com/gmahi


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#1 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AER7t3LSjdMy2no8aOZBVj7CPr77IGNNks5qu_pNgaJpZM4JZGnA
.

Mit freundlichen Grüssen


Mahendra Gulla

+49 1627327599

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants