1. #1
    Sencha User
    Join Date
    Oct 2012
    Kortrijk, Belgium
    Vote Rating
    wuytsr is on a distinguished road


    Default Sencha Touch 2 app with SAP Gateway

    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: http://allthatjs.com/2012/02/19/buil...encha-touch-2/.

    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
    bricemason's Avatar
    Join Date
    Jan 2008
    Upstate NY
    Vote Rating
    bricemason has a spectacular aura about bricemason has a spectacular aura about bricemason has a spectacular aura about



    The SAP oData connector download is here: https://market.sencha.com/users/46/extensions/49

    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
    Luc is on a distinguished road




    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: 'Ext.data.Model',
        requires: ['Ext.data.proxy.OData'],
        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
    activity.save(function (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.

Thread Participants: 2

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi