Skip to Content
0
Apr 17, 2018 at 05:15 PM

SAP B1 Service Layer $crossjoin a Document with AddressExtension

1260 Views Last edit Apr 17, 2018 at 05:15 PM 2 rev

Hi,
Is there a way to properly $crossjoin a Document with AddressExtension?
I need for example to implement document filtering by ship to country.
Joining without a filter seems to be making a Cartesian product, truly matching all documents with all addresses; on another note, AddressExtension does not expose DocEntry, so I cannot apply a joining $filter expression.
Please advise, this would be a real show stopper if that's unsupported.
Maybe there is some other call I could use?

Query example to illustrate the improper cross join -

{
  "QueryPath": "$crossjoin(Orders,Orders/AddressExtension)",
  "QueryOption": "$expand=Orders($select=DocEntry, DocNum),Orders/AddressExtension($select=ShipToCountry)&$filter=Orders/DocNum eq 1200"
}