Skip to Content

SAP B1 Service Layer crossjoin

We would like to do a crossjoin to get items with their translations.

So we came up with the following url:

$crossjoin(Items,MultiLanguageTranslations)?$expand=Items($select=ItemCode, ItemName,ItemsGroupCode),MultiLanguageTranslations($select=TableName,FieldAlias,PrimaryKeyofobject)&$filter=Items/ItemCode eq MultiLanguageTranslations/PrimaryKeyofobject and MultiLanguageTranslations/TableName eq 'OITM'

But now we also would like to get the actual translation from the MultiLanguageTranslations.TranslationsInUserLanguages property.

How can we achieve this?

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    May 18 at 09:43 AM

    Hi Trinidad,

    Thanks for the quick answer.
    I've got it to work with the following url:

    /$crossjoin(Items,MultiLanguageTranslations,MultiLanguageTranslations/TranslationsInUserLanguages)?$expand=Items($select=ItemCode,ItemName,ItemsGroupCode),MultiLanguageTranslations($select=TableName,FieldAlias,PrimaryKeyofobject),MultiLanguageTranslations/TranslationsInUserLanguages($select=LanguageCodeOfUserLanguage,Translationscontent)&$filter=Items/ItemCode eq MultiLanguageTranslations/PrimaryKeyofobject and MultiLanguageTranslations/Numerator eq MultiLanguageTranslations/TranslationsInUserLanguages/KeyFromHeaderTable and MultiLanguageTranslations/TableName eq 'OITM'

    Add comment
    10|10000 characters needed characters exceeded

  • May 18 at 09:34 AM

    Hi Sander

    Have you tried to get the TranslationsInUserLanguages collection out of the MultiLanguageTranslations by adding MultiLanguageTranslations/TranslationsInUserLanguages to your cross join?

    Here you have a similar sample with Orders and Orders/DocumentLines:

    /$crossjoin(Orders,Orders/DocumentLines)?$expand=Orders($select=DocEntry, DocNum),Orders/DocumentLines($select=ItemCode,LineNum)&$filter=Orders/DocEntry eq Orders/DocumentLines/DocEntry and Orders/DocumentLines/ItemCode eq 'A00001'

    Hope it helps,
    Trinidad.

    Add comment
    10|10000 characters needed characters exceeded