cancel
Showing results for 
Search instead for 
Did you mean: 

Migrating a NEO Html5 App to SAP BAStudio in Cloud Foundry

ptharso
Participant
0 Kudos

Hi all... i have a problem to solve.... i have only one app html5 in NEO and I tried a lot of options to migrate this simple code but give an error in this URL of the used destination in CF. I think is another link to access the destination in CF ( this is the URL from NEO). Can You help me?

Accepted Solutions (1)

Accepted Solutions (1)

MioYasutake
Active Contributor
0 Kudos

Hi ptharsos,

Have you read this blog?

https://blogs.sap.com/2020/07/08/migrating-fiori-application-from-sap-web-ide-to-sap-business-applic...

In your xs-app.json, the route would look like below.

{
	"source": "^/SF_PROXY",
	"destination": sap_hcmcloud_core_odata,
	"authenticationType": "none",
	"csrfProtection": false
}

And the OData URL would be simply:

"/SF_PROXY"

Regards,

Mio

ptharso
Participant
0 Kudos

@mioyasutake, thanks for your attention... Yes (@Yuval and me) tried by email to resolve this problem but we cannot yet.

I change the files below but a new error appears.... please see the images

MioYasutake
Active Contributor
0 Kudos

Is $metadata loaded successfully?

MioYasutake
Active Contributor
0 Kudos

Hi ptharsos,

Also try this.

{
	"source": "^/SF_PROXY/(.*)$",
        "target": "$1",
	"destination": sap_hcmcloud_core_odata,
	"authenticationType": "none",
	"csrfProtection": false
}

Plus, specify OData service name when creating an OData Model.

new sap.ui.model.odata.v2.ODataModel("/SF_PROXY/<OData service name>", ...)

"/SF_PROXY" will be replaced by the destination and the actual call will be like below.

https://<host>/odata/v2/<OData service name>/...

Regards,

Mio

ptharso
Participant
0 Kudos

@mioyasutake, sorry.... where can i get the <OData service name>?

This is my destination and manifest files.... in code i use the /user data in views. i changed the name of destination.

ptharso
Participant
0 Kudos

Another problem....my destination disappears from the list of ... i cannot to run the modifications

ptharso
Participant
0 Kudos

@mioyasutake, BAS does not have a well-defined way of importing applications developed into the NEO environment. I've been trying for weeks to migrate a single application to BAS and every hour an extra difficulty appears. The BAS environment is not a modern and easy thing. It seems to me much easier to use the NEO environment that apparently presents less problems to the developer. These SAP environments are very complex and greatly decrease development productivity even with all built-in facilities.

Answers (3)

Answers (3)

oliver_hummel
Explorer

Also the official Migration guide can be helpful:

https://help.sap.com/viewer/b98f42a4d2cd40a9a3095e9f0492b465/Cloud/en-US

ptharso
Participant
0 Kudos

Finally i resolved this MIGRATION using this configutarions:

in destination:

in xs-app.json:

in manifest.json:

The code was copied from https://github.com/ptharso/talentsview_bas

Thanks to @mioyasutake and @yuval.morad that help me in some points.

MioYasutake
Active Contributor
0 Kudos

Hi Paulo,

Has your issue resolved?

Otherwise, let me answer some of your questions.

1. where can i get the <OData service name>?

If you can access "user" entity with the following url, then <OData service name> is not required.

https://<hostname>/odata/v2/user

I thought there would be a service name before entity name as below.

https://<hostname>/odata/v2/<service name>/user

2. Route references unkown destination "sfc" error

When you create a run configuration, a file named '.env + number' (such as .env1) is created.

The error may indicate that your .env file is still holding old configuration for "sap_hcmcloud_core_odata".

Try removing the .env file and re-create run configuration.

Regards,

Mio

ptharso
Participant
0 Kudos

Hi Mio, thanks for your attention....nothing resolved yet

First, i can access the https://apisalesdemo8.successfactors.com/odata/v2/User and $metadata normally by browser.

Second, the original NEO code is this https://github.com/ptharso/talentsview and i´m trying to migrate to CF but i cannot yet.

The actual code is this but dont works https://github.com/ptharso/talentsview_bascf .. i changed somethings like names of destination.

I deleted all .env and vscode (a lot) and tried to renew the RUN configuration but dont appears the destination list in the box of SAP services.

I think that is not possible to be so complicated.

Your help is a great thing to me.

MioYasutake
Active Contributor
0 Kudos

Hi Paulo,

I would recommend creating a new project (simple one) in Business Application Studio from scratch.

Just showing a list of users would be enough. You can find instructions below.

https://help.sap.com/viewer/584e0bcbfd4a4aff91c815cefa0bce2d/Cloud/en-US/22f3401b2e464344943f2a6abf0...

When you look at the generated project, you'd see how manifest.json and xs-app.json should be configured.

Regards,

Mio

ptharso
Participant
0 Kudos

@mioyasutake, is not problem of Odata service name because the url in Browsers WORKS. I did a list project with ES5 destination before.

The problem now is that impossible to RUN CONFIGURATIONS because my destination dont appears in the list of "My SAP Systems"

See images below