cancel
Showing results for 
Search instead for 
Did you mean: 

SAP HANA Service Layer Keeps Prompting to enter Username & Password

Former Member
0 Kudos

Hello Everyone,

I am having some problems related to SAP HANA Service Layer : When we go to Service Layer link - https://:50000/b1s/v1 it should show us "{ “error” : { “code” : -1001, “message” : { “lang” : “en-us”, “value” : “Invalid session.” } } }" but I keep getting prompt to enter username and password, After entering the username & password it still keeps on asking. How can I fix this issue ? Due to this I am getting some weird error while retrieving the data.

Accepted Solutions (0)

Answers (2)

Answers (2)

YatseaLi
Product and Topic Expert
Product and Topic Expert

Hi Rahul,

Service Layer is not accessible from browser through https://:50000/b1s/v1 without Login with POST method. Keep in mind the browser is only use GET method.

SL is compliant with RESTful OData, to use Service Layer,
Firstly, Make a POST HTTP request to https://<SL>:50000/b1s/v1/Login with B1 login credential.
then, Make GET HTTP request to get a BP/Order etc.
GET - https://<SL>:50000/b1s/v1/Orders (Get a list of order)
GET - https://<SL>:50000/b1s/v1/Orders(1) (Get the order with DocEntry 1)
POST - https://<SL>:50000/b1s/v1/Orders (Create a new order, the order details is provided in HTTP body in json)
PATCH - https://<SL>:50000/b1s/v1/Orders(1) (Get the order with DocEntry 1)
DELETE - https://<SL>:50000/b1s/v1/Orders(1) (Get the order with DocEntry 1)

Please kindly check out Service Layer session in the B1H elearning
It is definitely worth going through this elearning.

If you have problem to access the eLearning, please refer to this blog.

Kind Regards, Yatsea

jesus_perea
Explorer
0 Kudos

Hi, If you want work with the SL you can use the App Postman. This app help us to work with this web service type. You can download from Chrome Store, after install you can consuming the SL how seen in the Documentation`s link (https://localhost:50000/Service%20Layer%20API%20Reference.html). The first step is to do Login, for this you should to see the option "Login" in the Documentation.

POST https://localhost:50000/b1s/v1/Login

{ "CompanyDB": "SBODEMOUS", "Password": "1234", "UserName": "manager" }