How do I add SAP Gateway services to an existing SAP WEB IDE Project?

216 views Asked by At

I've imported a SAP WEB IDE project from SAP Build....

All looks great, but now I need to add in my Gateway services to handle oData etc.

I've setup my SAP Cloud Connector to and Destinations.

How specifically do I add these as all tutorials seems to start by including the service as part of a template.

2

There are 2 answers

0
Thomas L. On BEST ANSWER

You have to do some steps to make this work:

  1. implement the service definition in your manifest.json file:

    "sap.app": {
     [...],
     "dataSources": {
        "mainService": {
            "uri": "/your/path/to/service",
            "type": "OData",
            "settings": {
                "odataVersion": "2.0",
                "localUri": "localService/metadata.xml"
            }
        }
    },
    [...]
    

    },

  2. implement the model definition in your manifest.json file:

    "models": {
        [...],
        "": {
            "dataSource": "mainService",
            "settings": {
                "metadataUrlParams": {
                    "sap-documentation": "heading"
                },
                "defaultBindingMode": "TwoWay"
            }
        }
    },
    
0
Adam Harkus On

You can go to the New>oData service menu from the project and create it that way too.