Skip to Content
0
May 18, 2020 at 10:23 PM

Service Layer: How To Get E_Mail from BusinessPartners/ContactEmployees

171 Views Last edit May 19, 2020 at 09:59 AM 2 rev

Hello,

I'm sorry, I'm very new in SAP, I need to get E_Mail from BusinessPartners/ContactEmployees and I have found two ways to do so in other questions, and I have tried those solutions but I'm getting some errors:

a .When I try to do a GET to

https://<yourHanaServer>:50000/b1s/v1/$crossjoin(BusinessPartners,ContactEmployees)?$filter=BusinessPartners/CardCode eq BusinessPartners/ContactEmployees/CardCode and BusinessPartners/ContactEmployees/EmailAddress eq 'jorge.vazquez@prosistemas.mx'&$expand=BusinessPartners($select=CardName),BusinessPartners/ContactEmployees($select=EmailAddress)

I'm getting this error:

{
   "error": {
      "code": -1000,
      "message": {
         "lang": "en-us",
         "value": "Not supported query option"
      }
   }
}

b. When I try to do a POST to

https://<yourHanaServer>:50000/b1s/v1/QueryService_PostQueryBody:{
 "QueryPath": "$crossjoin(BusinessPartners,BusinessPartners/ContactEmployees)",
 "QueryOption": "$expand=BusinessPartners($select=),BusinessPartners/ContactEmployees($select=CardCode)&$filter=BusinessPartners/CardCode eq BusinessPartners/ContactEmployees/CardCode and BusinessPartners/ContactEmployees/E_Mail eq 'mail@mail.com'"
}

I'm getting this error:

{
   "error": {
      "code": -1002,
      "message": {
         "lang": "en-us",
         "value": "Service Not Found"
      }
   }
}

Please your help with this, I don't know if I'm missing something or some configuration.

Thank you!