cancel
Showing results for 
Search instead for 
Did you mean: 

How to Fetch data of Items Available to promise from SAP b1 Service layer using API ?

former_member209771
Active Participant
0 Kudos

Hi Expert ,

Previously i had used Item Available to promise data from SAP B1 using DI Server using ExecuteRawQuery api of DI Server.I am using now SAP B1 Service Layer . I can't find any API for ServiceLayer in below URI of Service Layer :

https://Myserver:50000/Service%20Layer%20API%20Reference.html

Please give me suggestion how can i get available to promise data from SAP b1 using ServiceLayer API.

Thanks & Regards

Surajit Kundu

Accepted Solutions (0)

Answers (3)

Answers (3)

former_member390407
Contributor

Hello Surojit,

Am I understanding you question correctly that you need to execute a custom query to get some data? If so - there is no this service in the ServiceLayer. That was already mentioned on the forum:

https://answers.sap.com/questions/272549/service-layer-call-procedure-or-view-from-database.html

https://answers.sap.com/questions/298796/how-to-perform-hana-queries-via-service-layer.html

https://answers.sap.com/questions/423806/service-layer-with-userdefined-query.html

But you can try this 2 approaches:

1) Call a view. More info: https://blogs.sap.com/2018/02/01/new-sap-business-one-semantic-layer-view-exposure/

2) Call a procedure using XSJS (not ServiceLayer, but still HTTP REST). You need to implement your XS JS wrapper for the procedure or you can use the following: https://blogs.sap.com/2018/07/19/hana-procedure-performer-xs-js-project/

former_member209771
Active Participant
0 Kudos

Hi,

I am trying to create custom API in Service Layer and have already created a view. Exported the same using B1HANAMODELPACKAGETOOL exe, and checked the "Enable Service Layer" checkbox. But, when I try to enable the view in HANA studio in Modeller perspective, its showing the following error:-

Regards,

Surajit Kundu

former_member209771
Active Participant
0 Kudos

Hi Sergei ,

Thanks for your reply . Let you know if required any suggestion.

Thanks

Surajit Kundu