SAP-samples / s4hana-cloud-ext-timesheet

This web application showcases an extension to an SAP S/4HANA Cloud system. It allows users to read and write their working time in a fast and efficient way.
Apache License 2.0
0 stars 0 forks source link

UI5 Application is not working #2

Open swaroopkumar482 opened 9 months ago

swaroopkumar482 commented 9 months ago

Hi Team, Quick_Time_Entry.pdf

We have been trying to implement extension app - "Quick Time Entry for SAP S/4HANA Cloud Time Recording", getting issues while running it after following the document attached here.

Downloaded the UI5 project and deployed to SAP BTP. While trying to run the app, the API calls getting failed. The API calls found to be called from Utitlity.js file which is empty js file , we got from the downloaded project, is we feel causing the issue, also in the manifest.json, didn't find the backend service for the Odata Model.

Please let us know, if anything is missing during the implementation or anything that we need to customize to resolve the backend issues (API Calls)

Regards, Swaroop.

amritanshukr commented 9 months ago

Hi @swaroopkumar482, The backend call is directly made from Controller : api /rest/timesheet (https://github.com/SAP-samples/s4hana-cloud-ext-timesheet/blob/b7642b7edaef7e6ca4d4181030eaf1b62ba93e4f/timesheet-frontend/webapp/controller/App.controller.js#L405)

If your application is deployed correctly : First api calls are /rest/user & /rest/tasktype

Utitlity.js is not involved.

regards, amritanshu

swaroopkumar482 commented 9 months ago

Hi Amritanshu,

Thanks for your response.

I got to know how the api calls being done in the frontend app, however we are facing a different issue here with the destination path. We couldn't establish a connection with the backend, while doing so, getting the below error. Also please refer the screenshot attached. "Failed to register backend for /SAP , check config in yaml file"

QuickTimesheetEntry_destination_error

We almost followed the manual step by step, somehow, we missed something, therefore facing the issue mentioned. Would be very helpful, if you can provide any help regarding the issue.

Regards, Swaroop.

amritanshukr commented 9 months ago

Hi @swaroopkumar482 ,

Approuter module is responsible for doing routing from UI to Java Backend. You need to deploy and check destinations maintained there direct to java backend url and Destination service is also maintained with java backedend url.

image

https://github.com/SAP-samples/s4hana-cloud-ext-timesheet/blob/b7642b7edaef7e6ca4d4181030eaf1b62ba93e4f/approuter/xs-app.json#L9

image

thanks & regards, amritanshu

swaroopkumar482 commented 9 months ago

Hi Amritanshu,

Thanks for your continuous efforts to share your thoughts.

Somehow, we are still stuck with the issue (API calls fail).

Could you please take some 15 mins of time to connect with us online. It would help us greatly. My Emaild ID : cloudfoundrysap@gmail.com

Regards, Swaroop Kumar Nagavarapu.

amritanshukr commented 9 months ago

Hi @swaroopkumar482,

Since, This extract is tutorial and free samples. As per our terms and conditions I can provide limited support through this channel only.

thanks & regards, amritanshu

swaroopkumar482 commented 9 months ago

Hi Amritanshu

Thank you for your reply, I have replicated exact steps provided in the configuration document. Still after the deployment, application is not working and throwing error "The redirect_uri has an invalid domain".

I guess there must be some app router issue or need to generate key for xsuaa instance. please share if any updated config document available.

Regards. Swaroop