cancel
Showing results for 
Search instead for 
Did you mean: 

Service Layer Cross Join Issue

divtech
Explorer
0 Kudos
660

Hi SAP Community,

I am having an issue with my crossjoin on SAP B1 9.2 PL08 HF2. Note, this exact same query (on version 9.3 PL14) works without errors. The issue seems to affect only UDFs but not "regular" out of the box fields.

My understanding is that even on version 9.2 PL08, the service layer should be able to query/handle UDFs. Someone please correct me if this is wrong.

The following error appears (on *specifically* Order/DocumentLines and PurchaseOrder/DocumentLines UDFs):

{<br>   "error" : {<br>      "code" : -1000,<br>      "message" : {<br>         "lang" : "en-us",<br>         "value" : "invalid property 'InsertWhateverUDFHERE' of type 'DocumentLine'"<br>      }<br>   }<br>}<br>

Is there some limitation or additional info required in the query or metadata for line level UDFs on version 9.2 PL08 HF02?

Here is the code:

https://Server:50000/b1s/v1/$crossjoin(Orders,Orders/DocumentLines,PurchaseOrders,PurchaseOrders/Doc..., DocDate, U_NWR_AutoGenerateSO, U_NWR_AGSO_DiamondSO,U_NWR_AutoGenerateSOSuccess,U_BackorderSO,DocDueDate,U_Sample,U_HandlingDateType,U_HandlingDateAfter,U_HandlingDateBy,U_GeodisException,U_GeodisAllowExpedited,U_FreeFreight,U_Incoterms,U_ShopifyOrderNo,U_ShopifyOrderId,Comments),PurchaseOrders/DocumentLines($select=WarehouseCode,DocEntry,ItemCode,ItemDescription,UnitPrice,Quantity,DiscountPercent,TaxCode,BarCode,U_HTS_Code,U_MASTER,U_INNER,U_MasterGTIN,U_InnerGTIN,U_VAS_Code,U_TKT_USD,U_Class,U_ClassDesc,U_DEPT,U_Description),PurchaseOrders/AddressExtension($select=ShipToStreet,DocEntry,ShipToStreetNo,ShipToBlock,ShipToCity,ShipToZipCode,ShipToState,ShipToCountry,ShipToAddress2,ShipToAddress3),Orders/DocumentLines($select=DocEntry)&$filter=  PurchaseOrders/DocEntry eq PurchaseOrders/DocumentLines/DocEntry and PurchaseOrders/DocEntry eq PurchaseOrders/AddressExtension/DocEntry and Orders/DocumentLines/DocEntry eq  PurchaseOrders/DocumentLines/BaseEntry and  Orders/DocumentLines/ItemCode eq  PurchaseOrders/DocumentLines/ItemCode and Orders/DocEntry eq  Orders/DocumentLines/DocEntry and  PurchaseOrders/U_NWR_AutoGenerateSO eq 'Y' and PurchaseOrders/U_NWR_AGSO_DiamondSO eq null and PurchaseOrders/DocumentStatus eq 'O' and PurchaseOrders/DocumentLines/WarehouseCode eq '00'

Thanks,
Jaz

View Entire Topic
mgregur
Active Contributor
0 Kudos

Hi,

if UDFs were added sometimes during your work (let's say a month after SL was started), you need to restart the Service Layer in order for the UDFs to become exposed.

BR,

Matija

divtech
Explorer
0 Kudos

Hi Matija,

The UDFs existed at the inception of the database (it was copied from another). Additionally, I have tried this already (the restart of the service layer) with no resolution. Lastly, it is *ALL* documentline level UDFs, not just specific ones.

Thanks,
Jaz

mgregur
Active Contributor
0 Kudos

Hi,

I suggest you check SAP note 2331702 - oData Filter Does Not Work For Document Lines Information as I see you are using DocumentLines in your filter. Might be this is causing problems, check by making a simple GET of any document and checking if UDFs are there.

Also, did you try using v2 instead of v1? I'm just suggesting what I would check in your position, not sure it helps a lot...

BR,

Matija

divtech
Explorer
0 Kudos

Hi, yes I tried but I don't believe that "complex" crossjoins are supported in this version of the service layer unfortunately.