Results 1 to 3 of 3

Thread: Sencha Touch 2 app with SAP Gateway

  1. #1
    Sencha User
    Join Date
    Oct 2012
    Kortrijk, Belgium
    Vote Rating

    Default Sencha Touch 2 app with SAP Gateway


    I've been working on a sencha app where I retrieve data using a SAP Gateway service. I used this tutorial:

    However, in this tutorial they only collect data, so the GET method. I also want to push data, so use the POST method.

    Is there anyone who has got some experience with that? I noticed sencha released a SAP oData connector, but I can't find any tutorials, etc. about that.


  2. #2
    Sencha User bricemason's Avatar
    Join Date
    Jan 2008
    Upstate NY
    Vote Rating


    The SAP oData connector download is here:

    The Flights Unlimited demo app in the download looks to be an excellent resource to learn from.

    Brice Mason
    Front End Developer
    Modus Create


    Sencha Touch Screencasts
    Vimeo - Sencha Touch Channel

    Github Projects:
    Sencha Cordova Builder enables the automatic creation, building, and running of PhoneGap (Cordova) projects with Sencha Touch.

    Am I Sencha Touch Ready? checks your system to determine what you need to do to start Sencha Touch development. If you're having trouble getting up and running, try this out.

    Sencha Tools Bridge allows Sencha SDK Tools to co-exist with Sencha Cmd on the same system.

  3. #3
    Ext Premium User
    Join Date
    Mar 2007
    Vote Rating



    The SAP OData connector works fine for Read operations, but currently only supports modifying operations (Create, Update, Delete) against a SAP Gateway service in SP02 compatibility mode. These have /sap/opu/sdata as part of their URL.

    Here is an example of a create operation against the CRM Activity service on the SAP Gateway demo system:

    Ext.define('ODataTest.model.Activity', {
        extend: '',
        requires: [''],
        config: {
            fields: [
                { name: 'Description', type: 'string' },
                { name: 'Owner', type: 'string' },
                { name: 'ActivityLocation', type: 'string' },
                { name: 'CategoryDescription', type: 'string' },
                { name: 'PriorityDescription', type: 'string' },
                { name: 'ContactPerson', type: 'string' },
                { name: 'ActivityPartner', type: 'string' },
                  name: 'SchemeID', 
                  type: 'string',
                  defaultValue: 'IWCNT~OM_CRMACTIVITY' 
                  name: 'ProcessType', 
                  type: 'string', 
                  defaultValue: 'ZKF5' 
                  name: 'Value',
                  type: 'string' 
            proxy: {
                type: 'odata',
                url: "HTTP://GW.ESWORKPLACE.SAP.COM:80/sap/opu/sdata/iwcnt/activity/ActivityCollection",
                withCredentials: true,
                useHeaderAuthentication: true,  // this enforces authentication, otherwise we get an empty collection.
                username: 'GW@ESW',
                password: 'ESW4GW'
    var activity = Ext.create('ODataTest.model.Activity', {
      Description: 'Plan sales meeting',
      Owner: '12701'  // this is the userid belonging to username GW@ESW
     (record) {
      console.log('Record saved');
    It requires some trial and error to find out which fields to send in the Create (=POST) operation. Check out the error messsages coming back from Gateway, they sometimes contain useful hints.

    Check out the following video for a demo of the OData connector:

    I hope this helps. Let me know if you need further help.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts