{"id":16163394,"url":"https://github.com/gregorwolf/epmbp-consumer-app","last_synced_at":"2025-03-18T22:31:20.250Z","repository":{"id":42122153,"uuid":"239695048","full_name":"gregorwolf/epmbp-consumer-app","owner":"gregorwolf","description":"EPM Business Partner - Consumer App","archived":false,"fork":false,"pushed_at":"2024-01-22T08:50:17.000Z","size":1855,"stargazers_count":25,"open_issues_count":6,"forks_count":8,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-17T00:34:01.276Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gregorwolf.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-02-11T06:45:37.000Z","updated_at":"2024-09-07T05:16:48.000Z","dependencies_parsed_at":"2022-08-12T07:11:03.783Z","dependency_job_id":"738ce4eb-4253-493c-8a51-5ae4420db571","html_url":"https://github.com/gregorwolf/epmbp-consumer-app","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gregorwolf%2Fepmbp-consumer-app","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gregorwolf%2Fepmbp-consumer-app/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gregorwolf%2Fepmbp-consumer-app/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gregorwolf%2Fepmbp-consumer-app/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gregorwolf","download_url":"https://codeload.github.com/gregorwolf/epmbp-consumer-app/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244318628,"owners_count":20433945,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-10T02:35:27.637Z","updated_at":"2025-03-18T22:31:19.706Z","avatar_url":"https://github.com/gregorwolf.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# EPM Business Partner - Consumer App\n\nThis example application demonstrates how to use an OData Service available on the [SAP Gateway Demo Server - ES5](https://developers.sap.com/tutorials/gateway-demo-signup.html) with the SAP Cloud SDK for NodeJS and the SAP Cloud Application Programming Model.\n\nYou can also run this app against your on premise [ABAP Developer Edition](https://blogs.sap.com/2019/07/01/as-abap-752-sp04-developer-edition-to-download/) using the SAP Cloud Connector to establish the connection. Here you can then configure end-to-end authentication with principal propagation. In that case the service in the ABAP Backend is called not with a technical user, but with the user that was authenticated in the SAP Cloud Platform.\n\nThis example wouldn't work without the help of [Dennis Hempfing](https://github.com/mr-flannery) who steped in to help in this questions:\n\n- [First letter of entity attributes converted to lowercase by @sap/cloud-sdk-generator](https://answers.sap.com/questions/12973825/first-letter-of-entity-attributes-converted-to-low.html)\n- [Using destination from package.json / default-env.json in implementation](https://answers.sap.com/questions/12973947/using-destination-from-packagejson-default-envjson.html)\n- [Unable to build destination for service binding: Unable to find a service binding for given name](https://answers.sap.com/questions/12982450/unable-to-create-sap-connectivity-authentication-h.html)\n\n## Run local\n\nTo run against the local mock service [epmbp-mock-service](https://github.com/gregorwolf/epmbp-mock-service) you have to create a file named _default-env.json_ with the following content:\n\n```json\n{\n  \"VCAP_SERVICES\": {},\n  \"destinations\": [\n    {\n      \"name\": \"ES5\",\n      \"url\": \"http://localhost:3000/sap/opu/odata/sap/EPM_REF_APPS_PROD_MAN_SRV\"\n    }\n  ]\n}\n```\n\nIf you want to da a local test against the ES5 system / S/4HANA Cloud Sandbox then use this content for the _default-env.json_\n\n```json\n{\n  \"VCAP_SERVICES\": {},\n  \"destinations\": [\n    {\n      \"name\": \"ES5\",\n      \"url\": \"https://sapes5.sapdevcenter.com/sap/opu/odata/sap/EPM_REF_APPS_PROD_MAN_SRV\",\n      \"username\": \"\u003cYour ES5 Username\u003e\",\n      \"password\": \"\u003cYour ES5 Password\u003e\"\n    },\n    {\n      \"name\": \"APIBusinessHub\",\n      \"url\": \"https://sandbox.api.sap.com/s4hanacloud\",\n      \"headers\": {\n        \"APIKey\": \"Your API Key\"\n      }\n    }\n  ]\n}\n```\n\nThen execute:\n\n`npm run setup`\n\nFollowed by:\n\n`npm start`\n\n## Deploy to SAP Cloud Platform - Cloud Foundry\n\n### Prerequisite\n\n- You have a [SAP Cloud Platform Trial account](https://hanatrial.ondemand.com/)\n- The [Cloud MTA Build Tool (MBT)](https://sap.github.io/cloud-mta-build-tool/) is installed\n- The [Cloud Foundry commandline tool](https://docs.cloudfoundry.org/cf-cli/install-go-cli.html) is installed\n- The [MultiApps CF CLI Plugin](https://github.com/cloudfoundry-incubator/multiapps-cli-plugin) is installed\n- You've connected using `cf login`to your trial account\n- Three destinations either to the ES5 or your local ABAP system\n\nOptional\n\n- You've connected a SAP Cloud Connector to your subaccount\n- Principal Propagation is setup in the Cloud Connector to the ABAP Backend\n\n### Preperation for a Connection to ES5\n\nDestination ES5 used by the approuter, CAP and SAP Cloud SDK:\n\n```properties\nDescription=SAP Gateway Demo System\nType=HTTP\nAuthentication=BasicAuthentication\nWebIDEUsage=odata_abap,ui5_execute_abap,dev_abap,bsp_execute_abap\nName=ES5\nWebIDEEnabled=true\nURL=https\\://sapes5.sapdevcenter.com\nProxyType=Internet\nUser=\u003cYour ES5 Username\u003e\nWebIDESystem=ES5\n```\n\n### Preperation for on premise connection with principal propagation\n\nDestination ES5 used by the approuter, CAP and SAP Cloud SDK:\n\n```properties\nURL=http\\://\u003cVirtual Hostname of your ABAP Backend\u003e\\:\u003cVirtual Port of your ABAP Backend\u003e\nName=ES5\nProxyType=OnPremise\nType=HTTP\nsap-client=001\nAuthentication=PrincipalPropagation\n```\n\n### Build\n\n`npm run build:cf`\n\n### Deploy\n\n`npm run deploy:cf`\n\n## Deploy to SAP HANA XSA on Premise\n\nIt's possible to deploy this application also to an on Premise instance of SAP HANA.\n\n### Preperation\n\nThe connection information to the ES5 system is provided via a user-provided service. Such a services needs a configuration file. The actual content can't be used in the destination. Please create _default-es5destination.json_ in the root folder of the project and fill it with:\n\n```JSON\n{\n  \"name\": \"ES5\",\n  \"url\": \"https://sapes5.sapdevcenter.com\"\n}\n```\n\nThe credentials for the backend access should never appear in a Git repository. That is why I suggest to use a MTA extension. Please create the file _xsa.mtaext_ in the root folder with the following content. Replace YourES5user and YourES5password with your own credentials.\n\n```YAML\n_schema-version: '3.1'\nID: epmbp-consumer-app.extension\nextends: epmbp-consumer-app\n\nresources:\n  - name: es5destination\n    properties:\n      name: ES5\n      username: YourES5user\n      password: YourES5password\n```\n\n### Build\n\n`npm run build:xsa`\n\n### Deploy\n\n`npm run deploy:xsa:user`\n\n### Test\n\nStart the Application: epmbp-consumer-app-app via the created Application Route from the SAP HANA XS Advanced Cockpit. You should be able to open the Link _/catalog/SEPMRA_I_Product_E - Public Service from ES5_ and see a list of Products returned as JSON.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgregorwolf%2Fepmbp-consumer-app","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgregorwolf%2Fepmbp-consumer-app","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgregorwolf%2Fepmbp-consumer-app/lists"}