on ‎2018 Mar 21 6:38 PM
Hey Experts,
I have an odata call which has a quite a lot of select, expand and filter statements. I am navigating from EmpJob entity to a lot of entities and one of them is EmpWorkPermit. When I try to select a couple of fields from that entity like documentNumber, or issuingAuthority, it works just fine. But when I navigate to documentTypeNav or issuingAuthorityNav, the odata call fails.
Points to Note:
1. This happens only when I select the navigations in my &$Select statement.
2. When I don't select any navigations from EmpWorkPermit and only expand them (no use anyway!) it doesn't error out.
3. This doesn't happen in any of the other selects which navigate to child entities or parent entities
4. If I execute the exact same code in Postman it works.
odata call:
https://<url>/odata/v2/EmpJob?
$select=startDate,lastModifiedDateTime,contractEndDate,payGrade,company,standardHours,location,workscheduleCode,contractType,customString18,contractTypeNav/externalCode,jobCodeNav/localNavITA/inailCode,employmentNav/lastModifiedDateTime,employmentNav/customDate2,employmentNav/startDate,employmentNav/personNav/lastModifiedDateTime,employmentNav/personNav/customString2,employmentNav/personNav/dateOfBirth,employmentNav/personNav/countryOfBirth,employmentNav/personNav/customString2,employmentNav/personNav/nationalIdNav/nationalId,employmentNav/personNav/personalInfoNav/lastModifiedDateTime,employmentNav/personNav/personalInfoNav/nationality,employmentNav/personNav/personalInfoNav/lastName,employmentNav/personNav/personalInfoNav/firstName,employmentNav/personNav/personalInfoNav/gender,employmentNav/personNav/personalInfoNav/localNavITA/genericString1,employmentNav/personNav/personalInfoNav/localNavITA/customString6Nav/picklistLabels/label,employmentNav/personNav/personalInfoNav/localNavITA/customString6Nav/picklistLabels/locale,employmentNav/personNav/phoneNav/lastModifiedDateTime,employmentNav/personNav/phoneNav/phoneNumber,employmentNav/personNav/phoneNav/phoneTypeNav/externalCode,employmentNav/personNav/phoneNav/phoneTypeNav/picklistLabels/label,employmentNav/personNav/emailNav/lastModifiedDateTime,employmentNav/personNav/emailNav/emailAddress,employmentNav/personNav/emailNav/emailTypeNav/externalCode,employmentNav/personNav/homeAddressNavDEFLT/zipCode,employmentNav/personNav/homeAddressNavDEFLT/city,employmentNav/personNav/homeAddressNavDEFLT/address1,employmentNav/personNav/homeAddressNavDEFLT/address2,employmentNav/personNav/homeAddressNavDEFLT/country,employmentNav/personNav/homeAddressNavDEFLT/addressType,employmentNav/compInfoNav/empPayCompRecurringNav/paycompvalue,employmentNav/paymentInformationNav/toPaymentInformationDetailV3/paymentMethod,employmentNav/paymentInformationNav/toPaymentInformationDetailV3/iban,employmentNav/empWorkPermitNav
&$expand=contractTypeNav,workscheduleCodeNav,jobCodeNav,jobCodeNav/localNavITA,employmentNav,employmentNav/personNav,employmentNav/personNav/phoneNav,employmentNav/personNav/phoneNav/phoneTypeNav,employmentNav/personNav/emailNav,employmentNav/personNav/emailNav/emailTypeNav,employmentNav/personNav/homeAddressNavDEFLT,employmentNav/personNav/nationalIdNav,employmentNav/personNav/personalInfoNav,employmentNav/personNav/personalInfoNav/localNavITA,employmentNav/empWorkPermitNav,employmentNav/empWorkPermitNav/customString1Nav,employmentNav/empWorkPermitNav/documentTypeNav,employmentNav/empWorkPermitNav/issuingAuthorityNav,employmentNav/compInfoNav,employmentNav/compInfoNav/empPayCompRecurringNav,employmentNav/paymentInformationNav,employmentNav/paymentInformationNav/toPaymentInformationDetailV3,employmentNav/personNav/personalInfoNav/localNavITA/customString6Nav/picklistLabels&$filter=(event eq ' ' or event eq '') and company eq ' ' and lastModifiedDateTime gt datetimeoffset '2018-03-21T13:37:49Z'
The 'employmentNav/empWorkPermitNav' in the last line of the select statement is the problem. I have tried all/one of the following instead too -
employmentNav/empWorkPermitNav/documentTypeNav
employmentNav/empWorkPermitNav/issuingAuthorityNav
But if I remove anything related to the EmpWorkPermitNav, it works.
Data Dictionary Screenshot
data-dictionary-empworkpermit.png
EmpEmployment navigation to EmpWorkPermit entity
empemployment-navigation-to-empworkpermit.png
Looking at the above, I don't think the problem is a spelling mistake or the navigation not being right.
What could it be?
Thank you in advance
Kriba
Request clarification before answering.
Update:
We raised an SAP ticket for this issue. Turns out there is an odata v2 adapter bug which affects the odata call if are selecting properties through expand.
For example: &$select=employmentNav/empWorkPermitNav/documentTypeNav
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 10 | |
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.