cancel
Showing results for 
Search instead for 
Did you mean: 

Couldnt able to read SAP DI destination URL from SAP Cloud Application Programming (CAP)

SaiNithesh_Gajula
Active Participant
0 Kudos
757

HI Experts,

I am trying to consume SAP Document Information Extraction Service API's from SAP Cloud Application Programming (CAP) and apply some custom logic at CAP level and pass to UI. 

But here when I am trying to access them, I am facing below error

 

Error during request to remote service: The 'url' property is not set for destination btp_document_info_extract which is mandatory if you use it as an 'HTTP destination

 

Adding details like DI Subscription & instance with service key, destination, CAP Code snippet. let me know if more info is needed. 

package.json file

{
    "name": "incident-management",
    "version": "1.0.0",
    "description": "A simple CAP project.",
    "repository": "<Add your repository here>",
    "license": "UNLICENSED",
    "private": true,
    "dependencies": {
        "@sap-cloud-sdk/connectivity": "^3.15.0",
        "@sap-cloud-sdk/http-client": "^3.15.0",
        "@sap-cloud-sdk/mail-client": "^3.15.0",
        "@sap-cloud-sdk/resilience": "^3.15.0",
        "@sap-cloud-sdk/util": "^3.15.0",
        "@sap/cds": "^7",
        "@sap/cds-hana": "^2",
        "@sap/xssec": "^3",
        "express": "^4",
        "passport": "^0.7.0"
    },
    "devDependencies": {
        "@cap-js/sqlite": "^1",
        "@sap/cds-dk": "^7",
        "@sap/eslint-plugin-cds": "^3",
        "@sap/ux-specification": "^1.120.10",
        "axios": "^1.6.8",
        "chai": "^5.1.1",
        "chai-as-promised": "^7.1.2",
        "chai-subset": "^1.6.0",
        "eslint": "^9",
        "jest": "^29.7.0",
        "rimraf": "^3.0.2"
    },
    "scripts": {
        "start": "cds-serve",
        "test": "jest tests/test.js",
        "watch-incidents": "cds watch --open incidents/webapp/index.html?sap-ui-xx-viewCache=false",
        "undeploy": "cf undeploy incident-management --delete-services --delete-service-keys --delete-service-brokers",
        "build": "rimraf resources mta_archives && mbt build --mtar archive",
        "deploy": "cf deploy mta_archives/archive.mtar --retries 1",
        "watch-businesspartners": "cds watch --open businesspartners/webapp/index.html?sap-ui-xx-viewCache=false"
    },
    "sapux": [
        "app/incidents",
        "app/businesspartners"
    ],
    "cds": {
        "requires": {            
            "btp_document_info_extract": {
                "kind": "rest",
                "credentials": {
                    "destination": "btp_document_info_extract",
                    "forwardAuthToken": false
                }
            },
            "API_BUSINESS_PARTNER": {
                "kind": "odata-v2",
                "model": "srv/external/API_BUSINESS_PARTNER",
                "[production]": {
                    "credentials": {
                        "destination": "cap_demo-bupa",
                        "path": "/sap/opu/odata/sap/API_BUSINESS_PARTNER"
                    }
                }
            }
        }
    }
}

#SAP Document Information Extraction, SAP Cloud Application Programming Model Node.js SAP Business Technology Platform 

 

Regards,

Sai Nithesh

 

 

Accepted Solutions (0)

Answers (1)

Answers (1)

SaiNithesh_Gajula
Active Participant
0 Kudos

@MioYasutake , Thanks for the quick response. Updated the package.json file in the question. please refer.

MioYasutake
Active Contributor
0 Kudos
@SaiNithesh_Gajula The configurations looks OK. In your service, you have also defined API_BUSINESS_PARTNER. Is connection to this service successful?