Problem in implementing ODATA update using SAP UI5

Hi,
  I am trying to develop an hwc mobile app [hwc] using sapui5 and phonegap. I am trying to perform odata crud operations in the app.
In the netweaver side, currently we have disabled the setting for X-CSRF token so that CUD operations are possible even without CSRF token. I am using datajs library for consumption of the odata services in my app. My read operation is successful and i am able to display the data in my app. But I am facing problems in the update operation.
In order to ensure that serverside is perfect, I used the WFetch tool to perform the update operation and verified that data got updated successfully in SAP backend { i got 204 response from server ]. In the wfetch tool, the headers and body section was like this
x-requested-with: XMLHttpRequest\r\n
\r\n
<?xml version="1.0" encoding="utf-8" standalone="yes"?>\r\n
  <entry xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns="http://www.w3.org/2005/Atom">\r\n
      <content type="application/xml">\r\n
        <m:properties>\r\n
          <d:value>0203_IN120</d:value> \r\n
          <d:scheme_id>Z_BANK_RFC_GANESH</d:scheme_id> \r\n
          <d:scheme_agency_id>LOCAL</d:scheme_agency_id> \r\n
          <d:post_bank /> \r\n
          <d:bank_branch>BANASWADI</d:bank_branch> \r\n
          <d:street>123 MARUTHI SEVA NAGAR.</d:street> \r\n
          <d:city>BANGALORE</d:city> \r\n
          <d:swift_code/>\r\n
          <d:region>KA</d:region> \r\n
          <d:bank_name>HSBC</d:bank_name> \r\n
          <d:pobk_curac /> \r\n
          <d:bank_group /> \r\n
          <d:addr_no /> \r\n
        </m:properties>\r\n
      </content>\r\n
</entry>\r\n
The response i got was like this
WWWConnect::Connect("XXXXX.XXXX.com","8000")\nIP = "10.6.13.146:8000"\nsource port: 50054\r\n
REQUEST: **************\nPUT /sap/opu/sdata/sap/ZBANKRFCGANESH/z_bank_rfc_ganeshCollection(value='0203_IN120',scheme_id='Z_BANK_RFC_GANESH',scheme_agency_id='LOCAL')/?$format=xml HTTP/1.1\r\n
x-requested-with: XMLHttpRequest\r\n
Host: i3lbwvids.itcinfotech.com\r\n
Accept: */*\r\n
Content-Length:884\r\n
Authorization: Basic Z2FuZXNoOmxvZ2luQDEyMzQ=\r\n
\r\n
<?xml version="1.0" encoding="utf-8" standalone="yes"?>\r\n
  <entry xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns="http://www.w3.org/2005/Atom">\r\n
      <content type="application/xml">\r\n
        <m:properties>\r\n
          <d:value>0203_IN120</d:value> \r\n
          <d:scheme_id>Z_BANK_RFC_GANESH</d:scheme_id> \r\n
          <d:scheme_agency_id>LOCAL</d:scheme_agency_id> \r\n
          <d:post_bank /> \r\n
          <d:bank_branch>BANASWADI</d:bank_branch> \r\n
          <d:street>123 MARUTHI SEVA NAGAR.</d:street> \r\n
          <d:city>BANGALORE</d:city> \r\n
          <d:swift_code/>\r\n
          <d:region>KA</d:region> \r\n
          <d:bank_name>HSBC</d:bank_name> \r\n
          <d:pobk_curac /> \r\n
          <d:bank_group /> \r\n
          <d:addr_no /> \r\n
        </m:properties>\r\n
      </content>\r\n
</entry>\r\n
RESPONSE: **************\nHTTP/1.1 204 No Content\r\n
set-cookie: MYSAPSSO2=AjQxMDMBABhHAEEATgBFAFMASAAgACAAIAAgACAAIAACAAY4ADAAMAADABBJAEQAUwAgACAAIAAgACAABAAYMgAwADEANAAwADEAMgA5ADAANwAyADUABQAEAAAACAYAAlgACQACRQD%2fAPowgfcGCSqGSIb3DQEHAqCB6TCB5gIBATELMAkGBSsOAwIaBQAwCwYJKoZIhvcNAQcBMYHGMIHDAgEBMBkwDjEMMAoGA1UEAxMDSURTAgcgEQQGCClRMAkGBSsOAwIaBQCgXTAYBgkqhkiG9w0BCQMxCwYJKoZIhvcNAQcBMBwGCSqGSIb3DQEJBTEPFw0xNDAxMjkwNzI1MzlaMCMGCSqGSIb3DQEJBDEWBBRF%2fqnZ6znAGOYDuA1QJxZ7kOYTfDAJBgcqhkjOOAQDBC4wLAIUNk9rqGV16RPsLrLsHfHtNPc%21Q44CFBRiJ4BhRrmxUVH77EYIGSSd8WPb; path=/; domain=.itcinfotech.com\r\n
content-length: 0\r\n
dataserviceversion: 2.0\r\n
x-sap-odata-extension-version: 0.9;gp=0.8\r\n
server: SAP NetWeaver Application Server / ABAP 702\r\n
\r\n
Now i tried to do that using sapui5 code.
OData.request(
                   requestUri: "http://XXXXX.XXXXX.com:8000/sap/opu/sdata/sap/ZBANKRFCGANESH/z_bank_rfc_ganeshCollection(value='0203_IN120',scheme_id='Z_BANK_RFC_GANESH',scheme_agency_id='LOCAL')/?$format=xml",
                   method: "PUT",
                   headers: { "X-Requested-With": "XMLHttpRequest", "sap-user" : "ganesh", "sap-password" : "login@1234",  "Content-Type": "application/atom+xml" },
                   data: {
                           "value" : "0203_IN120",
                           "scheme_id" : "Z_BANK_RFC_GANESH",
                           "scheme_agency_id" : "LOCAL",
                           "post_bank" : "",
                           "bank_branch" : "Park Street",
                           "street" : "Russel Street",
                           "city" : "KOLKATA",
                           "swift_code" : "",
                           "region" : "WB",
                           "bank_name" : "HSBC",
                           "pobk_curac" : "",
                           "bank_group" : "",
                           "addr_no" : ""
                 function (data, response){ 
                   // var header_xcsrf_token = response.headers['x-csrf-token']; 
                  //  alert(header_xcsrf_token);
                    //  alert("hello");
                      //alert(data);
                     alert(JSON.stringify(response, null, 4));
                 function (err) {
                    alert(err.message);
  I found the I am always getting a 200 OK in the respose and not 204 [ when i displayed the response using the alert message]. As expected data is also not getting updated.
Kindly guide me where i am going wrong in the code. Please help me out.
thanks and regards,
krishna.

Hi Krishna
I will try and help.
The first thing i notice is you are using OData.request, this is not part of SAPUI5, OData is a global introduced by the datajs thirdparty plugin, I would recommend not using it directly, instead use the ODataModel API start by reading the Class sap.ui.model.odata.ODataModel and ODataModel.  There are a lot of good of reasons for using the ODataModel, like databinding, event handling, it doesn't smell like a leak, besides the SAPUI5 ODataModel is a lot easier to use.
try something like this
var url = 'http://XXXXX.XXXXX.com:8000/sap/opu/sdata/sap/ZBANKRFCGANESH';
var bJSON = true; //use JSON
var sUser = 'ganesh';
var sPassword = 'login@1234';
// create a model for OData service call
var oModel = new sap.ui.model.odata.ODataModel(url, true, sUser, sPassword);
sap.ui.getCore().setModel(oModel);
var path = '/z_bank_rfc_ganeshCollection(value='0203_IN120',scheme_id='Z_BANK_RFC_GANESH',scheme_agency_id='LOCAL')';
// create the data
var data =  {
    "value": "0203_IN120",
    "scheme_id": "Z_BANK_RFC_GANESH",
    "scheme_agency_id": "LOCAL",
    "post_bank": "",
    "bank_branch": "Park Street",
    "street": "Russel Street",
    "city": "KOLKATA",
    "swift_code": "",
    "region": "WB",
    "bank_name": "HSBC",
    "pobk_curac": "",
    "bank_group": "",
    "addr_no": ""
// get a CSRF token if needed
oModel.refreshSecurityToken();
// add own callback code
var oParams, fnSuccess, fnError, bUseMERGE;
//PUT data back to server
oModel.update(path, data, oParams, fnSuccess, fnError, bUseMERGE);
Let us know how you get on
hth
jsp
Message was edited by: John Patterson
I really dislike the SCN editor, especially the way it re formats code so it cannot be read while writing

Similar Messages

  • How to create interactive map in SAP Visual Business using SAP UI5 SDK

    Hi,
    Please tell me,
    How to create interactive map in SAP Visual Business using SAP UI5 SDK.
    Is it possible to create interactive map using VB Control in SAP UI5 SDK..?
    if possible please any one let me know.

    Hi folks, one question:
    We have our development close moved and now it is earlier than originally planned. 
    That means that we maybe can't finish our convenient API and you have to wait till we will release it - early 2015 is planned.
    But there is another option:
    Currently we have a API based on json. The developer has to create json and  to transfer it to the Visual Business control.
    This interface is more used as a low level API and we are developing on top the more convenient one. So all the features are the same.
    It will stay stable & compatible in the future and you can build on it.
    Do you want to use this interface?  
    Then I will publish the documentation.
    Let me know.
    Thanks

  • Upload image from Mobile device using SAP ui5 controls

    Hello Team ,
    Can we use SAP UI5 controls to upload image from photo gallery of the mobile device, the idea is to use simple sap UI5 codding and not SMP.
    please do let me know if you guys have idea on same.
    Armaan 

    Hi Armaanjit,
    Please have a look at my post
    File upload using SAPUI5 Control

  • Implementing ASAP Methodology using SAP Solution Manager

    Hi All,
    Can any one help me with any documentation regarding ASAP methodology implementation using Solution Manager.
    The step by step process and transaction codes used for implementing it are there any guides provided by SAP for implementing the ASAP methodology in Solman.
    It's an implementation project that we would like to track each phase in Solman.
    Kindly help me to get more details.
    Thanks in advance.

    Hi,
    There are the 'ASAP Implementaion Roadmaps' wheras the latest available
    is the 'ASAP Methodology for Implementation 7.0' Roadmap, and there are
    the 'Upgrade Roadmaps' wheras teh lastest one of them is:
    'Upgrade Roadmap (V3.2)'.
    If you are on ST-ICO 150 SP24 both of these Roadmaps
    should be available in your system.
    There are two ways to display the roadmaps in RMMAIN.
    One is to choose a project in RMMAIN, then the roadmap assigned to
    the project in SOLAR_PROJECT_ADMIN is displayed.
    The other one is to display any available roadmap in the system
    To display one of the available roadmaps (without a project) choose
    the button 'Other Roadmap' in RMMAIN and in the upcomming popup
    hit the button 'No Project'.
    After that you should get an addtional button besides the Project
    button called Roadmaps (Other Roadmap).
    When you hit now this button you will get a list of all available
    roadmaps.
    Some further notes for referencing (although they can be old but still helpful)
    644651     How to find the Reference Model in Solution Manage
    826586     ASAP Implementation Roadmap
    Hope this helps.
    Cheers
    SH

  • Problem: Z table data updates using SM30

    Hi,
    I have a requirement, while updating records in a Z table
    using SM30 Transaction.
    The Structure of the table is below:
    APMOD    Primary Key   Char(3)
    KONST    Primary Key   Char(20)
    ENDDA    Primary Key   DATS
    BEGDA    Non Key       DATS   
    and some other non key fields....
    Problem:  This table should act something like Infotype in HR.  I mean Delimition of Records while creating or changeing the existing record.
    Say there is a record
    APMOD = OGMT
    KONST = Organization Management
    BEGDA = 01/01/2004
    ENDDA = 12/31/9999
    Whenever i am Inserting a new record with key
    APMOD = OGMT and KONST = 'Organization Management'
    and BEGDA = '01/01/2006'.
    First it should update the old record with
    BEGDA = 01/01/2004 and ENDDA = 12/31/2005
    Then the new record needs to be inserted with
    BEGDA = 01/01/2006 and ENDDA = 12/31/9999.
    How can I achieve this using SM30? Can we write our own code somewhere? If yes Where and How?  Or is there any settings available for this requirement?
    I can write a Z program to update this Table, but i should achieve this using SM30 only.
    Let me know if you need any additional info. 
    Regards,
    Sudhakar.

    Hi Sudhakar,
    1. I tried the same at my end. It works fantastic !
       In  SM30 it shows
       'Delimit' Button
       'Expand <--> Collapse' Button.
        and accordingly delmits the records.
    2. in SE11,
       Use the menu
       Utilities ---> Table Maintenance Generator
       and finally build a table maintenance
       to use in SM30.
    3. When u use in SM30,
       u will achieve what u want.
    4. Just make sure your field
       ENDDA has the data element ENDDA
       in table definition.
      It should also be key.
    5. After this ENDDA column,
       there should be no other key column
      ( not even BEGDA)
    I Hope it helps.
    Regards,
    Amit M.

  • Problems in accessing UWL Items - Using SAP r/3 4.7 with External ITS

    Hi,
    When i am trying to open the Tasks in UWL, the Tasks which are calling any Tcode are giving blank page and some Tasks are opening but the Attachments in that Tasks are not opening.
    Tasks and Attachments are pointing to:
    1) http://vq2wk.corio.com:81/scripts/wgate/webgui/!?%7Etransaction=*SWK3+P_INSTID%3D0030000063%3BP_TYPEID%3DZSDQUOTE%3BP_CATID%3DBO%3BDYNP_OKCODE%3DONLI%3B&%7Eokcode=ONLI&%7Eclient=120&%7Elanguage=en&%7Eaccessibility=0
    2) http://vq2wk.corio.com:81/scripts/wgate/webgui/!?%7Etransaction=*SWK1+p_nosecm%3DX%3Bwi_id%3D000000156456%3B&%7Eclient=120&%7Elanguage=en&%7Eaccessibility=0
    All the Connections (RFC, SSO, SLD) and WebGui Tcodes with External ITS are working fine.
    Could any one please suggest me that i am missing any more configuration or any authorizations. Else any Session Managment needs to be done.
    Some times it is showing "/!Session not fall-safe/!\" in the status bar.
    Thanks in Advance.
    Regards,
    Sridhar.

    I already checked in SMLT tcode ,My system is MDMP .I passed that error and now I am getting this
    DbSl Trace: ORA-1403 when accessing table SAPUSER
    (DB) INFO: connected to DB
    (DB) INFO: DbSlControl(DBSL_CMD_NLS_CHARACTERSET_GET): WE8DEC
    (GSI) INFO: dbname   = "D3320110118070143                                                                                "
    (GSI) INFO: vname    = "ORACLE                          "
    (GSI) INFO: hostname = "SAPTST2K3E32                                                    "
    (GSI) INFO: sysname  = "Windows NT"
    (GSI) INFO: nodename = "SAPTST2K3E32"
    (GSI) INFO: release  = "5.2"
    (GSI) INFO: version  = "3790 Service Pack 2"
    (GSI) INFO: machine  = "2x Intel 80686 (Mod 29 Step 1)"
    (VK) ERROR: invalid migration key
    E:\usr\sap\D33\SYS\exe\run/R3load.exe: job finished with 1 error(s)
    E:\usr\sap\D33\SYS\exe\run/R3load.exe: END OF LOG: 20110118215221
    any idea on this??

  • Problem in conditions pricing updation using BAPI_PO_CREATE1

    hi,
        I am creating PO using BAPI_PO_CREATE1 however when i am passing the data to the bapi for conditions at item level the price value is not changing and throwing error as ( NET PRICE FOR ITEM 00010 adopted from last document ) so for all the items its throwing the same information and when i am chekin the PO the value is not the changing. and while creating the PO manually also the net price is coming automatically and we need to backspace the value and re enter the new value. So wht should i do in order to input the data into the PO.
    Thanks in advance

    Thanks

  • Problem in implementing Pub/Sub using Oracle AQ

    Hi,
    I am using 10.1.2.0.0 Process Manager
    I have created a publishing service which publishes a PAYLOAD as well as two header fields (Header holds the name of TARGET_SYSTEM and SOURCE_SYSTEM). In the receipients list I specified two names i.e. Bob and Jon with a comma seperator.
    I published a message to a queue and now I can see data in the queue table.
    Then I created two subscribing services (one for Bob and another for Jon).Here I specified the Consumer name as Jon in one service and Bob in another.
    When I deploy the subscription services and run them, it is not subscribing to the queue.
    Is there any additional step I need to perform in order to create the Consumer/ Subscriber?
    Regards,
    Vikas

    Hi,
    This is vikas again.
    Does some one know where to find out the document that can explain Using Oracle AQ in BPEL and steps to create rule based Consumer?
    Thanks & Regards,
    Vikas

  • Re: Problems while implementing video chat using JMF.

    I googled for "Java jmf alternatives" but i didn't get that much :(, can any body help me in JMF so i can make my basic peer to peer video chat as given at very first post. I am exploring this API.
    Please help

    Answered in your hijack post that had been split away to stand on its own merits:
    Re: Is JMF the best choice for video capture ?

  • SAP UI5 charts sap.viz OR sap.makit?

    Hi All,
    Just wanted to know which one is preferable / suggested for implementing charts for mobiles using SAP UI5 ? sap.viz or sap.makit?
    I know that the VIZ charting library (sap.viz) relies on the open source component D3 which in turn relies on the availability of Scalable Vector Graphics (SVG). As SVG is not supported by IE8 and not fully supported by FF ESR, the VIZ charting library is also not supported on those browsers.
    With this point can we say that it it better to go with sap.makit?
    Please advice.
    Thanks

    Hi,
    I'd recommend to use sap.viz if possible. It is the one that has development focus and it now also works on touch devices.
    For IE8 there seem to be compatibility libraries, google for them.
    (e.g. javascript - D3 IE8 Compatibility? - Stack Overflow and Home · mbostock/d3 Wiki · GitHub) https://github.com/shawnbot/aight might be the solution for IE8.
    Regards
    Andreas

  • SAP UI5, MII, & JSON

    I've been using jQuery ajax calls to fetch MII JSON data and display it in various ways for some time now when I want to display data in something other than an MII applet. My client wants to transition to using SAP UI5 in their web reports and so I've been doing some prototyping.
    I've found that I cannot get a UI5 table to bind to an MII Rowsets result set when the content type is JSON.
    Some example code...
    // This works fine...
         function buildTableAjax() {
                "use strict";
                var q = miiUtils.miiGet(queryTemplate, {}); // (wrapper function around $.ajax)
                q.done(function (data, status, xhr) {
                    var model = new sap.ui.model.json.JSONModel();
                    // if I setData to the returned "Rowsets" object I can
                    // not figure out a bindRows expression that works so
                    // I use the 0th rowset instead
                    model.setData(data.Rowsets.Rowset[0]);
                    var str = model.getJSON();
                    var table = new sap.ui.table.Table({
                        title: "Water Samples",
                        visibleRowCount: 20
                    var cols = data.Rowsets.Rowset[0].Columns.Column;
                    $.each(cols, function (i, col) {
                        if ($.inArray(col.Name, hideColumns) === -1) {
                            table.addColumn(new sap.ui.table.Column({
                                label: new sap.ui.commons.Label({
                                    text: col.Name
                                template: new sap.ui.commons.TextView().bindProperty("text", col.SourceColumn),
                                sortProperty: col.SourceColumn,
                                filterProperty: col.SourceColumn,
                                width: "75px"
                    table.setModel(model);
                    table.bindRows("/Row");
                    table.placeAt("tableHolder");
    I know that this isn't the preferred way to do this and I would like to use the whole UI5 stack sometime soon, so I came up with the following.
      function buildTableUI5() {
                "use strict";
                var requestUrl = miiUtils.createRequestURL(queryTemplate, {
                    "Content-Type": "text/json"
                var model = new sap.ui.model.json.JSONModel();
                var table = new sap.ui.table.Table({
                    title: "Water Samples",
                    visibleRowCount: 20,
                // maybe add columns based on result set later...
                table.addColumn(new sap.ui.table.Column({
                    label: new sap.ui.commons.Label({
                        text: "Description"
                    template: new sap.ui.commons.TextView().bindProperty("text", "Description"),
                    sortProperty: "Description",
                    filterProperty: "Description",
                    width: "75px"
                model.attachRequestCompleted(function () {
                    // do something with data if required...
                    //var str = model.getJSON();              
                model.loadData(requestUrl);
                table.setModel(model);
                table.bindRows("/Rowset/Row");
                table.placeAt("tableHolder");
    buildTableUI5 will always display "No Data". If I simply change the url's Content-Type to text/xml and change the model type to XMLModel, the function works as expected and data is bound.
    I would prefer to use JSON if possible, Can it be done through model.loadData()? What would I put in the bindRows call to get it to work? (The value of the commented out str variable in attachRequestCompleted is the expected json result, so the data is being returned just fine).
    Thanks!

    Hi Allan,
    The data structure changes when your content type is JSON hence you cannot map rowsets/rowset/row structure and get the desired output.
    Generally, MII 14.0 onwards is capable of giving JSON result that can be directly mapped to ui5 components.
    What is miiUtils.createRequestURL retur ning you here. I suspect a mapping issue here as everything else looks good.
    See is below example helps you. This is referring to UI5 Charts but atleast can give you some idea on model and data binding.
    Getting started with Viz Charts
    Table - SAPUI5 Demo Kit
    Best Regards,
    Swaroop

  • Webi 4.0 using SAP BW old security model (old authorization concept in BW)

    Hi experts,
    we are facing a problem with a new customer, using SAP BO 4.0 - Webintellingence on top of a SAP BW 7.0 EHP1.
    The customer is still running the old security concept in BW. The hint to upgrade SAP BW to the new reporting authorization will be done, but not within the next half year.
    Could that be a major problem to run this combination (BO 4.0 (Webi) and the old security concept) particularily on hierarchie authorization.
    Thanks in advance for a quick answer.
    Thomas

    (1) BEx queries already in use by the business users are from the BWP and those same queries may or may not exist in BWD or BWT as some business users create BEx queries directly in the BWP.
    1). As I told you earlier, design is purely  based on Requirement and Process also needs to be followed.
    Bex can be created directly in the production, but if query goes wrong or fetches wrong data, don't you think business people will get frustrated. If you or team can explain the process, then Yes you can directly work on Production (just my view)
    (2) Even if those queries do exist in entire BW landscape, including BWD, BWT, and BWP, only BWP has the data that business user can count on. BWD has no data and BWT has only sample data where as BWP has actual and complete data.
    Running the query is BWD or BWT is just for testing, example incase of BOBJ upgrade, you need to do in 577 and test before prod rite.
    3). I can create reports in 577 in connection with BWD to maintain consistency in the schema for both the environments. Upon approval and migration to 578 I know that I can change the underlying connection from BWD to BWP and that would work just fine, however, according to the business users, the auditors would not like the idea in light of SOX compliance and may not approve the methodology.
    You have answer in your question (SOX) and Business also like to follow the process (atleast in the companies, I have seen)
    Just my view...

  • Active Directory cn field not updated from sap HR using ldap.

    Hi,
    Apologies if this is in the wrong forum area.
    I am using the LDAP facility to create and modify Active Directory records from sap HR. Initially, the name field cn that was coming across into AD was in the format of the logical system and employee number, eg, RD4CLNT22000000711.
    I then implemented the BADI HRLDAP_ATTRIBUTES which then changed this name field cn in the active directory listing to the format; surname, forename.
    It works fine when I create a new user, however the problem comes when I update the persons name in the sap hr module. The data that comes across into Active Directory shows the change to the persons surname sn, forename and displayname fields is there but the cn field is still showing as the previous name.
    In short, when a new user is created, the cn field in active directory is correct
    (surname, forename) but when the employee’s name is modified, that change is not brought across to the cn field even though the surname, forename and displayname fields are updated correctlyon AD.
    We are on release 4.70.
    Anyway, if anyone could help I would be very grateful.
    Thanks
    David

    Hi
    The problem it is causing us is that the cn field is incorrect and does not mirror the change in sap HR, therefore the Active Directory entry for the employee is not totally accurate.
    When an employee changes their name in SAP HR - usually their surname, we would then want to update the employee’s active directory account to show this change and this includes the cn field also. At the moment the firstname, lastname fields do get updated with the change so we would want the cn field to show this as well otherwise the cn field would be incorrect and not match up with the employee's AD firstname & lastname fields.
    Dave

  • Problem using SAP Connector in Win 2k3 x64 - No Data is returned on BAPIs

    Hi,
    During the tests of migration to a 64 bits environment we encountered some problems with the connection to the SAP server.
    The first problem was that the librfc32.dll library was a 32 bit library, so application could not run in x64 mode.
    We downloaded the official x64 library from the Support Portal (https://websmp206.sap-ag.de/support > Downloads >
    Support Packages and Patches > Entry by Application Group > Additional Components > SAP Kernel > SAP KERNEL 64-BIT > SAP KERNEL 6.40 64-BIT >
    SAP KERNEL 6.40 64-BIT > Windows Server on x64 64bit > #Database independent >  librfc_66-20001176.sar, and extracting file librfc32.dll a x64 dll).
    Using this x64 dll we finally could test the application in 64-bits mode (the purpose of the migration) testing its runtime behavior,
    where my current problem is.
    When connecting to the SAP server all BAPI's we test are always returning an empty data results.
    We have no errors nor exceptions from the SAP .NET connector, only the results come empty when they shouldn't.
    When testing the same application but linked to the SAP 32 bits library (application runs in 32-bit mode), invoking the same BAPI's
    (using the exactly the same code and parameters) we got the correct response from the BAPI, i.e., non empty results.
    We already tested a set of BAPIs and always with the same result, in x64 we got no data, in 32-bits we got the information.
    Does anybody know what can be causing this misbehavior? What can we do to make application run correctly in x64 mode?
    Here some additional information about the Operating System: Microsoft Windows Server 2003, Standard x64 Edition, Service Pack 2 (with all windows updates installed).
    Best regards,
    João Portela on behalf of Manuel Dias

    Maybe your application isn´t run in x84
    #Go to properties of your project ->Build -> changed platform target of "Any CPU" to "x86"
    #Copy these libraries from our 32-bit environment :
    *SAP.Connector.dll
    *SAP.Conector.Rfc.dll
    *librfc32.dll
    *msvcp71.dll
    *msvcr71.dll
    In 64 bits environment:
    1. librfc32.dll to C:WINDOWSsystem
    2. msvcp71.dll to C:WINDOWSsystem32
    3. msvcp71.dll and  msvcr71.dll to C:WINDOWSSysWOW64
    4. SAP.Connector.dll and SAP.Conector.Rfc.dll to C:WINDOWSassembly (DRAG)

  • How to implement OData based BASIC Authentication using HTML, JavaScript for Mobile Apps using Apache Cordova/PhoneGap and datajs-1.1.1.js library

    Hello,
    I have an issue with OData based BASIC authentication for iOS App created using HTML, JavaScript, SAP UI5, OData and Apache Cordova/PhoneGap.
    Please check the post here http://scn.sap.com/thread/3527245
    Request you to kindly reply on the above given link.
    Thanks and Regards,
    Suraj Kumar

    Hello Prathik,
    The code which I am using for OData based BASIC Authentication, for my Mobile App is as below.
       var onSuccess = function(data) {
       alert("We are Through"); //Just to check that the OData request was sucessful
       var onError = function(err) {
       switch(err.response.statusCode) {  
       case 403 : {
       window.alert("Error Code - 403, Service unreachable ");
       break;
       case 401 : {
       window.alert("The credentials are incorrect or missing!");
       break;  
    // dataUserName and dataPassword are the two variables, in which I am storing my Username and Password, respectively.
       var connectionRequest = {
       requestUri: "ODATA SERVICE URL GOES HERE/",
       headers: { Authorization : 'Basic ' + Base64.encode(dataUsername + ":" + dataPassword) },
       method: "POST"
       OData.request( connectionRequest, onSuccess, onError);

Maybe you are looking for

  • Oracle installation on aix

    hello, i am on a project where i need to install oracle 10gr2 on aix 6.1. the issue i am looking at right now is this we already install oracle 10gr2 the server using a particular partition now i want to install oracle 10gr2 on the same server but a

  • Lion keep crashing my computer 3 or 4 times a day

    Since i download the lion system to my computer it keeps freezing all the time.

  • Mouse Down

    My wireless mouse fell on the floor during my Photoshop big project. Now, there is no life. I saw some red lights when I took out and re-installed the batteries. Is my mouse dead? I am using my PC for this post this message. Any suggestion will be ap

  • SRM 7.0 SUS with ECS

    Dear Experts, In SRM 7.0 with Extended classic scenario  but found that SUS doesnu2019t support confirmations and invoice postings. Can you please clarify me is there any workaround to achieve this functionality without compromising the technical sce

  • Asking for example code (RFComm Bluetooth Application)

    hello there, i almost give up on finding a way to connect a client application using widcomm sdk on pc to server application using jsr82 j2me on mobile ph0ne ... anybody can give me an example code for connecting both of them ... if u can, or have so