Skip to Content
0

SAP HANA Service Layer Keeps Prompting to enter Username & Password

Dec 06, 2017 at 06:38 AM

234

avatar image
Former Member

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.

temp1.png (30.3 kB)
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Yatsea Li
Dec 06, 2017 at 08:13 AM
1

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

Share
10 |10000 characters needed characters left characters exceeded
avatar image
Former Member Dec 28, 2017 at 04:37 PM
0

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" }

Share
10 |10000 characters needed characters left characters exceeded