cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

SAP CAP How to test DESTINATION to S4/Hana on premise within BAS PRIOR to deploy?

AxHu
Explorer
0 Kudos
1,714

Hej guys,
I read (felt) every tutorial about that but it seems that I am too dumb to get the final clue, so if someone knows the answer on a level "for dummies" I'd really appreciate...!!

How can I use the approuter or other mechanism to test a CAP App - which should consume a DESTINATION LOCALLY within Business Appplication Studio (BAS) - , WITHOUT deploying the whole thing to BTP PRIOR TO TESTING???

  • Simple CAP App (w/o Fiori elements)
  • Destination in BTP is defined,
  • There is a connection from BAS to DESTINATION, successfully checked with “curl “destination.dest/…path/service…”
  • I need just ONE but WORKING example

    Do I need to programmatically get the JSON Web Token (JWT) then HOW!!??!

    thanks for any answer...
    nearly desperated---- ;-(  -----

View Entire Topic
Dinu
Active Contributor

Please refer to documentation on how to go about it.

Gist is in package.json you will find a snippet similar to the following if you have service named API_BUSINESS_PARTNER using destination S4HANA:

 

    "API_BUSINESS_PARTNER": {
      "kind": "odata",
      "model": "srv/external/API_BUSINESS_PARTNER"
        "credentials": {
          "destination": "S4HANA",
          "path": "/sap/opu/odata/sap/API_BUSINESS_PARTNER"
        }
    }

 

change it to 

 

    "API_BUSINESS_PARTNER": {
      "kind": "odata",
      "model": "srv/external/API_BUSINESS_PARTNER",
      "[production]": {
        "credentials": {
          "destination": "S4HANA",
          "path": "/sap/opu/odata/sap/API_BUSINESS_PARTNER"
        }
      },
      "[development]": {
        "credentials": {
          "url": "http://S4HANA.dest/",
          "path": "/sap/opu/odata/sap/API_BUSINESS_PARTNER"
        }
      },

    }

 

 

AxHu
Explorer
0 Kudos
will try that ...
martinc_mb38
Participant
0 Kudos
How do you specify your user and password credentials in this way? Or is there another way?