Giter VIP home page Giter VIP logo

Comments (5)

CarlosOrozco88 avatar CarlosOrozco88 commented on July 21, 2024

Hi!
It is not possible to specify the sap-client, but i will try to implement this as early as i can (i am currently working at typescript branch).

I will post here when the next version is available.

Thanks!

from ui5-tools.

CarlosOrozco88 avatar CarlosOrozco88 commented on July 21, 2024

Hi, can you try this version? In order to install a vsix (cntrl + shift + p)
Deleted, tomorrow i will reupload the vsix file

image

To configure odata client you have to set the extension property odata query like this:
image

Thanks

from ui5-tools.

CarlosOrozco88 avatar CarlosOrozco88 commented on July 21, 2024

By the way, if it is possible, you can do the trick adding metadataUrlParams to the oDataModel:
image

also in manifest file:
image

from ui5-tools.

SuKGunni3 avatar SuKGunni3 commented on July 21, 2024

Hi Carlos,

Thank you for your very quick response and sorry that I could not reply earlier.

I tried your new version and set the settings-parameter to sap-client=200, however the sap-client cookie of every http request is still set to 100.
i probably should have explained my problem a bit more in detail, so here is some more information that might help you understand:

I am developing UI5 apps for a customer with sap backend/webserver systems. There are 3 separate instances of their whole system architecture: one for development (D), one for customer testing/integration (Q) and one "productive" (P) for their actual business.
While Q and P only have one relevant SAP-Client (100), the D systems have a 2nd client 200 to separate development/customizing and master / movement data for initial tests during development.
Therefore, for my UI5 app, while I am in development i need to connect to client 200 in order to perform some tests. As soon as the deployment into Q and finally P happens, this changes to client 100. "Hardcoding" it into the manifest or the OData model is not the correct approach.
What client the OData service should connect to usually is controlled by the Fiori Launchpad, where you can change the client on the login screen or preset by adding some URL parameters like "sap-client". All apps within the Launchpad inherit the client from the Launchpad.

I am not sure how this could/should be solved within your ui5-tools server. My suggestion with the URL parameter probably was not the right approach. A better was might be to change the cookies in the http request of maybe you have an idea how it could be set for your Launchpad integration and inherited by every app within so it actually works as it does in the real thing.

I hope my explanation was helpful to you. Thank you again for your great extension and quick assistance.

from ui5-tools.

CarlosOrozco88 avatar CarlosOrozco88 commented on July 21, 2024

Hi, i think de main problem is that i only change the odataProxy while resourcesProxy is also targeting the gateway, so i changed the name of the new property to gatewayQuery.
The first request will always be with the current cookie stored in the browser, but now internally the extension is hardcoding the query in the request to the server. The response should set the new cookie with the new client, so the next calls will use this cookie (also the url of the request will replace de query parameters configured in gatewayQuery).
Kapture 2021-10-20 at 12 18 11

The gif is made with this version:
ui5-tools-1.1.2.vsix.zip

Also i think you can change the url of the localhost app adding ?sap-client=100 (in the current version of ui5-tools). It should do the job...

from ui5-tools.

Related Issues (13)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.