Skip to Content

SMP access to different projects with const app connection id

Dec 04, 2017 at 10:15 AM


avatar image

Hi, I want to get access to 2 different odata projects: prj1,prj2.

Each time I want to get access to only one of these odata projects.

Each project has constant connection id.

I need that in my app, when the user will choose a project, he will see the response of webservices of selected project.

How to write a function, that I will have access to selected project each time ?

This is my code of access to projects, but the code is working partially.



factory.initnew = function (appisn)


if (appisn===0)


factory.asmxUrl=""; sUrl=""; factory.oHeaders['X-SMP-APPCID']="fd81ff8e-0851-4c06-5586-b2d0c0b997ab";


else if (appisn===1)


factory.asmxUrl=""; sUrl=""; factory.oHeaders['X-SMP-APPCID']="7b2a3e67-0e60-6766-18c1-dc6f3064434b";


oData.defaultHttpClient=sap.AuthProxy.generateODataHttpClient(); factory.clientCert=new sap.AuthProxy.CertificateFromStore();

if (1)


var request2 =


headers: factory.oHeaders,



data : factory.connectionData, method : "POST"






10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

0 Answers