cancel
Showing results for 
Search instead for 
Did you mean: 

Offline oData Issue

Former Member
0 Kudos

Dear Experts, Good Day!

I am facing an issue with the oData Offline at one of my Project, I have followed the Document : http://scn.sap.com/docs/DOC-58063.

I am able to execute the offline odata example shared in the document with the sample odata service attached in the document(http://services.odata.org/V2/OData/OData.svc), it is working perfectly fine.

I have created the odata service (data Source JDBC), we are using this odata service for records fetch which working perfectly fine.

The same odata service I am using for the offline, the "read" is working fine but the "Open offline store" is having issues - getting the “An Error Occurred “Unknow network error Occurred”

Debug Message : The conversion from OData metadata to database metadata has failed[-100006](Also attached the complete servers log-debug mode)

http://vmshofsaps806.main.knpcdom.net:8080/gateway/odata/SAP/PUSHUSER;v=1

Attached the odata service Metadata.

My Environment Details:

SMP server : SMP3 SP07

SDK oData Plugin : 3.8.1

oData Modeler : 1.4.1

The openStore function :

    function openStore() {

        if (!haveAppId()) {

            return;

        }

        startTime = new Date();

        updateStatus2("store.open called");

        var properties = {

            "name": "ProductsOfflineStore",

            "host": applicationContext.registrationContext.serverHost,

            "port": applicationContext.registrationContext.serverPort,

            "https": applicationContext.registrationContext.https,

            "serviceRoot" :  appId,

          

            "definingRequests" : {

                "PushUserDR" : "/SYCLOPUSHUSERS"

            }

        };

          

        store = sap.OData.createOfflineStore(properties);

        //var options = {};

        store.open(openStoreSuccessCallback, errorCallback/*, options*/);

    }

Appreciated the quick response!

Thanks,

Regards,

Tirupati

Accepted Solutions (1)

Accepted Solutions (1)

Kevin_SAP
Advisor
Advisor
0 Kudos

Looking at SMP Logs, appears to be user coding error, I assume this is using Integration Gateway:

Caused by: [-100061] Property "USERID" cannot be supported because it has a max length value that is too large for a key or referential constraint property#null#379#RequestResponse#1433254126973048#200

Thanks,

Kevin

Former Member
0 Kudos

Thanks Kevin for your quick response!

Yes, I am using the integration gateway.

The 'read' is working perfectly fine for the same odata service.

For the addressed USERID issue, Basically the USERID in the Backend system(Oracle) is defined with the length 10 VARCHAR(Created oData Service created with the JDBC as a Datasource),

do I needs to manage anything for the key length with offline store data(since the same odata service is working fine when I am invoking the 'Read'). Kindly suggest.

Thanks,

Regards,

Tirupati

PavelPenaz
Product and Topic Expert
Product and Topic Expert
0 Kudos

Dear Tirupati,

As per our conference call earlier today, the solution is to set the max length of the primary constraint in the OData Model, default is 0, should be limited for the primary key => screenshot).

@Kevin / JK, thanks a lot. You were on spot.

Pavel

Answers (1)

Answers (1)

Jitendra_Kansal
Product and Topic Expert
Product and Topic Expert
0 Kudos

Can you cross check the max length of key properties for OData model:

As per below link:

Max Length of Edm.String key properties - 512 char

Max length of Edm.Binary key properties - 1536 bytes

Offline OData Version Support - Developer - SAP Library

Former Member
0 Kudos

Thanks JK for your response!

Its working perfectly fine now... As Pavel mentioned in his response the default length in the odata model was 0, Modified to 20 as per the Oracle Back-End Attribute definition for the primary key, its starts working.

Regards,

Tiru

Kevin_SAP
Advisor
Advisor
0 Kudos

Sorry for the lack of response, I was onsite the second half of last week.  Glad that help solve the issue.